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

Postinstall script fails with ECONNRESET #23927

Open
lucasavila00 opened this issue Apr 23, 2024 · 8 comments
Open

Postinstall script fails with ECONNRESET #23927

lucasavila00 opened this issue Apr 23, 2024 · 8 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: postinstall

Comments

@lucasavila00
Copy link

Bug description

Similar to what has been reported before #20193

We're seeing lots of CI jobs failures because of this. Retrying the jobs make it work.

I'd appreciate if prisma could retry it on it's own when download fails. Similar to what was suggested on #23325

How to reproduce

Installing prisma with NPM

Expected behavior

No response

Prisma information

It fails to install

Environment & setup

Ubuntu 22, Hetzner Servers in Germany, Gitlab CI

Prisma Version

prisma                  : 4.16.2
@prisma/client          : Not found
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81
Default Engines Hash    : 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81
Studio                  : 0.484.0
@lucasavila00 lucasavila00 added the kind/bug A reported bug. label Apr 23, 2024
@lucasavila00
Copy link
Author

Feel free to close this. I'd like to report the issues so other users and Prisma team know about it.

@maxkaido
Copy link

i can confirm the same problem on hetzner server

@dgellow
Copy link

dgellow commented Apr 23, 2024

Hi, we are facing the same problem in GitHub workflows.

. postinstall: > PRISMA_GENERATE_SKIP_AUTOINSTALL=true prisma generate
. postinstall: Prisma schema loaded from ../shared/prisma/schema.prisma
. postinstall: node:internal/process/promises:289
. postinstall:             triggerUncaughtException(err, true /* fromPromise */);
. postinstall:             ^
. postinstall: Error: read ECONNRESET
. postinstall:     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
. postinstall:   errno: -104,
. postinstall:   code: 'ECONNRESET',
. postinstall:   syscall: 'read',
. postinstall:   attemptNumber: 1,
. postinstall:   retriesLeft: 2
. postinstall: }

@maxkaido
Copy link

 remote: [4/4] Building fresh packages...        
remote: error /app/node_modules/@prisma/engines: Command failed.        
remote: Exit code: 1        
remote: Command: node scripts/postinstall.js        
remote: Arguments:         
remote: Directory: /app/node_modules/@prisma/engines        
remote: Output:        
remote: node:internal/process/promises:289        
remote:             triggerUncaughtException(err, true /* fromPromise */);        
remote:             ^        
remote:         
remote: Error: read ECONNRESET        
remote:     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {        
remote:   errno: -104,        
remote:   code: 'ECONNRESET',        
remote:   syscall: 'read',        
remote:   attemptNumber: 1,        
remote:   retriesLeft: 2        
remote: }        

@maxkaido
Copy link

I've updated prisma to the latest version 5.13 and issue gone

@Weakky Weakky added team/client Issue for team Client. kind/bug A reported bug. kind/improvement An improvement to existing feature and code. tech/typescript Issue for tech TypeScript. topic: postinstall and removed kind/bug A reported bug. labels Apr 24, 2024
@RobertCraigie
Copy link

We're still running into this frequently even with multiple retries configured for the pnpm install step and on v5.13

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. and removed kind/improvement An improvement to existing feature and code. labels Apr 24, 2024
@Jolg42
Copy link
Member

Jolg42 commented Apr 24, 2024

I guess this is related to the current status of Cloudflare https://www.cloudflarestatus.com/

I'm sorry for the issue you experienced today.
Are you still experiencing this issue now?
I'm traveling and I cannot do much for now, I'm hoping this is already resolved.

I'll definitely discuss this with my colleagues tomorrow.

@RobertCraigie
Copy link

Thankfully we've managed to workaround this by re-routing traffic through different IPs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: postinstall
Projects
None yet
Development

No branches or pull requests

7 participants