Repository navigation
fix(express): disable Node Web Storage in Docker entrypoint - #10245
Open
zahin-mohammad wants to merge 1 commit into
Open
zahin-mohammad wants to merge 1 commit into
zahin-mohammad wants to merge 1 commit into
Conversation
Node 25+ enables the Web Storage API by default. store2 (pulled in by avalanche@3.15.3 via sdk-coin-avaxp) probes `localStorage` at module load, which on Node 26 prints on every boot: ExperimentalWarning: localStorage is not available because --localstorage-file was not provided. Start node with --no-webstorage so `localStorage` is undefined, matching Node 24 behaviour. Nothing in BitGoJS uses Web Storage server-side. Node 24 rejects this flag ("bad option"), so this must ship with or after the Node 26 base image. Ticket: WCN-4966 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
zahin-mohammad
changed the base branch from
WCN-4966-express-node-26
to
master
November 25, 2026 19:13
danielpeng1
approved these changes
Nov 25, 2026
pranishnepal
approved these changes
Nov 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Stacked on #10244 (Node 26 base image). Merge that first. Node 24 rejects this flag (
node: bad option: --no-webstorage) and exits before Express starts, so this must not reachmasterbefore the Node 26 image does. When #10244 merges, GitHub will retarget this PR tomaster.Summary
Starts the Express container with
node --no-webstorage, which removes this warning printed on every boot under Node 26:Why it appears
Node 25+ turns on the Web Storage API (the browser-style
localStorage) by default.--trace-warningsshows where it's triggered:store2is a browser storage helper. It's pulled in byavalanche@3.15.3(the deprecated Avalanche library used bysdk-coin-avaxp), and it checks forlocalStoragewhen it loads. Express loads every coin module at startup, so the warning prints on every boot.Why this fix
typeof localStorageisundefined, the same as on Node 24. No BitGoJS source useslocalStorage, so turning it off changes nothing functionally.--no-warnings=ExperimentalWarningwould hide every experimental warning.--localstorage-filewould turn on real persistent storage, andstore2would start writing to disk.--no-webstorageis the main name in Node 26's--help(--webstorage, --no-experimental-webstorage), so it should keep working if Web Storage stops being experimental.Not covered
Express run from npm or from source on Node 26, and SDK consumers that load
sdk-coin-avaxp, will still see the warning once per process. The real fix is movingsdk-coin-avaxpoffavalanche, which touches 45 imports in 10 files. That's out of scope here.Verification
Rebuilt the image locally (linux/arm64) and ran a 16-request smoke test against it:
All 16 pass, and the
ExperimentalWarningno longer appears in the container logs.Ticket: WCN-4966
🤖 Generated with Claude Code