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

Prisma fails to build due to suddenly missing binaries (debian-openssl-3.0.x/prisma-fmt.gz) #16246

Closed
judehunter opened this issue Nov 12, 2022 · 3 comments
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: openssl

Comments

@judehunter
Copy link

judehunter commented Nov 12, 2022

Bug description

Hello,
I am maintaining a project that uses a legacy version of Prisma from back in the day ("@prisma/client": "^2.11.0", "@prisma/cli": "^2.11.0"). Now I understand this is likely beyond the scope of any support, but I would still like to ask if anything could be done to solve the problem described below, as it seems to be an issue with some kind of CDN on the prisma side.

Moreover, this error could be affecting newer versions of prisma as well.

The problem

prisma generate fails due to the following error:

Error: Not Found https://binaries.prisma.sh/all_commits/58369335532e47bdcec77a2f1e7c1fb83a463918/debian-openssl-3.0.x/prisma-fmt.gz

When trying to access the URL from the error,
https://binaries.prisma.sh/all_commits/58369335532e47bdcec77a2f1e7c1fb83a463918/debian-openssl-3.0.x/prisma-fmt.gz
I get the following error in my browser:

<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Key>all_commits/58369335532e47bdcec77a2f1e7c1fb83a463918/debian-openssl-3.0.x/prisma-fmt.gz</Key>
  <RequestId>9CGQPAYQV9GCRY18</RequestId>
  <HostId>ztfIwmtu1KVgESDxXuj+OHuHlYZQF+05gkfxBMg9akoGbJlOeipwDfjz9luGaLReLTrEvrxgfJ4=</HostId>
</Error>

My guess is that for some reason these files were pruned from S3. Or the configuration for the bucket or CloudFront has changed.

In either case, it would be great to know if this could be resolved to maintain support for legacy versions of prisma.

How to reproduce

I guess this problem could be reproduced by simply accessing
https://binaries.prisma.sh/all_commits/58369335532e47bdcec77a2f1e7c1fb83a463918/debian-openssl-3.0.x/prisma-fmt.gz
in your browser.

The prisma generate command fails because the file in question is unavailable or inaccessible.

Otherwise, for a more thorough reproduction, I believe simply following these steps should be enough:

  • yarn add @prisma/client@^2.11.0 @prisma/cli@^2.11.0
  • (use any existing project compatible with that version or create a simple boilerplate)
  • yarn prisma:generate, run on Ubuntu 22.04.1 LTS. In my case, Github Actions.

Expected behavior

The command should work without failing to access that file. Business as usual.

Prisma information

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "rhel-openssl-1.0.x"]
}

Environment & setup

  • OS: Ubuntu 22.04.1 LTS. In my case, Github Actions (image ubuntu-22.04, version 20221027.1)
  • Database: Postgres
  • Node.js version: v12.22.12

Prisma Version

@prisma/client@^2.11.0 @prisma/cli@^2.11.0
@judehunter judehunter added the kind/bug A reported bug. label Nov 12, 2022
@judehunter
Copy link
Author

The cause of this might be related to #16233 although the "symptoms" are different. Maybe the cache invalidation on cloudfront caused this, but just guessing.

@janpio
Copy link
Member

janpio commented Nov 12, 2022

Did you maybe recently update your system to use a different OpenSSL version?

This old version does not have a build for OpenSSL 3:
image

You will have to update to one that does to use a system with OpenSSL 3.

@janpio janpio added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. team/client Issue for team Client. topic: openssl labels Nov 12, 2022
@judehunter
Copy link
Author

That was it! I had my GitHub actions set up to use ubuntu-latest. I locked the version to an older one and it works again! Thank you @janpio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: openssl
Projects
None yet
Development

No branches or pull requests

2 participants