Title: Browser stack parser gets confused by '(' in function names · Issue #26205 · getsentry/sentry-javascript · GitHub
Open Graph Title: Browser stack parser gets confused by '(' in function names · Issue #26205 · getsentry/sentry-javascript
X Title: Browser stack parser gets confused by '(' in function names · Issue #26205 · 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/26205
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Browser stack parser gets confused by '(' in function names","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\n11.11.0 (@sentry/browser, @sentry/wasm); 5.4.1 (@sentry/vite-plugin)\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\nhttps://medmunds.sentry.io/issues/7834537385/events/147e4b1014e14ded8a52603555cab96a/\n\n### Reproduction Example/SDK Setup\n\nInit:\n* Main thread: https://github.com/medmunds/puzzles-web/blob/main/src/utils/sentry.ts#L19\n* Worker thread + wasm integration: https://github.com/medmunds/puzzles-web/blob/main/src/puzzle/worker.ts#L5-L11\n* sentryVitePlugin: https://github.com/medmunds/puzzles-web/blob/main/vite.config.ts#L352-L371\n\n### Steps to Reproduce\n\n1. Create a JS app with a function that includes `(` in the name. E.g., `methodCaller\u003c (emscripten::val) => void>`, which is the actual name of an Emscripten-generated wasm-to-JS bridge function.\n\n Note that Emscripten with `-sDYNAMIC_EXECUTION=0` generates these `methodCaller` bridge functions and sets their names to [show the full C method signature](https://github.com/emscripten-core/emscripten/blob/0710e809aa240e993925232711272d631c1445c4/src/lib/libemval.js#L326-L327).\n\n For testing purposes, you can skip the whole Emscripten/wasm toolchain and just mimic [what Emscripten does](https://github.com/emscripten-core/emscripten/blob/0710e809aa240e993925232711272d631c1445c4/src/lib/libcore.js#L72):\n\n ```js\n function methodCaller(val) {\n throw new Error(\"test error\");\n }\n Object.defineProperty(methodCaller, \"name\", { value: \"methodCaller\u003c (emscripten::val) => void>\" });\n ```\n \n2. Build your app and upload sourcemaps to Sentry. (I'm using `@sentry/vite-plugin`, but I don't think it's relevant to the issue.)\n\n3. Cause an exception to be logged while that function is on the stack.\n\n4. Examine the recorded stack trace in Sentry.\n\nHere's an actual raw stack trace that Sentry has trouble parsing. Note the `methodCaller` frame:\n\n```\nTypeError: Cannot create property 'imageData' on boolean 'false'\n at Drawing.blitterFree (../src/puzzle/drawing.ts:273:13)\n at methodCaller\u003c (emscripten::val) => void> (https://puzzles.twistymaze.com/assets/worker-BBxJRpa6.js:1:43074)\n at wasmImports._emval_invoke (../src/assets/puzzles/emcc-runtime.js:1:52388)\n inertia-BCZY8y8t.wasm0x2299c null (/assets/inertia-BCZY8y8t.wasm)\n inertia-BCZY8y8t.wasm0x194cc null (/assets/inertia-BCZY8y8t.wasm)\n inertia-BCZY8y8t.wasm0x1bfd1 null (/assets/inertia-BCZY8y8t.wasm)\n inertia-BCZY8y8t.wasm0x13ad6 null (/assets/inertia-BCZY8y8t.wasm)\n inertia-BCZY8y8t.wasm0x21703 null (/assets/inertia-BCZY8y8t.wasm)\n inertia-BCZY8y8t.wasm0x216b4 null (/assets/inertia-BCZY8y8t.wasm)\n at Frontend.size (../src/assets/puzzles/emcc-runtime.js:1:21293)\n at WorkerPuzzle.size (../src/puzzle/worker.ts:241:26)\n at callback (../node_modules/.pnpm/comlink@4.4.2/node_modules/comlink/dist/esm/comlink.mjs:103:48)\n```\n\n### Expected Result\n\nSentry should be able to parse the correct filename from the stack trace (`https://puzzles.twistymaze.com/assets/worker-BBxJRpa6.js` in the trace above example above).\n\nAnd Sentry should be able to link the stack frame back to the uploaded sourcemap by debug id.\n\n### Actual Result\n\nSentry incorrectly parses the filename as everything between the _outermost_ `(...)` on a stack frame line. (In the example above, it thinks the filename/uri is `emscripten::val) => void> (https://puzzles.twistymaze.com/assets/worker-BBxJRpa6.js`.)\n\n\u003cimg width=\"712\" height=\"91\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2b1b71fd-19da-4ac1-85cd-5af3747c498b\" />\n\n\u003cimg width=\"567\" height=\"299\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3de6c5a5-7899-4556-b66a-e278b305656a\" />\n\n### Additional Context\n\n#26202 is essentially the same issue in `@sentry/node`. This part of stack parsing is not shared between `@sentry/browser` and `@sentry/node`, so I've opened this as a separate issue against `@sentry/browser`.\n\nThe example event here originated in Chrome Mobile WebView 150.0.7871 Android 13, but the stack parsers for all browsers should be reviewed as they seem to use similar regex captures.\n\n(If there is other textual stack trace parsing elsewhere in Sentry, it would be a good idea to review it for similar problems on any platforms where displayed function names can be set to arbitrary strings.)\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/medmunds","@type":"Person","name":"medmunds"},"datePublished":"2026-11-08T18:44:43Z","url":"https://github.com/getsentry/sentry-javascript/issues/26205"}
| 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:2f3c05ca-21c8-3f2b-1a70-e0214a9d96a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F56:27A224:1F99B5:2A6DC2:6B04319A |
| html-safe-nonce | 3c7e59169d34d98775f98681f228ed7cb998b57461323e02567ec7f05b80b1da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjU2OjI3QTIyNDoxRjk5QjU6MkE2REMyOjZCMDQzMTlBIiwidmlzaXRvcl9pZCI6IjM5NjU4MDc1NDg3MzkyMTk0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0c966cb820d084835c03e09efd2b163c06d2c04a0596d4f20dd6b52f1433b501 |
| hovercard-subject-tag | issue:6274312273 |
| 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/26205/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71b04dd661294022f2cfd1d54f809ac408fcbc23f6616ddd3ae1d9e3351a80bd/getsentry/sentry-javascript/issues/26205 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71b04dd661294022f2cfd1d54f809ac408fcbc23f6616ddd3ae1d9e3351a80bd/getsentry/sentry-javascript/issues/26205 |
| 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 | medmunds |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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