Pin Node to 22.22.3 to fix firebase preview deploy auth#216
Merged
Conversation
firebase-tools@latest (15.22.0) fails service-account authentication with a 'Premature close' error when fetching the OAuth2 token, breaking the preview deploy. Pin to a known-good release. Signed-off-by: Tamal Saha <tamal@appscode.com>
The preview deploy failed with 'Premature close' during firebase service-account auth. Root cause is a Node.js regression (nodejs/node#63989) shipped in Node 22.23.0 and 24.17.0, which breaks keep-alive socket reuse in node-fetch -- the transport used by google-auth-library/gaxios. It is independent of the firebase-tools version. CI was running Node 22.23.0; pin to 22.22.3 (latest known-good) until a fixed Node release lands. Signed-off-by: Tamal Saha <tamal@appscode.com>
|
Visit the preview URL for this PR (updated for commit adcbf09): https://appscode-v3-hugo--pr216-fix-firebase-preview-dm879ai8.web.app (expires Sun, 28 Jun 2026 11:16:53 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 1720b7810a846fabdac7ca3b944d0f3a577e94de |
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.
Problem
The preview deploy job fails during Firebase authentication:
The "Failed to authenticate" line is a misleading catch-all; the real error is the
Premature closeon the OAuth2 token fetch.Root cause (verified)
A Node.js regression — nodejs/node#63989 — shipped in the same-day security releases Node 22.23.0 and 24.17.0. It breaks keep-alive socket reuse, which surfaces as
ERR_STREAM_PREMATURE_CLOSEinnode-fetch@2— the transport used transitively bygoogle-auth-library→gaxios→node-fetch. The firebase service-account token exchange runs through exactly this path, so auth fails.Key points:
check-latest: truepulled the latest 22.x).Fix
Pin
actions/setup-nodeto22.22.3(latest known-good 22.x) and dropcheck-latest. Revert tocheck-latest/floating once a fixed Node release lands.Fixes the failure in run 27901671685.