Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on startup with arm64 Docker image with Node > 20.12 #948

Open
AndrewFerr opened this issue Jun 21, 2024 · 2 comments
Open

Error on startup with arm64 Docker image with Node > 20.12 #948

AndrewFerr opened this issue Jun 21, 2024 · 2 comments
Assignees
Labels
Docker Involves docker T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@AndrewFerr
Copy link
Member

Deploying the 5.4.0 Docker image on an arm64 deployment hits this crash on startup:

TypeError: request.headers.split is not a function
    at setHeadersOnRequest (/usr/bin/matrix-hookshot/node_modules/@sentry/node/cjs/integrations/undici/index.js:248:39)
    at _onRequestCreate (/usr/bin/matrix-hookshot/node_modules/@sentry/node/cjs/integrations/undici/index.js:158:9)
    at Channel.publish (node:diagnostics_channel:143:9)
    at new Request (node:internal/deps/undici/undici:6295:27)
    at [dispatch] (node:internal/deps/undici/undici:9077:25)
    at Intercept (node:internal/deps/undici/undici:8812:20)
    at [Intercepted Dispatch] (node:internal/deps/undici/undici:5673:16)
    at Client.dispatch (node:internal/deps/undici/undici:5689:44)
    at [dispatch] (node:internal/deps/undici/undici:5920:32)
    at [Intercepted Dispatch] (node:internal/deps/undici/undici:5666:33)
    at Pool.dispatch (node:internal/deps/undici/undici:5689:44)
    at [dispatch] (node:internal/deps/undici/undici:9499:27)
    at Intercept (node:internal/deps/undici/undici:8812:20)
    at [Intercepted Dispatch] (node:internal/deps/undici/undici:5673:16)
    at Agent.dispatch (node:internal/deps/undici/undici:5689:44)
    at node:internal/deps/undici/undici:10485:55

Interestingly, this even happens with a rebuilt image of 5.3.0, which uses a newer version of Node (20.14.0) than was used in the release build from back in April (20.12.2).

Rebuilding 5.4.0 with the older version of Node bypasses this error, so it looks like there is a Node-specific issue with the undici library.

A workaround is to cut a patch release that pins the node:20-slim base image on the working Node version. The true cause of this should be diagnosed to avoid potentially hitting this error when inevitably moving to the next Node version.

@AndrewFerr AndrewFerr added T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. Docker Involves docker labels Jun 21, 2024
@AndrewFerr AndrewFerr self-assigned this Jun 21, 2024
@AndrewFerr AndrewFerr changed the title Error on startup with arm64 Docker image with Node 20.14.0 Error on startup with arm64 Docker image with Node > 20.12 Jun 21, 2024
@AndrewFerr
Copy link
Member Author

The same crash happens with Node 20.13.1.

@Half-Shot
Copy link
Contributor

Looks like getsentry/sentry-javascript#10936

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Involves docker T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

2 participants