question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embedded error form not working when used with `tunnel` in JavaScript SDK

See original GitHub issue

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Version

22.2.0

Steps to Reproduce

  1. Use the latest official SDK with React & tunnel option
  2. Enabled embedded feedback dialog in ErrorBoundary component

Expected Result

  • Errors are reported through the tunnel endpoint (got this working through Django view, inspired by your Flask example)
  • Embedded form uses the tunnel endpoint to both load it’s JS & submit data.

Actual Result

1) The URL at which the SDK looks for the embedded form’s JavaScript is not configurable

I was able to go around this by fiddling with DSN value in options for the dialog, but that’s an ugly work-around since DSN is at this point about identification of org/project as opposed to anything with API location.

2) Cannot configure the submit URL of embedded form

This is probably very much connected to the first problem, but even when I work around the first one, this one gets into my way… that is to say that I am able to get the form to show up, but it has the following additional problems:

2.1. Submit URL is based on the internal absolute URL

This doesn’t work in the context of my application, since that URL won’t be publicly available.

Also, as a sidenote, I’m sure it doesn’t also need to include all the GET parameters that got there from dialog options (I’m supplying all texts because I’d like to have them be part of our translation catalogs.

var endpoint = /**/"http://127.0.0.1:9000/api/embed/error-page/?dsn=http%3A%2F%2Fe691f5a9f573484a95e8da0ee4fe55e2%40127.0.0.1%3A3010%2F2&title=It+looks+like+we%E2%80%99re+having+issues.&subtitle=Our+team+has+been+notified.&subtitle2=If+you%27d+like+to+help%2C+tell+us+what+happened+below.+%E2%80%93+not+visible+on+small+screen+resolutions&labelName=Name&labelEmail=Email&labelComments=What+happened%3F&labelClose=Close&labelSubmit=Submit&errorGeneric=An+unknown+error+occurred+while+submitting+your+report.+Please+try+again.&errorFormEntry=Some+fields+were+invalid.+Please+correct+the+errors+and+try+again.&successMessage=Your+feedback+has+been+sent.+Thank+you%21&eventId=cd203fb8d8934d5f8390a9b29cab7e6a";/**/ '';

2.2. The embed JS is injected twice & the form itself shows twice as a result.

This might quite possibly stem from the fact that development mode of react re-throws errors it catches, but as far I was able to gather, the ErrorBoundary component uses APIs from vanilla JS package.

There should be some kind of singleton sanity check around that JavaScript injection.


  • I can gather & supply more information upon request.
  • Even though the issue might seem like one with JavaScript/React SDK, the underlying logic is spread through the whole project, so I gathered that this repository should be the place to go.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
chadwhitacrecommented, Mar 1, 2022

Okay yeah I’m gonna bump this to the JavaScript SDK team to digest that. 😂

Thanks for the great info!

1reaction
souredoutlookcommented, Jul 28, 2022

Hey @smeubank - @fisprak and others are looking for an update on when submitting user feedback from the user report dialogue via tunnel will be supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting for JavaScript - Sentry Documentation
If you need help solving issues with your Sentry JavaScript SDK integration, ... However, the endpoint blockage can be only resolved using the...
Read more >
Troubleshooting SDK load failure for JavaScript web apps
First lets check for JavaScript exceptions, using a browser that supports developer tools (F12) load the page and review if any exceptions ...
Read more >
XSL Transformations (XSLT) Version 3.0 - W3C
Abstract. This specification defines the syntax and semantics of XSLT 3.0, a language designed primarily for transforming XML documents into ...
Read more >
JavaScript SDK (Legacy) - Amplitude Developer Center
You can install the JavaScript SDK using a small snippet of code that you paste on ... runQueuedFunctions){ console.log("[Amplitude] Error: could not load ......
Read more >
JavaScript policy runtime error troubleshooting | Apigee Edge
The error type RangeError is thrown when you operate on a value or pass a value to a function that is not in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found