Repository navigation
Closed
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
7.74.0
Framework Version
Node v18.17.1
SDK Setup
ANR is enabled with these settings:
Sentry.enableAnrDetection({
captureStackTrace: true,
anrThreshold: 1000,
});Steps to Reproduce
We enabled ANR a few days ago and this error just popped up. Not sure how to reproduce.
Expected Result
RangeError should not be raised or reported.
Actual Result
Sentry reported an issue that seems to originate from Sentry ANR related code:
RangeError: The value of "offset" is out of range. It must be >= 0 and <= 0. Received 1
File "node:internal/errors", line 405, col 5, in new NodeError
File "node:internal/buffer", line 88, col 9, in boundsError
File "node:internal/buffer", line 254, col 5, in Buffer.readUInt8
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 83, col 29, in parseFrame
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 254, col 19, in WebSocketInterface._addBuffer
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 226, col 16, in WebSocketInterface._completeFrame
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 258, col 12, in WebSocketInterface._addBuffer
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 226, col 16, in WebSocketInterface._completeFrame
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 258, col 12, in WebSocketInterface._addBuffer
File "app:///../node_modules/@sentry/node/cjs/anr/websocket.js", line 226, col 16, in WebSocketInterface._completeFrame
Metadata
Metadata
Assignees
Labels
No labels
Projects
- StatusShow more project fieldsNo status
Activity
AbhiPrasad commentedon Oct 19, 2023
Hey @ollipa - are you able to provide a link to the Sentry error so we can debug a little further? You can also email it to me.
From looking at the error message, it seems that we should have a condition for making sure the buffer has length > 0 before attempting to search it for a frame. Let me try PRing a fix for that!
Otherwise, how is the ANR monitoring? Did you catch any issues with it yet?
ollipa commentedon Oct 20, 2023
@AbhiPrasad, thank you for the quick response and a fix to the issue. I sent you an email to the email address in your Github profile.
AbhiPrasad commentedon Oct 20, 2023
Hey @ollipa, thanks for the email! I've opened two GH issue to follow up on the issues you brought up there, and backlogged them. Will update this GH issue once the release with the fix is out as well.
AbhiPrasad commentedon Oct 24, 2023
Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/7.75.0