Skip to content

Next.js client monitoring not working in EU region #11559

Closed

Description

@jkytomak

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Install sentry:
"@sentry/nextjs": "^7.109.0",
and create organization in EU region and point it there.

Next version in use is:
"next": "^12.3.4",

Expected Result

Client can send Sentry events via server to Sentry EU.

Actual Result

Server monitoring works fine, but client gets from /api/monitoring requests this response:

403 Forbidden
{"detail":"event submission rejected with_reason: ProjectId"}

If I change the client dsn to old US one, client monitoring works.

Product Area

Replays and Issues

Link

ORG_SLUG: humbol

DSN

No response

Version

No response

Activity

  1. getsantry commented on Apr 11, 2024

    @getsantry

    Assigning to @getsentry/support for routing ⏲️

  2. changed the title [-]Next.js client (non Vercel) monitoring not working in EU region[/-] [+]Next.js client monitoring not working in EU region[/+] on Apr 11, 2024
  3. moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 2on Apr 11, 2024
  4. lforst commented on Apr 12, 2024

    @lforst
    Contributor

    I assume you are using the tunnelRoute option. Can you double check whether you are indeed on version 7.109.0 and maybe share one of these requests from the network tab? Thank you!

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Apr 12, 2024
  6. jkytomak commented on Apr 12, 2024

    @jkytomak
    Author

    Yes, we are using tunnelRoute: '/api/monitoring',

    Here is request:

    {"sent_at":"2024-04-12T07:26:44.933Z","sdk":{"name":"sentry.javascript.nextjs","version":"7.109.0"},"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
    {"type":"session"}
    {"sid":"8680b5846b0e4cc7ac08cd0dfa0c3838","init":false,"started":"2024-04-12T07:26:31.872Z","timestamp":"2024-04-12T07:26:44.933Z","status":"exited","errors":0,"did":"f97c6f00-0b7b-4375-819d-f0ceee97f284","attrs":{"release":"v2024.4.11-3-jyri-29_add_client_monitoring","environment":"qa.humbol.app","user_agent":"Mozilla/5.0 
    (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}}
    

    Second one:

    {"sent_at":"2024-04-12T07:26:44.933Z","sdk":{"name":"sentry.javascript.nextjs","version":"7.109.0"},"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
    {"type":"session"}
    {"sid":"1fd6db503b724711a6541ba26ca0bd9a","init":true,"started":"2024-04-12T07:26:44.933Z","timestamp":"2024-04-12T07:26:44.933Z","status":"ok","errors":0,"did":"f97c6f00-0b7b-4375-819d-f0ceee97f284","attrs":{"release":"v2024.4.11-3-jyri-29_add_client_monitoring","environment":"qa.humbol.app","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"}}
    

    Skipped ones return 200 from our server:

    {"dsn":"https://603274cecaa62d8b2824d81d1ab8dc43@o4507050875748352.ingest.de.sentry.io/4507051030282320"}
    {"type":"client_report"}
    {"timestamp":1712906791.743,"discarded_events":[{"reason":"sample_rate","category":"transaction","quantity":2}]}
    

    PS. you can try yourself from our QA env. Note: Sentry is not all the time there, because it's not yet merged to master.

    Yes, we have 7.109.0:

    $ grep sentry yarn.lock 
    "@sentry-internal/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.109.0.tgz#4657d7f36a1de3be466f42735d295e212b7eca11"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry-internal/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.109.0.tgz#9a00857994a9487428296feed4a9ddf2d62bab84"
        "@sentry/core" "7.109.0"
        "@sentry/replay" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry-internal/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.109.0.tgz#3effaa132c41a65378fa98146aea61228d528953"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.109.0.tgz#13b2623f43047f292cf7d6070128a7501e008693"
        "@sentry-internal/feedback" "7.109.0"
        "@sentry-internal/replay-canvas" "7.109.0"
        "@sentry-internal/tracing" "7.109.0"
        "@sentry/core" "7.109.0"
        "@sentry/replay" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/cli@^1.77.1":
      resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.77.3.tgz#c40b4d09b0878d6565d42a915855add99db4fec3"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.109.0.tgz#7a02f4af4a676950f6555f552a2a232d4458fcd5"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.109.0.tgz#36f8233f55e6b0d4bdb7e7466714575a1d65f3cf"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/nextjs@^7.109.0":
      resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.109.0.tgz#f29c62e5a7581ee20f9add73b1de7c2cd3667b3b"
        "@sentry/core" "7.109.0"
        "@sentry/integrations" "7.109.0"
        "@sentry/node" "7.109.0"
        "@sentry/react" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
        "@sentry/vercel-edge" "7.109.0"
        "@sentry/webpack-plugin" "1.21.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.109.0.tgz#dbf152212e42a9b1648ff758ec5bffcb6bb0fa49"
        "@sentry-internal/tracing" "7.109.0"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.109.0.tgz#ae8a2950d2022e83f1bccd8b994f0096f3dd1682"
        "@sentry/browser" "7.109.0"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.109.0.tgz#f50fb0140c81fce660c44cc93c35988898b8348b"
        "@sentry-internal/tracing" "7.109.0"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.109.0.tgz#d8778358114ed05be734661cc9e1e261f4494947"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.109.0.tgz#7078e1400197abc1b0c436679bef980639500a86"
        "@sentry/types" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-7.109.0.tgz#4e3e1fd5b05be3a59ddc6d6b40407dd929f75b3d"
        "@sentry-internal/tracing" "7.109.0"
        "@sentry/core" "7.109.0"
        "@sentry/types" "7.109.0"
        "@sentry/utils" "7.109.0"
    "@sentry/[email protected]":
      resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.21.0.tgz#bbe7cb293751f80246a4a56f9a7dd6de00f14b58"
        "@sentry/cli" "^1.77.1"
    
  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Apr 12, 2024
  8. lforst commented on Apr 12, 2024

    @lforst
    Contributor

    Interesting. These seem to be Session event payloads. If you trigger an error event, does it also get the 403 response?

    Also, can you try removing the tunnelRoute option as a workaround?

  9. 31 remaining items

  10. lforst commented on Apr 12, 2024

    @lforst
    Contributor

    @jkytomak Please disable tunnelRoute for now as a workaround until we have the fix released. Afterwards you can upgrade and the issue should be resolved. Thanks for reporting this and sticking with us. I'll make sure the release goes out on Monday first thing.

  11. billypap1 commented on Apr 14, 2024

    @billypap1

    I have the same issue using @sentry/browser. I migrated my projects from US to EU and it doesn't capture Web Vitals. The performance score is always 0.

  12. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Apr 14, 2024
  13. johnrobeds commented on Apr 15, 2024

    @johnrobeds

    I have the same issue on 7.110.0, although it seems to be an ephemeral issue. I have seen it working in a small number of sessions.

  14. lforst commented on Apr 16, 2024

    @lforst
    Contributor

    Hi again, yesterday we released version 7.110.1 which should fix this issue. Would you mind trying it out? Thank you!

  15. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Apr 16, 2024
  16. jkytomak commented on Apr 16, 2024

    @jkytomak
    Author

    Works for us now. Thank you.

  17. johnrobeds commented on Apr 16, 2024

    @johnrobeds

    Works for us now too. Thank you

  18. andreamaiolo commented on Apr 16, 2024

    @andreamaiolo

    Hi, we are experiencing a similar problem using the @sentry/browser package. We have the tunnel option enabled and have had no issues so far. However, the data for the INP parameter is not being sent, even though our express server receives the envelope correctly, as it does for other events. By disabling the tunnel option, the INP parameter is available on the Sentry dashboard. Do you have any clue? Thanks

  19. AbhiPrasad commented on Apr 16, 2024

    @AbhiPrasad
    Contributor

    @andreamaiolo could you open a new GH issue? We can investigate it from there, thanks!

  20. lforst commented on Apr 17, 2024

    @lforst
    Contributor

    @andreamaiolo I think your particular problem relates to this issue getsentry/sentry#69089 posted by @billypap1 and not the one in this thread.

  21. andreamaiolo commented on Apr 17, 2024

    @andreamaiolo

    Thank you both, I have opened this separate issue: #11646

    We only encounter the problem when using the tunnel option. By deactivating it we see the INP parameter on the dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions