Skip to content

RangeError: The value of "offset" is out of range (ANR) #9307

Closed
@ollipa

Description

@ollipa

Is there an existing issue for this?

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

Package: nodeIssues related to the Sentry Node SDK

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions