Node stack parser splits anonymous frames at ` (` inside the file path (`C:\Program Files (x86)\...`, `My App (beta)/...`)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- backend, observability
Research direction
Read packages/core/src/utils/node-stack-trace.ts and inspect FULL_MATCH; the report also says the browser chromeStackLineParser has the same split. Reproduce with the supplied anonymous V8 frames whose file paths contain ( and check both parsers. Done when these frames retain the full filename and are parsed as anonymous frames, while named frames still parse correctly.
Written by the indexing model from the issue text.
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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
11.11.0 (also develop 6c6c040256)
Framework Version
Node.js v26.13.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
/home/me/My App (beta)/index.js:
const { defaultStackParser } = require("@sentry/node");
try {
[1].forEach(() => {
throw new Error("boom");
});
} catch (err) {
console.log(err.stack.split("\n")[1]);
const top = defaultStackParser(err.stack).pop();
console.log(top.filename, "|", top.function, top.lineno, top.colno);
}
Steps to Reproduce
Run node index.js from a directory whose path contains a space followed by (. The same happens for any anonymous V8 frame such as at C:\Program Files (x86)\MyApp\index.js:2:9 or at async /home/me/My App (beta)/index.js:2:9.
Expected Result
at /home/me/My App (beta)/index.js:4:11
/home/me/My App (beta)/index.js | ? 4 11
Actual Result
at /home/me/My App (beta)/index.js:4:11
beta)/index.js | /home/me/My App 4 11
Parsing at C:\Program Files (x86)\MyApp\index.js:2:9 returns {"function":"C:\\Program Files","filename":"x86)\\MyApp\\index.js","in_app":false}. Named frames (at main (/home/me/My App (beta)/index.js:5:3)) are parsed as expected.
Additional Context
FULL_MATCH in packages/core/src/utils/node-stack-trace.ts is /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; the optional lazy (.+?)\s+\( function-name group matches up to the first ( in the path even when the line has no name ( prefix. The truncated filename no longer starts with / or a Windows drive letter, so filenameIsInApp also returns false, and source map lookup and code context fail for these frames. The browser chromeStackLineParser shows the same split for Node-style frames.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Credit: https://ucsbplse.github.io/
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 1.9k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 637
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-javascript
-
Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-javascript#26203 · 1 comment ·
Maintainers usually reply within 1 day
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)Possibly taken @andreiborza claimed this 2 days ago. OpenBug Cloudflare Workers Spans Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-javascript#26120 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Only create Nuxt database and storage spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenImprovement Nuxt
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
getsentry/sentry-javascript#25805 · 3 comments ·
Maintainers usually reply within 1 day
-
Only create Cloudflare storage and D1 db spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenCloudflare Workers Improvement Spans
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-javascript#25804 · 1 comment ·
Maintainers usually reply within 1 day
-
Only create aws-sdk DynamoDB db spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenBug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-javascript#25801 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-javascript
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bytedance/flowgram.ai#1235 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
devswha/herdr-web-ui#3325 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
desktop v3 windows
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
esengine/DeepSeek-Reasonix#15016 · 1 comment ·
Maintainers usually reply within 1 day