getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.68k stars 1.49k forks source link

Crash-Report Modal 404s with EU DSN #11813

Closed Fwang36 closed 3 weeks ago

Fwang36 commented 3 weeks ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.112.2

Framework Version

next 13

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

I tested in Nextjs, but the user who originally reported it is using Angular-ivy 112.2

  1. Set up Crash Report Modal
  2. Insert EU dsn to init.
  3. call showReportDialog()
  4. GET request 404s

Expected Result

Crash Report Modal to show

Actual Result

Screenshot 2024-04-26 at 9 28 04 AM

Changing the DSN back to a US DSN will work immediately.

AbhiPrasad commented 3 weeks ago

I guess Sentry doesn't route the URL here properly.

https://github.com/getsentry/sentry/blob/fba77f6a0215dcfca40bd0282e3efb52c638c16f/src/sentry/web/frontend/error_page_embed.py#L76-L77

markstory commented 3 weeks ago

Shouldn't https://github.com/getsentry/sentry-javascript/blob/d381ace59eece2697925b6430af0091e9589503b/packages/core/src/api.ts#L52 be using the host name from the DSN to generate the URL to fetch the error page from? I can patch the server for this, but I would have thought that the DSN would have been enough to get the correct behavior here.

markstory commented 3 weeks ago

Server fix https://github.com/getsentry/sentry/pull/69815

markstory commented 3 weeks ago

The fix for the server endpoints has been deployed, this scenario should be working now for EU organizations.