Title: Sentry.lastEventId() doesn't work on SSR · Issue #19217 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry.lastEventId() doesn't work on SSR · Issue #19217 · getsentry/sentry-javascript
X Title: Sentry.lastEventId() doesn't work on SSR · Issue #19217 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/19217
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry.lastEventId() doesn't work on SSR","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/browser\n\n### SDK Version\n\nv10.37.0 \n\n### Framework Version\n\nv15.4.5 \n\n### Link to Sentry event\n\nI cannot provide URL at the moment, but this is the event ID `61acc185103343af8dcb1621464fd566` if it doesn't work let me know to provide you URL\n\n### Reproduction Example/SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\nI don't know! When an error happen in CSR (browser) everything works well, but for SSR (node) lastEventId doesn't work\n\n### Expected Result\n\nSentry should capture errors and the `Sentry.lastEventId()` should return a string and in the Sentry dashboard , we should find the event by searching `id:EVENT_ID`\n\n### Actual Result\n\nClosely related to https://github.com/getsentry/sentry-javascript/issues/19166\n\nwhen I search `id:EVENT_ID` in Sentry dashboard in All Issues tab, it doesn't list the issue and \n\n- For the id returned by `captureException` it shows `Error lading chart data`\n- I copied `captureUnderscoreErrorException` to my repo and changed it to return event ID, in Sentry dashboard search leads to `Error fetching releases` error\n\n\nI have a few different projects and they use different version of Next.js and Sentry, I don't want to add many details here, the important part is that \n\n1. on Next.js v14.2.29 and SDK v8.3.0everything works well\n2. but on Next.js v15.4.5 and SDK v10.37.0 only client-side error capturing works and server-side doesn't work well and [I cannot find the event-id of the server-side error](https://github.com/getsentry/sentry-javascript/issues/19166#issuecomment-3849069673)\n\nSentry.lastEventId() also doesn't work in SDK v10.37.0 but works on SDK v8.3.0\n\n\n### Additional Context\n\n_No response_\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/Asghar-Lyft","@type":"Person","name":"Asghar-Lyft"},"datePublished":"2026-02-06T16:23:50Z","url":"https://github.com/getsentry/sentry-javascript/issues/19217"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c20b9309-7045-1463-0d93-a6456cde5dbf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EADA:2D0B15:9B690A:D3E87D:6B048201 |
| html-safe-nonce | ea94c447e2e30ceb40e54189e4e0378e6e4aeb089994ef5fd849fdc846af77b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQURBOjJEMEIxNTo5QjY5MEE6RDNFODdEOjZCMDQ4MjAxIiwidmlzaXRvcl9pZCI6IjM3NjY2NjQ5MDQ2NTk3NjgzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e52fc50b5026f4dc553a732179237ae0ff79f10bb7653695db1f5760e7e228be |
| hovercard-subject-tag | issue:3907477789 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/19217/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2ffe129c77c2ee9c9ec165c301a82d22bc66cb8c7a4021417dff6d8ab3614e99/getsentry/sentry-javascript/issues/19217 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2ffe129c77c2ee9c9ec165c301a82d22bc66cb8c7a4021417dff6d8ab3614e99/getsentry/sentry-javascript/issues/19217 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Asghar-Lyft |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ed3f2e01f6b7672780c586c8af0e72726374d7b6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width