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 seems to be looking in the wrong location for rhel-openssl-1.0.x #15638

Closed
RoryKelly opened this issue Oct 2, 2022 · 2 comments · Fixed by #19330
Closed

Prisma seems to be looking in the wrong location for rhel-openssl-1.0.x #15638

RoryKelly opened this issue Oct 2, 2022 · 2 comments · Fixed by #19330
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. topic: engine-not-found topic: Query engine ... could not be found. Query engine ... for current platform ... could not be found.
Milestone

Comments

@RoryKelly
Copy link

Bug description

in a monorepo project, I am building for AWS. I cannot use the prisma-serverless-webpack plugin as it does not work with monorepos.

When calling prisma I get the following error.

Query engine library for current platform \rhel-openssl-1.0.x\ could not be found.
You incorrectly pinned it to rhel-openssl-1.0.x

This probably happens because you built Prisma Client on a different platform.
(Prisma Client looked in \/var/task/src/libquery_engine-rhel-openssl-1.0.x.so.node\)

Searched Locations:

  /.prisma/client
  /home/runner/work/8bars/8bars/backend-v2/node_modules/@prisma/client
  /var/task
  /var/task/src
  /var/task/src
  /tmp/prisma-engines
  /var/task/src

You already added the platforms \debian-openssl-1.1.x\ \rhel-openssl-1.0.x\ to the \generator\ block
in the \schema.prisma\ file as described in https://pris.ly/d/client-generator
but something went wrong. That's suboptimal.

Please create an issue at https://github.com/prisma/prisma/issues/new

The correct file is included in the project but at the location

 /home/runner/work/8bars/8bars/backend-v2/node_modules/.prisma/client

See:

Screenshot 2022-10-02 at 20 21 58

This is not in the list of the Searched Locations.

How to reproduce

Build a prisma client for AWS without using prisma-serverless-webpack.

Expected behavior

The aws Lambda runs correctly.

Prisma information

// Add your schema.prisma
// Add your code using Prisma Client

Environment & setup

  • OS:
  • Database:
  • Node.js version:

Prisma Version

4.4.0
@RoryKelly RoryKelly added the kind/bug A reported bug. label Oct 2, 2022
@millsp millsp added team/client Issue for team Client. bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. topic: engine-not-found and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels Oct 4, 2022
@janpio janpio added the topic: Query engine ... could not be found. Query engine ... for current platform ... could not be found. label Jan 28, 2023
@janpio
Copy link
Member

janpio commented Jan 28, 2023

Hey @RoryKelly , can you share a reproduction of your project setup so we can reproduce this? There are many underlying problems that can causethis, so we would like to be able to debug and reproduce ourselves optimally. Thanks!

@millsp
Copy link
Member

millsp commented May 31, 2023

Hey, we wanted to give you an update about this. We have around 10 issues that we have identified to be in the "engine not found" category. Looking at these, we learned that there are four main categories responsible for these errors:

  • Your client was generated with native (default) on one platform, but used on a different platform at runtime.
  • You pinned binaryTargets incorrectly, and the correct engine was therefore not included at runtime.
  • A bundler/framework changed the Prisma Client but did not copy the necessary engine for the runtime.
  • Deployment/tooling did not copy the engine correctly so the correct engine was not included at runtime.

These cases were previously not detected. On top of that, the error messages were confusing and were neither helpful for you or us. With that, it is likely that many of the cases above overlapped each other. So while we cannot fix a missing engine, we can detect how and why it happened. Thanks to that, we now display more useful errors to help you out of trouble. And in some cases, we will ask some input from you to learn more about your project so we can further improve.

If something is still off for you, feel free to create a new issue.

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. topic: engine-not-found topic: Query engine ... could not be found. Query engine ... for current platform ... could not be found.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants