René's URL Explorer Experiment


Title: Requests to google apis failing with `Premature close` on 22.23.0 tags · Issue #2544 · nodejs/docker-node · GitHub

Open Graph Title: Requests to google apis failing with `Premature close` on 22.23.0 tags · Issue #2544 · nodejs/docker-node

X Title: Requests to google apis failing with `Premature close` on 22.23.0 tags · Issue #2544 · nodejs/docker-node

Description: We ran into an issue with our deployments using the 22-alpine and 22-slim node js images. It seems the latest push (about 24 hours ago) has produced errors when using googleapis (sheets, trace API, possibly others). I've been able to rep...

Open Graph Description: We ran into an issue with our deployments using the 22-alpine and 22-slim node js images. It seems the latest push (about 24 hours ago) has produced errors when using googleapis (sheets, trace API,...

X Description: We ran into an issue with our deployments using the 22-alpine and 22-slim node js images. It seems the latest push (about 24 hours ago) has produced errors when using googleapis (sheets, trace API,...

Opengraph URL: https://github.com/nodejs/docker-node/issues/2544

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Requests to google apis failing with `Premature close` on 22.23.0 tags","articleBody":"We ran into an issue with our deployments using the `22-alpine` and `22-slim` node js images. It seems the latest push (about 24 hours ago) has produced errors when using googleapis (sheets, trace API, possibly others).\n\nI've been able to reproduce by using the basic quickstart to read from a sheet https://developers.google.com/workspace/sheets/api/quickstart/nodejs#set_up_the_sample (it requires setting up credentials, so I can't provide a simple repo with reproduction.\n\nI'm not sure if this is an issue in the base image or in some random dependency, so direct me if this should be raised elsewhere.\n\n## Environment\n\n* **Platform**: Linux\n* **Docker Version**: 29.5.2\n* **Node.js Version**: v22.23.0\n* **Image Tag**: [22-slim](https://hub.docker.com/layers/library/node/22-slim/images/sha256-dc73bdac873c82e6cbfa496e35dd6e27a20302ebba043d0d9646708df19a9996) (`22-alpine` is also affected,  `22` also fails)\n\n## Expected Behavior\n\nThe googleapis calls should just work, like on the previous image version.\n\n## Current Behavior\n\nThe calls fail with:\n```\n/node_modules/node-fetch/lib/index.js:400\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t\t       ^\nFetchError: Invalid response body while trying to fetch https://www.googleapis.com/oauth2/v4/token: Premature close\n    at Gunzip.\u003canonymous\u003e (/node_modules/node-fetch/lib/index.js:400:12)\n    at Gunzip.emit (node:events:531:35)\n    at emitErrorNT (node:internal/streams/destroy:170:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:129:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:89:21)\n```\n\n## Possible Solution\n\nRolling back to previous version of the image is a workaround, but I'm not sure where the exact issue lies. It might be in the alpine base.\n\n## Steps to Reproduce\n\nSetup the [exmaple](https://developers.google.com/workspace/sheets/api/quickstart/nodejs#set_up_the_sample) google sheet reading node js app:\n - `npm init -y`\n - `npm install googleapis@105 @google-cloud/local-auth@2.1.0 --save`\n - Get credentials by creating an app (or if you have a Google Cloud Project those can be used as well)\n - Setup Dockerfile with node:22-slim (see below)\n - Run the script via docker\n\nMy `index.js` (using Google Cloud Project credentials):\n```js\nimport { GoogleAuth } from 'google-auth-library';\nimport {google} from 'googleapis';\n\n/**\n * Prints the names and majors of students in a sample spreadsheet:\n * @see https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit\n */\nasync function listMajors() {\n  // Authenticate with Google and get an authorized client.\n  // const auth = await authenticate({\n  //   scopes: SCOPES,\n  //   keyfilePath: CREDENTIALS_PATH,\n  // });\n\n  const auth = new GoogleAuth({\n    scopes: 'https://www.googleapis.com/auth/spreadsheets',\n  });\n\n  // Create a new Sheets API client.\n  const sheets = google.sheets({version: 'v4', auth});\n  // Get the values from the spreadsheet.\n  const result = await sheets.spreadsheets.values.get({\n    spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',\n    range: 'Class Data!A2:E',\n  });\n  const rows = result.data.values;\n  if (!rows || rows.length === 0) {\n    console.log('No data found.');\n    return;\n  }\n  console.log('Name, Major:');\n  // Print the name and major of each student.\n  rows.forEach((row) =\u003e {\n    // Print columns A and E, which correspond to indices 0 and 4.\n    console.log(`${row[0]}, ${row[4]}`);\n  });\n}\n\nawait listMajors();\n```\n\nDockerfile\n```Dockerfile\nFROM node:22-slim\n\nCOPY . .\nRUN npm install\nENV GOOGLE_APPLICATION_CREDENTIALS=./credentials.json\n\nCMD [\"node\", \"index.js\"]\n```\n`docker run --rm -it $(docker build -q .)` then results in `FetchError: Invalid response body while trying to fetch https://www.googleapis.com/oauth2/v4/token: Premature close`\n\nRolling the image to https://hub.docker.com/layers/library/node/22.22-slim/images/sha256-16d364eebf6b62da439dc993d9b80940c78b0ca38438452f011ab9a25c752644 is a possible fix, since in that version it just works.\n\nWorking Dockerfile with pinned version:\n```Dockerfile\nFROM node:22-slim@[e21fc383b50d5347dc7a9f1cae45b8f4e2f0d39f7ade28e4eef7d2934522b752](sha256:e21fc383b50d5347dc7a9f1cae45b8f4e2f0d39f7ade28e4eef7d2934522b752)\n\nCOPY . .\nRUN npm install\nENV GOOGLE_APPLICATION_CREDENTIALS=./credentials.json\n\nCMD [\"node\", \"index.js\"]\n```\n","author":{"url":"https://github.com/tomaskallup","@type":"Person","name":"tomaskallup"},"datePublished":"2026-06-19T16:34:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/2544/docker-node/issues/2544"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4f40ad6d-3559-ae20-6dcc-cb77e9e3ff91
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB466:312530:196B85E:23A4C7B:6A4CC05F
html-safe-noncee264335cb33f6f15c122f8e50f4c1999b0704d902c5e0a3da61395a75a38ffb9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDY2OjMxMjUzMDoxOTZCODVFOjIzQTRDN0I6NkE0Q0MwNUYiLCJ2aXNpdG9yX2lkIjoiNjQ5MzgxNjQ4NjkwMDg0MjU5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdb3d27f19cf6ee16639c8f97d96dafe2e12e371df1af7b32a24dbe2ad4d2b354
hovercard-subject-tagissue:4702234591
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/docker-node/2544/issue_layout
twitter:imagehttps://opengraph.githubassets.com/adafbebf604515da6b0209aca43f9bc204d8ed6be62ed8c92e8400b5a8a565af/nodejs/docker-node/issues/2544
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/adafbebf604515da6b0209aca43f9bc204d8ed6be62ed8c92e8400b5a8a565af/nodejs/docker-node/issues/2544
og:image:altWe ran into an issue with our deployments using the 22-alpine and 22-slim node js images. It seems the latest push (about 24 hours ago) has produced errors when using googleapis (sheets, trace API,...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametomaskallup
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/nodejs/docker-node git https://github.com/nodejs/docker-node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27929056
octolytics-dimension-repository_nwonodejs/docker-node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27929056
octolytics-dimension-repository_network_root_nwonodejs/docker-node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec03e7e569190bc89b638cdd4acb4b6c6b38a170a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/docker-node/issues/2544#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fdocker-node%2Fissues%2F2544
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fdocker-node%2Fissues%2F2544
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fdocker-node
Reloadhttps://github.com/nodejs/docker-node/issues/2544
Reloadhttps://github.com/nodejs/docker-node/issues/2544
Reloadhttps://github.com/nodejs/docker-node/issues/2544
Please reload this pagehttps://github.com/nodejs/docker-node/issues/2544
nodejs https://github.com/nodejs
docker-nodehttps://github.com/nodejs/docker-node
Notifications https://github.com/login?return_to=%2Fnodejs%2Fdocker-node
Fork 2k https://github.com/login?return_to=%2Fnodejs%2Fdocker-node
Star 8.6k https://github.com/login?return_to=%2Fnodejs%2Fdocker-node
Code https://github.com/nodejs/docker-node
Issues 35 https://github.com/nodejs/docker-node/issues
Pull requests 13 https://github.com/nodejs/docker-node/pulls
Discussions https://github.com/nodejs/docker-node/discussions
Actions https://github.com/nodejs/docker-node/actions
Security and quality 0 https://github.com/nodejs/docker-node/security
Insights https://github.com/nodejs/docker-node/pulse
Code https://github.com/nodejs/docker-node
Issues https://github.com/nodejs/docker-node/issues
Pull requests https://github.com/nodejs/docker-node/pulls
Discussions https://github.com/nodejs/docker-node/discussions
Actions https://github.com/nodejs/docker-node/actions
Security and quality https://github.com/nodejs/docker-node/security
Insights https://github.com/nodejs/docker-node/pulse
Requests to google apis failing with Premature close on 22.23.0 tagshttps://github.com/nodejs/docker-node/issues/2544#top
nodeNode.js components outside of docker-nodehttps://github.com/nodejs/docker-node/issues?q=state%3Aopen%20label%3A%22node%22
https://github.com/tomaskallup
tomaskalluphttps://github.com/tomaskallup
on Jun 19, 2026https://github.com/nodejs/docker-node/issues/2544#issue-4702234591
https://developers.google.com/workspace/sheets/api/quickstart/nodejs#set_up_the_samplehttps://developers.google.com/workspace/sheets/api/quickstart/nodejs#set_up_the_sample
22-slimhttps://hub.docker.com/layers/library/node/22-slim/images/sha256-dc73bdac873c82e6cbfa496e35dd6e27a20302ebba043d0d9646708df19a9996
exmaplehttps://developers.google.com/workspace/sheets/api/quickstart/nodejs#set_up_the_sample
https://hub.docker.com/layers/library/node/22.22-slim/images/sha256-16d364eebf6b62da439dc993d9b80940c78b0ca38438452f011ab9a25c752644https://hub.docker.com/layers/library/node/22.22-slim/images/sha256-16d364eebf6b62da439dc993d9b80940c78b0ca38438452f011ab9a25c752644
nodeNode.js components outside of docker-nodehttps://github.com/nodejs/docker-node/issues?q=state%3Aopen%20label%3A%22node%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.