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 and then docker container exits #485

Open
Digital-Daz opened this issue Nov 28, 2024 · 6 comments
Open

Error and then docker container exits #485

Digital-Daz opened this issue Nov 28, 2024 · 6 comments

Comments

@Digital-Daz
Copy link

🐛 Bug Report

I don't really have a clue what I am doing here, I have run the latest turborepo-remote-cache docker container for one of our developers. The docker container logs an error and then exits.

To Reproduce

Steps to reproduce the behavior:

On the client machine run:

yarn build

Expected behavior

My understanding is that the project should build using the cache. On the server the docker container stops and the logs show an error and the container exiting.

{"severity":"WARNING","level":40,"time":1732811879160,"pid":7,"hostname":"eda93ca66d59","reqId":"vlmmVlOsSpqkIWaEn0R4Jw-0","err":{"type":"Error","message":"Artifact not found","stack":"Error: Artifact not found\n    at Object.handler (/home/app/node/src/plugins/remote-cache/routes/get-artifact.ts:39:13)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","data":{"type":"Error","message":"Artifact one/57f04dbab442eea6 doesn't exist.","stack":"Error: Artifact one/57f04dbab442eea6 doesn't exist.\n    at <anonymous> (/home/app/node/src/plugins/remote-cache/storage/index.ts:118:25)\n    at /home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/service-object.js:146:21\n    at /home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/service-object.js:185:17\n    at /home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/service-object.js:205:13\n    at /home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:417:25\n    at Util.handleResp (/home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:165:9)\n    at /home/app/node/node_modules/.pnpm/@[email protected]/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:536:22\n    at onResponse (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/retry-request/index.js:240:7)\n    at <anonymous> (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/teeny-request/src/index.ts:333:11)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"},"isBoom":true,"isServer":false,"output":{"statusCode":404,"payload":{"statusCode":404,"error":"Not Found","message":"Artifact not found"},"headers":{}}},"message":"Artifact not found"}
{"severity":"INFO","level":30,"time":1732811879174,"pid":7,"hostname":"eda93ca66d59","reqId":"vlmmVlOsSpqkIWaEn0R4Jw-0","res":{"statusCode":404},"responseTime":247.91560792922974,"message":"request completed"}
{"severity":"ERROR","level":50,"time":1732811879394,"pid":7,"hostname":"eda93ca66d59","err":{"type":"TypeError","message":"Cannot read properties of null (reading 'length')","stack":"TypeError: Cannot read properties of null (reading 'length')\n    at getStateLength (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/stream-shift/index.js:16:28)\n    at shift (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/stream-shift/index.js:6:99)\n    at Duplexify._forward (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/duplexify/index.js:170:35)\n    at PassThrough.onreadable (/home/app/node/node_modules/.pnpm/[email protected]/node_modules/duplexify/index.js:136:10)\n    at PassThrough.emit (node:events:519:28)\n    at PassThrough.emit (node:domain:488:12)\n    at emitReadable_ (node:internal/streams/readable:832:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)"},"message":"Cannot read properties of null (reading 'length')"}
{"severity":"INFO","level":30,"time":1732811879394,"pid":7,"hostname":"eda93ca66d59","message":"[undefined] Gracefully closing the server instance."}

Your Environment

  • OS: Linux
  • Cloud Vendor: GCP
  • Turbo Version: 2.3.3
  • turborepo-remote-cache:2.2.7
@Klaitos
Copy link
Contributor

Klaitos commented Dec 2, 2024

Also encountering this error frequently on my docker on premise. This is causing some 503 errors following the graceful shutdown :/

@fox1t
Copy link
Contributor

fox1t commented Dec 2, 2024

It seems something related to the missing cache hit.
Can you elaborate on "I have run the latest turborepo-remote-cache docker container for one of our developers"? This sentence doesn't make much sense to me.

@Digital-Daz
Copy link
Author

Hi, all that means is that I do not understand any of this myself. One of our front end developers asked that I implement this for him.

I do not understand these error messages, I am not familiar with these technologies.

@guillaumewuip
Copy link

I'm reproducing the issue too.

Investigating a bit, it's apparently caused by a dependency of @google-cloud/storage: googleapis/nodejs-storage#2368 when used with Node.js version greater than 20.10

@Klaitos
Copy link
Contributor

Klaitos commented Jan 9, 2025

I've made a small overrides to fix this issue #499

@guillaumewuip
Copy link

In the meantime, I've mitigated the issue by rollbacking to turborepo-remote-cache 2.1.0 and I confirm this fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants