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

[regression] Schema engine error in Prisma 5.19.0 #25101

Closed
satadhi opened this issue Aug 28, 2024 · 21 comments
Closed

[regression] Schema engine error in Prisma 5.19.0 #25101

satadhi opened this issue Aug 28, 2024 · 21 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. kind/regression A reported bug in functionality that used to work before.

Comments

@satadhi
Copy link

satadhi commented Aug 28, 2024

Bug description

Version 5.19.0 appears broken to me. npx prisma migrate dev --name init simply gives error

risma:getConfig Using getConfig Wasm +0ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +1ms
Error: Error: Schema engine error:

    at Cf (/home/satadhi.halde/Documents/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:432:1600)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async nl (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:513:1789)
    at async Sm.parse (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:943:72)
    at async s2t (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:2002:1678)

How to reproduce

Followed steps in nestjs docs

The env file looks like this.

DATABASE_URL="mysql://root:password@127.0.0.1:3306/nestjs_prisma"

MYSQL_DATABASE=nestjs_prisma
MYSQL_ROOT_PASSWORD=password

I use docker-compose.yaml to run sql

services:
  mysql:
    image: mysql
    env_file:
      - .env
    ports:
      - '3306:3306'

Expected behavior

It should just run normally. I tried using version 5.18.0 everything works expected

Prisma information

// Add your schema.prisma
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

model Product {
  id   Int    @id @default(autoincrement())
  name String
}

Environment & setup

  • OS: Ubuntu 22.04.2 LTS
  • Database: MySQL
  • Node.js version: 20.14.0

Prisma Version

5.19.0
@satadhi satadhi added the kind/bug A reported bug. label Aug 28, 2024
@callumJPritchard
Copy link

I'm also trying to deal with a bug moving up to 5.19
On the face of it only somewhat related since I'm doing prisma db push --force-reset and then a seed script for our dev pipeline, however it's the same situation where things work until moving to 5.19.0

the db push seems to work, as does the initial part of the seed script until it gets to a particular function then it throws:

return prisma4.modelName.findUniqueOrThrow(
The column `t15.fieldName` does not exist in the current database

the code causing this is:

prisma.modelName.findUniqueOrThrow({
        where: { id },
        include: {
            relatedModel: {
                where: {
                    type: {
                        fieldName: false
                    }
	...

it almost looks like 5.19.0 is getting confused around the nested where clause an expecting fieldName on modelName instead?

to reiterate: the code is identical to what has been running for weeks. Only prisma version change causes the error

@satadhi
Copy link
Author

satadhi commented Aug 28, 2024

Yes, I was trying to run hello world of prisma as I am learning prisma now.
Spent a full day on this lol. This is very sad

@github-staff github-staff deleted a comment from satadhi Aug 28, 2024
@jkomyno jkomyno changed the title Version 5.19.0 appears broken [regression] Schema engine error in Prisma 5.19.0 Aug 28, 2024
@jkomyno
Copy link
Contributor

jkomyno commented Aug 28, 2024

it almost looks like 5.19.0 is getting confused around the nested where clause an expecting fieldName on modelName instead?

Hi @callumJPritchard, please open a new issue for that. You're describing a possible bug in Prisma Client, not on prisma migrate. Thanks!

@jkomyno jkomyno added the bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. label Aug 28, 2024
@jkomyno
Copy link
Contributor

jkomyno commented Aug 28, 2024

Hey @satadhi, can you please run the following command, and report back the output? Thanks.

npx prisma --version

This gives us much more information than just "5.19.0", and may help us assessing this further. Thanks!

@jkomyno jkomyno added the domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. label Aug 28, 2024
@satadhi
Copy link
Author

satadhi commented Aug 28, 2024

@jkomyno
Hi its all linked sir, my npm install @prisma/client is also broken which is of version 5.19.0.
Manually changing the version to 5.18.0 works fine.

I have used the basic setup of nestjs.

Below is the error when i used 5.19.0

PrismaClientInitializationError: Unable to require(/home/satadhi/Documents/nestjs-practise/prisma-prac/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: /lib/x86_64-linux-gnu/libssl.so.1.1: version OPENSSL_1_1_1' not found (required by /home/satadhi/Documents/nestjs-practise/prisma-prac/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node)



@aqrln
Copy link
Member

aqrln commented Aug 28, 2024

@satadhi this is unexpected but is there a reason you have OpenSSL 1.1 installed on your system? Did you install it with apt or in some other way? Right now Prisma prefers an older version of OpenSSL when multiple are installed for reasons, so if you only left OpenSSL 3 installed (which should be the default on Ubuntu 22.04) and regenerated the client, it should resolve the issue.

We should investigate what looks like a sudden bump in the requirements from OpenSSL 1.1.0 to OpenSSL 1.1.1 regardless. Maybe it comes from prisma/prisma-engines#4965.

@satadhi
Copy link
Author

satadhi commented Aug 28, 2024

Hi @jkomyno

satadhi.halder: ~/Documents/nestjs - practise / prisma - prac$ npx prisma--version
Environment variables loaded from.env
Error: Unable to require(`/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node`).
The Prisma engines do not seem to be compatible with your system.Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: /lib/x86_64 - linux - gnu / libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
    at pne (/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:284:116)
    at lWe (/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:284:269)
Error: Command failed with exit code 1: /home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version
/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
    at eke(/home/satadhi.halder / Documents / nestjs - practise / prisma - prac / node_modules / prisma / build / index.js: 5: 57)
at / home / satadhi.halder/Documents/nestjs - practise / prisma - prac / node_modules / prisma / build / index.js: 5: 10625
    at process.processTicksAndRejections(node: internal / process / task_queues: 95: 5)
    at async lWe(/home/satadhi.halder / Documents / nestjs - practise / prisma - prac / node_modules / prisma / build / index.js: 284: 343) {
  shortMessage: 'Command failed with exit code 1: /home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
    command: '/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
      escapedCommand: '"/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x" --version',
        exitCode: 1,
          signal: undefined,
            signalDescription: undefined,
              stdout: '',
                stderr: "/home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/satadhi.halder/Documents/nestjs-practise/prisma-prac/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)",
                  failed: true,
                    timedOut: false,
                      isCanceled: false,
                        killed: false
}
prisma: 5.19.0
@prisma/client          : 5.19.0
Computed binaryTarget: debian - openssl - 1.1.x
Operating System: linux
Architecture: x64
Node.js                 : v20.14.0
Query Engine(Node - API) : E_CANNOT_RESOLVE_VERSION(at node_modules / @prisma / engines / libquery_engine - debian - openssl - 1.1.x.so.node)
Schema Engine: E_CANNOT_RESOLVE_VERSION(at node_modules / @prisma / engines / schema - engine - debian - openssl - 1.1.x)
Schema Wasm: @prisma/prisma-schema-wasm 5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f
Default Engines Hash: 5fe21811a6ba0b952a3bc71400666511fe3b902f
Studio: 0.502.0
satadhi.halder: ~/Documents/nestjs - practise / prisma - prac$

@satadhi
Copy link
Author

satadhi commented Aug 28, 2024

@satadhi this is unexpected but is there a reason you have OpenSSL 1.1 installed on your system? Did you install it with apt or in some other way? Right now Prisma prefers an older version of OpenSSL when multiple are installed for reasons, so if you only left OpenSSL 3 installed (which should be the default on Ubuntu 22.04) and regenerated the client, it should resolve the issue.

We should investigate what looks like a sudden bump in the requirements from OpenSSL 1.1.0 to OpenSSL 1.1.1 regardless. Maybe it comes from prisma/prisma-engines#4965.

@aqrln yes when i got error i tried to manually install OpenSSL using command sudo apt-get install libssl1.1 . But it was of no use; after that i changed the version to 5.18.0 of @prisma/client . And it worked fine

@aqrln
Copy link
Member

aqrln commented Aug 28, 2024

@satadhi so the OpenSSL error is a separate issue and unrelated to the original problem you were facing, right? It's better to uninstall it, yes, there's no reason to use OpenSSL 1.1 which has been officially EOL upstream for a year already (even if distros may still support it).

@aqrln
Copy link
Member

aqrln commented Aug 28, 2024

Could you please also post your npx prisma --version output after removing OpenSSL 1.1?

@satadhi
Copy link
Author

satadhi commented Aug 28, 2024

removed,

satadhi.halder:~/Documents/nestjs-practise/prisma-prac$ dpkg -l | grep libssl
ii  libssl3:amd64                              3.0.2-0ubuntu1.17                       amd64        Secure Sockets Layer toolkit - shared libraries

Output of npx prisma --version

$ npx prisma --version
Environment variables loaded from .env
prisma                  : 5.19.0
@prisma/client          : 5.19.0
Computed binaryTarget   : debian-openssl-3.0.x
Operating System        : linux
Architecture            : x64
Node.js                 : v20.14.0
Query Engine (Node-API) : libquery-engine 5fe21811a6ba0b952a3bc71400666511fe3b902f (at node_modules/@prisma/engines/libquery_engine-debian-openssl-3.0.x.so.node)
Schema Engine           : schema-engine-cli 5fe21811a6ba0b952a3bc71400666511fe3b902f (at node_modules/@prisma/engines/schema-engine-debian-openssl-3.0.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f
Default Engines Hash    : 5fe21811a6ba0b952a3bc71400666511fe3b902f
Studio                  : 0.502.0

@apolanc apolanc added the kind/regression A reported bug in functionality that used to work before. label Aug 29, 2024
@mathiasayivor
Copy link

I'm also getting the same error just after upgrading prisma from 5.18.0 to 5.19.0

After I run yarn prisma db push, I get the following error:

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "genesis", schema "public" at "127.0.0.1:5432"

Error: Schema engine error:

Running yarn prisma --version gives me the following:

Environment variables loaded from .env
Error: Unable to require(`/my-app/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node`).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
    at pne (/my-app/node_modules/prisma/build/index.js:284:116)
    at lWe (/my-app/node_modules/prisma/build/index.js:284:269)
Error: Command failed with exit code 1: /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version
/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
    at eke (/my-app/node_modules/prisma/build/index.js:5:57)
    at /my-app/node_modules/prisma/build/index.js:5:10625
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async lWe (/my-app/node_modules/prisma/build/index.js:284:343) {
  shortMessage: 'Command failed with exit code 1: /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
  command: '/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
  escapedCommand: '"/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x" --version',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: "/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
prisma                  : 5.19.0
@prisma/client          : 5.19.0
Computed binaryTarget   : debian-openssl-1.1.x
Operating System        : linux
Architecture            : x64
Node.js                 : v18.18.2
Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at ../node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine           : E_CANNOT_RESOLVE_VERSION (at ../node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f
Default Engines Hash    : 5fe21811a6ba0b952a3bc71400666511fe3b902f
Studio                  : 0.502.0
Preview Features        : omitApi

@jkomyno
Copy link
Contributor

jkomyno commented Aug 31, 2024

@satadhi this is unexpected but is there a reason you have OpenSSL 1.1 installed on your system? Did you install it with apt or in some other way? Right now Prisma prefers an older version of OpenSSL when multiple are installed for reasons, so if you only left OpenSSL 3 installed (which should be the default on Ubuntu 22.04) and regenerated the client, it should resolve the issue.

We should investigate what looks like a sudden bump in the requirements from OpenSSL 1.1.0 to OpenSSL 1.1.1 regardless. Maybe it comes from prisma/prisma-engines#4965.

prisma/prisma-engines#4965 was released in the dev Prisma version 5.19.0-dev.8.

@satadhi and @mathiasayivor, could you please try installing prisma@5.19.0-dev.7 and run prisma --version, and then repeat the process with prisma@5.19.0-dev.8?

Also, can you run the command above with DEBUG="prisma:get-platform" prisma --version, and post the output here? Thanks.

@mathiasayivor
Copy link

@jkomyno I've installed both prisma@5.19.0.-dev.7 and prisma@5.19.0-dev.8 outputs are below:

CMD: yarn prisma db push

prisma@5.19.0-dev.7:

Works as expected

prisma@5.19.0-dev.8:

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "genesis", schema "public" at "127.0.0.1:5432"

Error: Schema engine error:

CMD: DEBUG="prisma:get-platform" prisma --version

prisma@5.19.0-dev.7:

prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +1252ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +10ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +22ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
Environment variables loaded from .env
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +2303ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +1ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +12ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
prisma                  : 5.19.0-dev.7
@prisma/client          : 5.18.0
Computed binaryTarget   : debian-openssl-1.1.x
Operating System        : linux
Architecture            : x64
Node.js                 : v18.18.2
Query Engine (Node-API) : libquery-engine 44f753d2ce0008a24ce36e34aff65a5afe266839 (at ../node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine           : schema-engine-cli 44f753d2ce0008a24ce36e34aff65a5afe266839 (at ../node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-8.44f753d2ce0008a24ce36e34aff65a5afe266839
Default Engines Hash    : 44f753d2ce0008a24ce36e34aff65a5afe266839
Studio                  : 0.502.0
Preview Features        : omitApi

prisma@5.19.0-dev.8:

prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +1238ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +5ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +12ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
Environment variables loaded from .env
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +2199ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +2ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +12ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
Error: Unable to require(`/my-app/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node`).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
    at one (/my-app/node_modules/prisma/build/index.js:284:116)
    at iWe (/my-app/node_modules/prisma/build/index.js:284:269)
Error: Command failed with exit code 1: /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version
/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
    at YIe (/my-app/node_modules/prisma/build/index.js:5:57)
    at /my-app/node_modules/prisma/build/index.js:5:10625
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async iWe (/my-app/node_modules/prisma/build/index.js:284:343) {
  shortMessage: 'Command failed with exit code 1: /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
  command: '/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x --version',
  escapedCommand: '"/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x" --version',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: "/my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x: /lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /my-app/node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)",
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
prisma                  : 5.19.0-dev.8
@prisma/client          : 5.18.0
Computed binaryTarget   : debian-openssl-1.1.x
Operating System        : linux
Architecture            : x64
Node.js                 : v18.18.2
Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at ../node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine           : E_CANNOT_RESOLVE_VERSION (at ../node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-12.ae18f9165678fc6c7b7b107340ca0435be434765
Default Engines Hash    : ae18f9165678fc6c7b7b107340ca0435be434765
Studio                  : 0.502.0
Preview Features        : omitApi

@briangottfried
Copy link

Just upgraded to 5.19.0, I am getting a similar error (using nix)

PrismaClientInitializationError: Unable to require(`/runner/_work/app/app/libs/api/db/generated/client/libquery_engine-debian-openssl-1.1.x.so.node`).
  Prisma cannot find the required `libssl` system library in your system. Please install openssl-1.1.x and try again.

Details: libssl.so.1.1: cannot open shared object file: No such file or directory
    clientVersion: '5.19.0',
    errorCode: undefined
  }

DEBUG="prisma:get-platform" npx prisma --version

prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +362ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +1ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +1ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
Environment variables loaded from .env
prisma:get-platform Found distro info:
{
  "targetDistro": "debian",
  "familyDistro": "debian",
  "originalDistro": "ubuntu"
} +593ms
prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +1ms
prisma:get-platform The parsed libssl version is: 1.1.x +1ms
Error: Unable to require(`/runner/_work/app/app/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node`).
Prisma cannot find the required `libssl` system library in your system. Please install openssl-1.1.x and try again.
Details: libssl.so.1.1: cannot open shared object file: No such file or directory
    at pne (/runner/_work/app/app/node_modules/prisma/build/index.js:284:116)
    at lWe (/runner/_work/app/app/node_modules/prisma/build/index.js:284:269)
prisma                  : 5.19.0
@prisma/client          : 5.19.0
Computed binaryTarget   : debian-openssl-1.1.x
Operating System        : linux
Architecture            : x64
Node.js                 : v18.20.2
Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Schema Engine           : schema-engine-cli 5fe21811a6ba0b952a3bc7[140] 0666511fe3b902f (at node_modules/@prisma/engines/schema-engine-debian-openssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f
Default Engines Hash    : 5fe21811a6ba0b952a3bc71400666511fe3b902f
Studio                  : 0.502.0

Schema

generator client {
  provider        = "prisma-client-js"
  output          = "../generated/client"
  previewFeatures = ["prismaSchemaFolder", "typedSql"]
}

@jkomyno
Copy link
Contributor

jkomyno commented Sep 2, 2024

Hi @mathiasayivor, thanks for confirming that prisma@5.19.0-dev.7 works for you!
Now let's try to understand why we got this problem in the first place.

In https://github.com/prisma/ecosystem-tests/tree/dev/docker/ubuntu-22.04-amd64-openssl-3.0.x, we test that on Ubuntu 22.04 on x64, the default engine target for Prisma is debian-openssl-3.0.x, as libssl.so.3 is found in /lib/x86_64-linux-gnu/ (see in Dockerfile).

As no official node Docker image is distributed using ubuntu base image, our testing setup for this specific scenario is roughly as follows:

  • use ubuntu:22.04 as a base image (source)
  • install Node.js (in our case, 18.12.0) via apt (source)
  • check for libssl detection
  • check that prisma --version matches the debian-openssl-3.0.x binary target

Now the question is: how can we reproduce your and @satadhi's setup in a Dockerfile? We kindly need your help here to avoid similar regressions in the future. Thanks!

@aqrln
Copy link
Member

aqrln commented Sep 2, 2024

@jkomyno I believe the way to reproduce would be to install the libssl1.1 package

@apolanc
Copy link
Contributor

apolanc commented Sep 2, 2024

This should be fixed in the 5.19.1 version, closing this now.

@apolanc apolanc closed this as completed Sep 2, 2024
@briangottfried
Copy link

This is actually still sad for me

PrismaClientInitializationError: Unable to require(`/runner/_work/app/libs/db/generated/client/libquery_engine-debian-openssl-1.1.x.so.node`).
  Prisma cannot find the required `libssl` system library in your system. Please install openssl-1.1.x and try again.
  Details: libssl.so.1.1: cannot open shared object file: No such file or directory
      at Object.loadLibrary (/runner/_work/app/dist/apps/app/api/main.js:2796:15)
      at async Cr.loadEngine (/runner/_work/app/dist/apps/app/api/main.js:2838:56)
      at async Cr.instantiateLibrary (/runner/_work/app/dist/apps/app/api/main.js:2818:113) {
    clientVersion: '5.19.1',
    errorCode: undefined
  }

@aqrln
Copy link
Member

aqrln commented Sep 2, 2024

@briangottfried did you re-generate the client after updating Prisma?

@aqrln
Copy link
Member

aqrln commented Sep 2, 2024

also this looks a different error than what people in this issue have been facing

renovate bot referenced this issue in huv1k/website Sep 2, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@prisma/client](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/client))
| [`5.19.0` ->
`5.19.1`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.19.0/5.19.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/5.19.0/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/5.19.0/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [prisma](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/cli))
| [`5.19.0` ->
`5.19.1`](https://renovatebot.com/diffs/npm/prisma/5.19.0/5.19.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prisma/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prisma/5.19.0/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/5.19.0/5.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prisma/prisma (@&#8203;prisma/client)</summary>

###
[`v5.19.1`](https://redirect.github.com/prisma/prisma/releases/tag/5.19.1)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/5.19.0...5.19.1)

Today, we are issuing the `5.19.1` patch release.

#### What's Changed

We've fixed the following issues:

-
[https://github.com/prisma/prisma/issues/25103](https://redirect.github.com/prisma/prisma/issues/25103)
-
[https://github.com/prisma/prisma/issues/25137](https://redirect.github.com/prisma/prisma/issues/25137)
-
[https://github.com/prisma/prisma/issues/25104](https://redirect.github.com/prisma/prisma/issues/25104)
-
[https://github.com/prisma/prisma/issues/25101](https://redirect.github.com/prisma/prisma/issues/25101)

**Full Changelog**:
prisma/prisma@5.19.0...5.19.x,
prisma/prisma-engines@5.19.0...5.19.x

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/huv1k/website).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
alexolivier referenced this issue in cerbos/query-plan-adapters Sep 25, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@cerbos/grpc](https://redirect.github.com/cerbos/cerbos-sdk-javascript/tree/main/packages/grpc#readme)
([source](https://redirect.github.com/cerbos/cerbos-sdk-javascript/tree/HEAD/packages/grpc))
| [`0.18.1` ->
`0.18.3`](https://renovatebot.com/diffs/npm/@cerbos%2fgrpc/0.18.1/0.18.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@cerbos%2fgrpc/0.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@cerbos%2fgrpc/0.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@cerbos%2fgrpc/0.18.1/0.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@cerbos%2fgrpc/0.18.1/0.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [@prisma/client](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/client))
| [`5.17.0` ->
`5.20.0`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.17.0/5.20.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/5.17.0/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/5.17.0/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/jest](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest))
| [`29.5.12` ->
`29.5.13`](https://renovatebot.com/diffs/npm/@types%2fjest/29.5.12/29.5.13)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fjest/29.5.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fjest/29.5.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fjest/29.5.12/29.5.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fjest/29.5.12/29.5.13?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/node](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.14.14` ->
`20.16.7`](https://renovatebot.com/diffs/npm/@types%2fnode/20.14.14/20.16.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.14.14/20.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.14.14/20.16.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [mongoose](https://mongoosejs.com)
([source](https://redirect.github.com/Automattic/mongoose)) | [`8.5.2`
-> `8.6.3`](https://renovatebot.com/diffs/npm/mongoose/8.5.2/8.6.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mongoose/8.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mongoose/8.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mongoose/8.5.2/8.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mongoose/8.5.2/8.6.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [prisma](https://www.prisma.io)
([source](https://redirect.github.com/prisma/prisma/tree/HEAD/packages/cli))
| [`5.17.0` ->
`5.20.0`](https://renovatebot.com/diffs/npm/prisma/5.17.0/5.20.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prisma/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prisma/5.17.0/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/5.17.0/5.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [ts-jest](https://kulshekhar.github.io/ts-jest)
([source](https://redirect.github.com/kulshekhar/ts-jest)) | [`29.2.4`
-> `29.2.5`](https://renovatebot.com/diffs/npm/ts-jest/29.2.4/29.2.5) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/ts-jest/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ts-jest/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ts-jest/29.2.4/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ts-jest/29.2.4/29.2.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [typescript](https://www.typescriptlang.org/)
([source](https://redirect.github.com/microsoft/TypeScript)) | [`5.5.4`
-> `5.6.2`](https://renovatebot.com/diffs/npm/typescript/5.5.4/5.6.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.5.4/5.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.5.4/5.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>cerbos/cerbos-sdk-javascript (@&#8203;cerbos/grpc)</summary>

###
[`v0.18.3`](https://redirect.github.com/cerbos/cerbos-sdk-javascript/blob/HEAD/packages/grpc/CHANGELOG.md#0183---2024-09-23)

[Compare
Source](https://redirect.github.com/cerbos/cerbos-sdk-javascript/compare/@cerbos/grpc@0.18.2...@cerbos/grpc@0.18.3)

##### Changed

- Bump dependency on
\[[@&#8203;bufbuild/protobuf](https://redirect.github.com/bufbuild/protobuf)]
to 2.1.0
([#&#8203;1012](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/1012))

- Bump dependency on
\[[@&#8203;grpc/grpc-js](https://redirect.github.com/grpc/grpc-js)] to
1.11.3
([#&#8203;1000](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/1000),
[#&#8203;1011](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/1011))

###
[`v0.18.2`](https://redirect.github.com/cerbos/cerbos-sdk-javascript/blob/HEAD/packages/grpc/CHANGELOG.md#0182---2024-08-19)

[Compare
Source](https://redirect.github.com/cerbos/cerbos-sdk-javascript/compare/@cerbos/grpc@0.18.1...@cerbos/grpc@0.18.2)

##### Changed

- Replace dependency on \[protobufjs] with
\[[@&#8203;bufbuild/protobuf](https://redirect.github.com/bufbuild/protobuf)]
([#&#8203;990](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/990))

- Bump dependency on
\[[@&#8203;grpc/grpc-js](https://redirect.github.com/grpc/grpc-js)] to
1.11.1
([#&#8203;974](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/974),
[#&#8203;979](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/979),
[#&#8203;981](https://redirect.github.com/cerbos/cerbos-sdk-javascript/pull/981))

</details>

<details>
<summary>prisma/prisma (@&#8203;prisma/client)</summary>

###
[`v5.20.0`](https://redirect.github.com/prisma/prisma/releases/tag/5.20.0)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/5.19.1...5.20.0)

🌟 **Help us spread the word about Prisma by starring the repo or
[posting on
X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@&#8203;prisma%20release%20v5.20.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.20.0)
about the release.** 🌟

#### Highlights

##### `strictUndefinedChecks` in Preview

With Prisma ORM 5.20.0, the Preview feature `strictUndefinedChecks` will
disallow any value that is explicitly `undefined` and will be a runtime
error. This change is direct feedback from [this GitHub
issue](https://redirect.github.com/prisma/prisma/issues/20169) and
follows [our latest
proposal](https://redirect.github.com/prisma/prisma/issues/20169#issuecomment-2338360300)
on the same issue.

To demonstrate the change, take the following code snippet:

```tsx
prisma.table.deleteMany({
  where: {
    // If `nullableThing` is nullish, this query will remove all data.
    email: nullableThing?.property,
  }
})
```

In Prisma ORM 5.19.0 and below, this could result in unintended
behavior. In Prisma ORM 5.20.0, if the `strictUndefinedChecks` Preview
feature is enabled, you will get a runtime error instead:

```tsx
Invalid \`prisma.user.findMany()\` invocation in
/client/tests/functional/strictUndefinedChecks/test.ts:0:0
  XX })
  XX 
  XX test('throws on undefined input field', async () => {
→ XX   const result = prisma.user.deleteMany({
         where: {
           email: undefined
                  ~~~~~~~~~
         }
       })
Invalid value for argument \`where\`: explicitly \`undefined\` values are not allowed."
```

We have also introduced the `Prisma.skip` symbol, which will allow you
to get the previous behavior if desired.

```tsx
prisma.table.findMany({
  where: {
    // Use Prisma.skip to skip parts of the query
    email: nullableEmail ?? Prisma.skip
  }
})
```

From Prisma ORM 5.20.0 onward, we recommend enabling
`strictUndefinedChecks`, along with the TypeScript compiler option
`exactOptionalPropertyTypes`, which will help catch cases of undefined
values at compile time. Together, these two changes will help protect
your Prisma queries from potentially destructive behavior.

`strictUndefinedChecks` will be a valid Preview feature for the
remainder of Prisma ORM 5. With our next major version, this behavior
will become the default and the Preview feature will be “graduated” to
Generally Available.

If you have any questions or feedback about `strictUndefinedChecks`,
please ask/comment in our dedicated [Preview feature GitHub
discussion](https://redirect.github.com/prisma/prisma/discussions/25271).

##### `typedSql` bug fix

Thank you to everyone who has tried out our [`typedSql` Preview
feature](https://www.prisma.io/blog/announcing-typedsql-make-your-raw-sql-queries-type-safe-with-prisma-orm)
and [provided
feedback](https://redirect.github.com/prisma/prisma/discussions/25106)!
This release has a quick fix for typescript files generated when Prisma
Schema enums had hyphens.

#### Fixes and improvements

##### Prisma

- [Prisma incorrectly parses CRDB's FK constraint error as `not
available`.](https://redirect.github.com/prisma/prisma/issues/24072)
- [Invalid TypeScript files created by `generate` when typedSql is
enabled and enum contains
hyphens.](https://redirect.github.com/prisma/prisma/issues/25163)
- [`@prisma/internals` didn't list `ts-toolbelt` in
dependencies.](https://redirect.github.com/prisma/prisma/issues/17952)
- [using `$extends` prevents model comments from being passed to
TypeScript](https://redirect.github.com/prisma/prisma/issues/24648)

##### Prisma Engines

- [Planetscale engine tests:
interactive_tx](https://redirect.github.com/prisma/prisma-engines/issues/4469)
- [Fix broken engine size publishing
workflow](https://redirect.github.com/prisma/prisma-engines/issues/4991)

#### Credits

Huge thanks to
[@&#8203;mcuelenaere](https://redirect.github.com/mcuelenaere),
[@&#8203;pagewang0](https://redirect.github.com/pagewang0),
[@&#8203;key-moon](https://redirect.github.com/key-moon),
[@&#8203;pranayat](https://redirect.github.com/pranayat),
[@&#8203;yubrot](https://redirect.github.com/yubrot),
[@&#8203;thijmenjk](https://redirect.github.com/thijmenjk),
[@&#8203;mydea](https://redirect.github.com/mydea),
[@&#8203;HRM](https://redirect.github.com/HRM),
[@&#8203;haaawk](https://redirect.github.com/haaawk),
[@&#8203;baileywickham](https://redirect.github.com/baileywickham),
[@&#8203;brian-dlee](https://redirect.github.com/brian-dlee),
[@&#8203;nickcarnival](https://redirect.github.com/nickcarnival),
[@&#8203;eruditmorina](https://redirect.github.com/eruditmorina),
[@&#8203;nzakas](https://redirect.github.com/nzakas), and
[@&#8203;gutyerrez](https://redirect.github.com/gutyerrez) for helping!

###
[`v5.19.1`](https://redirect.github.com/prisma/prisma/releases/tag/5.19.1)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/5.19.0...5.19.1)

Today, we are issuing the `5.19.1` patch release.

#### What's Changed

We've fixed the following issues:

-
[https://github.com/prisma/prisma/issues/25103](https://redirect.github.com/prisma/prisma/issues/25103)
-
[https://github.com/prisma/prisma/issues/25137](https://redirect.github.com/prisma/prisma/issues/25137)
-
[https://github.com/prisma/prisma/issues/25104](https://redirect.github.com/prisma/prisma/issues/25104)
-
[https://github.com/prisma/prisma/issues/25101](https://redirect.github.com/prisma/prisma/issues/25101)

**Full Changelog**:
prisma/prisma@5.19.0...5.19.x,
prisma/prisma-engines@5.19.0...5.19.x

###
[`v5.19.0`](https://redirect.github.com/prisma/prisma/releases/tag/5.19.0)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/5.18.0...5.19.0)

Today, we are excited to share the `5.19.0` stable release 🎉

🌟 **Help us spread the word about Prisma by starring the repo or
[posting on
X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@&#8203;prisma%20release%20v5.19.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.19.0)
about the release.** 🌟

#### Highlights

##### Introducing TypedSQL

TypedSQL is a brand new way to interact with your database from Prisma
Client. After enabling the `typedSql` Preview feature, you’re able to
write SQL queries in a new `sql` subdirectory of your `prisma`
directory. These queries are then checked by Prisma during using the new
`--sql` flag of `prisma generate` and added to your client for use in
your code.

To get started with TypedSQL:

1. Make sure that you have the latest version of `prisma` and
`@prisma/client` installed:

        npm install -D prisma@latest
        npm install @&#8203;prisma/client@latest

2.  Enable the `typedSql` Preview feature in your Prisma Schema.

           generator client {
             provider = "prisma-client-js"
             previewFeatures = ["typedSql"]
           }

3.  Create a `sql` subdirectory of your `prisma` directory.

        mkdir -p prisma/sql

4. You can now add `.sql` files to the `sql` directory! Each file can
contain one sql query and the name must be a valid JS identifier. For
this example, say you had the file `getUsersWithPosts.sql` with the
following contents:

    ```sql
    SELECT u.id, u.name, COUNT(p.id) as "postCount"
    FROM "User" u
    LEFT JOIN "Post" p ON u.id = p."authorId"
    GROUP BY u.id, u.name
    ```

5. Import your SQL query into your code with the `@prisma/client/sql`
import:

    ```tsx
       import { PrismaClient } from '@&#8203;prisma/client'
       import { getUsersWithPosts } from '@&#8203;prisma/client/sql'

       const prisma = new PrismaClient()

const usersWithPostCounts = await
prisma.$queryRawTyped(getUsersWithPosts)
       console.log(usersWithPostCounts)
    ```

There’s a lot more to talk about with TypedSQL. We think that the
combination of the high-level Prisma Client API and the low-level
TypedSQL will make for a great developer experience for all of our
users.

To learn more about behind the “why” of TypedSQL [be sure to check out
our announcement blog post](https://pris.ly/typedsql-blog).

For docs, check out our new [TypedSQL
section](https://pris.ly/d/typedsql).

#### Bug fixes

##### Driver adapters and D1

A few issues with our `driverAdapters` Preview feature and Cloudflare D1
support were resolved via
[https://github.com/prisma/prisma-engines/pull/4970](https://redirect.github.com/prisma/prisma-engines/pull/4970)
and
[https://github.com/prisma/prisma/pull/24922](https://redirect.github.com/prisma/prisma/pull/24922)

- Mathematic operations such as `max`, `min`, `eq`, etc in queries when
using Cloudflare D1.
- Resolved issues when comparing `BigInt` IDs when
`relationMode="prisma"` was enabled and Cloudflare D1 was being used.

##### Joins

-
[https://github.com/prisma/prisma/issues/23742](https://redirect.github.com/prisma/prisma/issues/23742)
fixes Prisma Client not supporting deeply nested `some` clauses when the
`relationJoins` Preview feature was enabled.

#### Join us

Looking to make an impact on Prisma in a big way? We're now hiring
engineers for the ORM team!

- [Senior Engineer
(TypeScript)](https://boards.greenhouse.io/prisma/jobs/5350820002): This
person will be primarily working on the TypeScript side and evolving our
Prisma client. Rust knowledge (or desire to learn Rust) is a plus.
- [Senior Engineer
(Rust)](https://boards.greenhouse.io/prisma/jobs/6940273002): This
person will be focused on the `prisma-engines` Rust codebase. TypeScript
knowledge (or, again, a desire to learn) is a plus.

#### Credits

Huge thanks to
[@&#8203;mcuelenaere](https://redirect.github.com/mcuelenaere),
[@&#8203;pagewang0](https://redirect.github.com/pagewang0),
[@&#8203;Druue](https://redirect.github.com/Druue),
[@&#8203;key-moon](https://redirect.github.com/key-moon),
[@&#8203;Jolg42](https://redirect.github.com/Jolg42),
[@&#8203;pranayat](https://redirect.github.com/pranayat),
[@&#8203;ospfranco](https://redirect.github.com/ospfranco),
[@&#8203;yubrot](https://redirect.github.com/yubrot),
[@&#8203;skyzh](https://redirect.github.com/skyzh) for helping!

###
[`v5.18.0`](https://redirect.github.com/prisma/prisma/releases/tag/5.18.0)

[Compare
Source](https://redirect.github.com/prisma/prisma/compare/5.17.0...5.18.0)

🌟 **Help us spread the word about Prisma by starring the repo or
[tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@&#8203;prisma%20release%20v5.18.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/5.18.0)
about the release.** 🌟

##### Highlights

##### Native support for UUIDv7

Previous to this release, the Prisma Schema function `uuid()` did not
accept any arguments and created a UUIDv4 ID. While sufficient in many
cases, UUIDv4 has a few drawbacks, namely that it is not temporally
sortable.

UUIDv7 attempts to resolve this issue, making it easy to temporally sort
your database rows by ID!

To support this, we’ve updated the `uuid()` function in Prisma Schema to
accept an optional, integer argument. Right now, the only valid values
are `4` and `7`, with `4` being the default.

```tsx
model User {
  id   String @&#8203;id @&#8203;default(uuid()) // defaults to 4
  name String
}

model User {
  id   String @&#8203;id @&#8203;default(uuid(4)) // same as above, but explicit
  name String
}

model User {
  id   String @&#8203;id @&#8203;default(uuid(7)) // will use UUIDv7 instead of UUIDv4
  name String
}
```

##### Bug squashing

We’ve squashed a number of bugs this release, special thanks to everyone
who helped us! A few select highlights are:

- [SQLite db will now be created and read from the correct location when
using
`prismaSchemaFolder`](https://redirect.github.com/prisma/prisma/issues/24779).
- [Empty `Json[]` fields will now return `[]` instead of `null` when
accessed through a join using the `relationJoins` Preview
feature.](https://redirect.github.com/prisma/prisma/issues/22923)

##### Fixes and improvements

##### Prisma

- [Support UUID
v7](https://redirect.github.com/prisma/prisma/issues/24079)

##### Language tools (e.g. VS Code)

- [Support fetching references for a
model](https://redirect.github.com/prisma/language-tools/issues/982)

##### Credits

Huge thanks to
[@&#8203;mcuelenaere](https://redirect.github.com/mcuelenaere),
[@&#8203;pagewang0](https://redirect.github.com/pagewang0),
[@&#8203;Druue](https://redirect.github.com/Druue),
[@&#8203;key-moon](https://redirect.github.com/key-moon),
[@&#8203;Jolg42](https://redirect.github.com/Jolg42),
[@&#8203;pranayat](https://redirect.github.com/pranayat),
[@&#8203;ospfranco](https://redirect.github.com/ospfranco),
[@&#8203;yubrot](https://redirect.github.com/yubrot),
[@&#8203;skyzh](https://redirect.github.com/skyzh),
[@&#8203;haaawk](https://redirect.github.com/haaawk) for helping!

</details>

<details>
<summary>Automattic/mongoose (mongoose)</summary>

###
[`v8.6.3`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#863--2024-09-17)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.6.2...8.6.3)

\==================

- fix: make getters convert uuid to string when calling toObject() and
toJSON()
[#&#8203;14890](https://redirect.github.com/Automattic/mongoose/issues/14890)
[#&#8203;14869](https://redirect.github.com/Automattic/mongoose/issues/14869)
- fix: fix missing Aggregate re-exports for ESM
[#&#8203;14886](https://redirect.github.com/Automattic/mongoose/issues/14886)
[wongsean](https://redirect.github.com/wongsean)
- types(document): add generic param to depopulate() to allow updating
properties
[#&#8203;14891](https://redirect.github.com/Automattic/mongoose/issues/14891)
[#&#8203;14876](https://redirect.github.com/Automattic/mongoose/issues/14876)

###
[`v8.6.2`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#862--2024-09-11)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.6.1...8.6.2)

\==================

- fix: make set merge deeply nested objects
[#&#8203;14870](https://redirect.github.com/Automattic/mongoose/issues/14870)
[#&#8203;14861](https://redirect.github.com/Automattic/mongoose/issues/14861)
[ianHeydoc](https://redirect.github.com/ianHeydoc)
- types: allow arbitrary keys in query filters again (revert
[#&#8203;14764](https://redirect.github.com/Automattic/mongoose/issues/14764))
[#&#8203;14874](https://redirect.github.com/Automattic/mongoose/issues/14874)
[#&#8203;14863](https://redirect.github.com/Automattic/mongoose/issues/14863)
[#&#8203;14862](https://redirect.github.com/Automattic/mongoose/issues/14862)
[#&#8203;14842](https://redirect.github.com/Automattic/mongoose/issues/14842)
- types: make SchemaType static setters property accessible in
TypeScript
[#&#8203;14881](https://redirect.github.com/Automattic/mongoose/issues/14881)
[#&#8203;14879](https://redirect.github.com/Automattic/mongoose/issues/14879)
- type(inferrawdoctype): infer Date types as JS dates rather than
Mongoose SchemaType Date
[#&#8203;14882](https://redirect.github.com/Automattic/mongoose/issues/14882)
[#&#8203;14839](https://redirect.github.com/Automattic/mongoose/issues/14839)

###
[`v8.6.1`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#861--2024-09-03)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.6.0...8.6.1)

\==================

- fix(document): avoid unnecessary clone() in applyGetters() that was
preventing getters from running on 3-level deep subdocuments
[#&#8203;14844](https://redirect.github.com/Automattic/mongoose/issues/14844)
[#&#8203;14840](https://redirect.github.com/Automattic/mongoose/issues/14840)
[#&#8203;14835](https://redirect.github.com/Automattic/mongoose/issues/14835)
- fix(model): throw error if bulkSave() did not insert or update any
documents
[#&#8203;14837](https://redirect.github.com/Automattic/mongoose/issues/14837)
[#&#8203;14763](https://redirect.github.com/Automattic/mongoose/issues/14763)
- fix(cursor): throw error in ChangeStream constructor if
changeStreamThunk() throws a sync error
[#&#8203;14846](https://redirect.github.com/Automattic/mongoose/issues/14846)
- types(query): add $expr to RootQuerySelector
[#&#8203;14845](https://redirect.github.com/Automattic/mongoose/issues/14845)
- docs: update populate.md to fix missing match: { }
[#&#8203;14847](https://redirect.github.com/Automattic/mongoose/issues/14847)
[makhoulshbeeb](https://redirect.github.com/makhoulshbeeb)

###
[`v8.6.0`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#860--2024-08-28)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.5.5...8.6.0)

\==================

- feat: upgrade mongodb -> 6.8.0, handle throwing error on closed cursor
in Mongoose with `MongooseError` instead of `MongoCursorExhaustedError`
[#&#8203;14813](https://redirect.github.com/Automattic/mongoose/issues/14813)
- feat(model+query): support options parameter for distinct()
[#&#8203;14772](https://redirect.github.com/Automattic/mongoose/issues/14772)
[#&#8203;8006](https://redirect.github.com/Automattic/mongoose/issues/8006)
- feat(QueryCursor): add getDriverCursor() function that returns the raw
driver cursor
[#&#8203;14745](https://redirect.github.com/Automattic/mongoose/issues/14745)
- types: change query selector to disallow unknown top-level keys by
default
[#&#8203;14764](https://redirect.github.com/Automattic/mongoose/issues/14764)
[alex-statsig](https://redirect.github.com/alex-statsig)
- types: make toObject() and toJSON() not generic by default to avoid
type widening
[#&#8203;14819](https://redirect.github.com/Automattic/mongoose/issues/14819)
[#&#8203;12883](https://redirect.github.com/Automattic/mongoose/issues/12883)
- types: avoid automatically inferring lean result type when assigning
to explicitly typed variable
[#&#8203;14734](https://redirect.github.com/Automattic/mongoose/issues/14734)

###
[`v8.5.5`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#855--2024-08-28)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.5.4...8.5.5)

\==================

- fix(populate): fix a couple of other places where Mongoose gets the
document's \_id with getters
[#&#8203;14833](https://redirect.github.com/Automattic/mongoose/issues/14833)
[#&#8203;14827](https://redirect.github.com/Automattic/mongoose/issues/14827)
[#&#8203;14759](https://redirect.github.com/Automattic/mongoose/issues/14759)
- fix(discriminator): shallow clone Schema.prototype.obj before merging
schemas to avoid modifying original obj
[#&#8203;14821](https://redirect.github.com/Automattic/mongoose/issues/14821)
- types: fix schema type based on timestamps schema options value
[#&#8203;14829](https://redirect.github.com/Automattic/mongoose/issues/14829)
[#&#8203;14825](https://redirect.github.com/Automattic/mongoose/issues/14825)
[ark23CIS](https://redirect.github.com/ark23CIS)

###
[`v8.5.4`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#854--2024-08-23)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.5.3...8.5.4)

\==================

- fix: add empty string check for collection name passed
[#&#8203;14806](https://redirect.github.com/Automattic/mongoose/issues/14806)
[Shubham2552](https://redirect.github.com/Shubham2552)
- docs(model): add 'throw' as valid strict value for bulkWrite() and add
some more clarification on throwOnValidationError
[#&#8203;14809](https://redirect.github.com/Automattic/mongoose/issues/14809)

###
[`v8.5.3`](https://redirect.github.com/Automattic/mongoose/blob/HEAD/CHANGELOG.md#853--2024-08-13)

[Compare
Source](https://redirect.github.com/Automattic/mongoose/compare/8.5.2...8.5.3)

\==================

- fix(document): call required functions on subdocuments underneath
nested paths with correct context
[#&#8203;14801](https://redirect.github.com/Automattic/mongoose/issues/14801)
[#&#8203;14788](https://redirect.github.com/Automattic/mongoose/issues/14788)
- fix(populate): avoid throwing error when no result and `lean()` set
[#&#8203;14799](https://redirect.github.com/Automattic/mongoose/issues/14799)
[#&#8203;14794](https://redirect.github.com/Automattic/mongoose/issues/14794)
[#&#8203;14759](https://redirect.github.com/Automattic/mongoose/issues/14759)
[MohOraby](https://redirect.github.com/MohOraby)
- fix(document): apply virtuals to subdocuments if parent schema has
virtuals: true for backwards compatibility
[#&#8203;14774](https://redirect.github.com/Automattic/mongoose/issues/14774)
[#&#8203;14771](https://redirect.github.com/Automattic/mongoose/issues/14771)
[#&#8203;14623](https://redirect.github.com/Automattic/mongoose/issues/14623)
[#&#8203;14394](https://redirect.github.com/Automattic/mongoose/issues/14394)
- types: make HydratedSingleSubdocument and HydratedArraySubdocument
merge types instead of using &
[#&#8203;14800](https://redirect.github.com/Automattic/mongoose/issues/14800)
[#&#8203;14793](https://redirect.github.com/Automattic/mongoose/issues/14793)
- types: support schema type inference based on schema options
timestamps as well
[#&#8203;14773](https://redirect.github.com/Automattic/mongoose/issues/14773)
[#&#8203;13215](https://redirect.github.com/Automattic/mongoose/issues/13215)
[ark23CIS](https://redirect.github.com/ark23CIS)
- types(cursor): indicate that cursor.next() can return null
[#&#8203;14798](https://redirect.github.com/Automattic/mongoose/issues/14798)
[#&#8203;14787](https://redirect.github.com/Automattic/mongoose/issues/14787)
- types: allow mongoose.connection.db to be undefined
[#&#8203;14797](https://redirect.github.com/Automattic/mongoose/issues/14797)
[#&#8203;14789](https://redirect.github.com/Automattic/mongoose/issues/14789)
- docs: add schema type widening advice
[#&#8203;14790](https://redirect.github.com/Automattic/mongoose/issues/14790)
[JstnMcBrd](https://redirect.github.com/JstnMcBrd)

</details>

<details>
<summary>kulshekhar/ts-jest (ts-jest)</summary>

###
[`v29.2.5`](https://redirect.github.com/kulshekhar/ts-jest/blob/HEAD/CHANGELOG.md#2925-2024-08-23)

[Compare
Source](https://redirect.github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

</details>

<details>
<summary>microsoft/TypeScript (typescript)</summary>

###
[`v5.6.2`](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.4...a7e3374f13327483fbe94e32806d65785b0b6cda)

[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - "after 9am and before 5pm Monday" (UTC).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/cerbos/query-plan-adapters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. kind/regression A reported bug in functionality that used to work before.
Projects
None yet
Development

No branches or pull requests

8 participants
@aqrln @apolanc @briangottfried @jkomyno @callumJPritchard @satadhi @mathiasayivor and others