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 Connect Causes NodeJS to Close With Exit Code 0 #18336
Comments
I'll be adding the results of |
# ~/Desktop/prisma.log
> site@0.0.1 dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/alexis/Desktop/site/.env
warn - You have enabled experimental feature (appDir) in next.config.mjs.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
info - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
2023-03-15T18:31:17.738Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:31:17.739Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
info - automatically enabled Fast Refresh for 1 custom loader
2023-03-15T18:31:17.840Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:31:17.840Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
2023-03-15T18:31:17.844Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:31:17.844Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
event - compiled client and server successfully in 1042 ms (263 modules)
wait - compiling...
wait - compiling /database/page (client and server)...
2023-03-15T18:31:25.127Z next:jsconfig-paths-plugin paths are empty, bailing out
... (Redacted Because Same Message 1,000+ times)
2023-03-15T18:31:25.127Z next:jsconfig-paths-plugin paths are empty, bailing out
event - compiled client and server successfully in 6s (452 modules)
2023-03-15T18:31:25.589Z prisma:tryLoadEnv Environment variables loaded from /home/alexis/Desktop/site/.env
2023-03-15T18:31:25.592Z prisma:tryLoadEnv Environment variables loaded from /home/alexis/Desktop/site/.env
2023-03-15T18:31:25.593Z prisma:client dirname /home/alexis/Desktop/site/node_modules/.prisma/client
2023-03-15T18:31:25.593Z prisma:client relativePath ../../../prisma
2023-03-15T18:31:25.593Z prisma:client cwd /home/alexis/Desktop/site/prisma
2023-03-15T18:31:25.593Z prisma:client protocol graphql
2023-03-15T18:31:25.594Z prisma:client clientVersion 4.11.0
2023-03-15T18:31:25.594Z prisma:client clientEngineType library
2023-03-15T18:31:25.594Z prisma:client:libraryEngine internalSetup
2023-03-15T18:31:25.668Z prisma:tryLoadEnv Environment variables loaded from /home/alexis/Desktop/site/.env
2023-03-15T18:31:25.671Z prisma:tryLoadEnv Environment variables loaded from /home/alexis/Desktop/site/.env
2023-03-15T18:31:25.671Z prisma:client dirname /home/alexis/Desktop/site/node_modules/.prisma/client
2023-03-15T18:31:25.671Z prisma:client relativePath ../../../prisma
2023-03-15T18:31:25.671Z prisma:client cwd /home/alexis/Desktop/site/prisma
2023-03-15T18:31:25.672Z prisma:client protocol graphql
2023-03-15T18:31:25.672Z prisma:client clientVersion 4.11.0
2023-03-15T18:31:25.672Z prisma:client clientEngineType library
2023-03-15T18:31:25.673Z prisma:client:libraryEngine internalSetup
2023-03-15T18:31:25.600Z prisma:get-platform Found distro info:
{
"targetDistro": "debian",
"familyDistro": "debian",
"originalDistro": "debian"
}
2023-03-15T18:31:25.611Z prisma:get-platform Command "uname -m" successfully returned "x86_64
"
2023-03-15T18:31:25.611Z prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu")
2023-03-15T18:31:25.636Z prisma:get-platform Command "ls -v "libssl.so.0*" /usr/lib/x86_64-linux-gnu | grep libssl.so | grep -v "libssl.so.0"" successfully returned "libssl.so.1.1
"
2023-03-15T18:31:25.636Z prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1
2023-03-15T18:31:25.636Z prisma:get-platform The parsed libssl version is: 1.1.x
2023-03-15T18:31:25.637Z prisma:get-platform Found distro info:
{
"targetDistro": "debian",
"familyDistro": "debian",
"originalDistro": "debian"
}
2023-03-15T18:31:25.642Z prisma:get-platform Command "uname -m" successfully returned "x86_64
"
2023-03-15T18:31:25.642Z prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu")
2023-03-15T18:31:25.666Z prisma:get-platform Command "ls -v "libssl.so.0*" /usr/lib/x86_64-linux-gnu | grep libssl.so | grep -v "libssl.so.0"" successfully returned "libssl.so.1.1
"
2023-03-15T18:31:25.666Z prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1
2023-03-15T18:31:25.667Z prisma:get-platform The parsed libssl version is: 1.1.x
2023-03-15T18:31:25.668Z prisma:client:libraryEngine:loader Searching for Query Engine Library in /home/alexis/Desktop/site/node_modules/.prisma/client
2023-03-15T18:31:25.668Z prisma:client:libraryEngine:loader loadEngine using /home/alexis/Desktop/site/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node
2023-03-15T18:31:25.760Z prisma:get-platform Found distro info:
{
"targetDistro": "debian",
"familyDistro": "debian",
"originalDistro": "debian"
}
2023-03-15T18:31:25.777Z prisma:get-platform Command "uname -m" successfully returned "x86_64
"
2023-03-15T18:31:25.778Z prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu")
2023-03-15T18:31:25.819Z prisma:get-platform Command "ls -v "libssl.so.0*" /usr/lib/x86_64-linux-gnu | grep libssl.so | grep -v "libssl.so.0"" successfully returned "libssl.so.1.1
"
2023-03-15T18:31:25.819Z prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1
2023-03-15T18:31:25.819Z prisma:get-platform The parsed libssl version is: 1.1.x
2023-03-15T18:31:25.821Z prisma:get-platform Found distro info:
{
"targetDistro": "debian",
"familyDistro": "debian",
"originalDistro": "debian"
}
2023-03-15T18:31:25.836Z prisma:get-platform Command "uname -m" successfully returned "x86_64
"
2023-03-15T18:31:25.836Z prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu")
2023-03-15T18:31:25.876Z prisma:get-platform Command "ls -v "libssl.so.0*" /usr/lib/x86_64-linux-gnu | grep libssl.so | grep -v "libssl.so.0"" successfully returned "libssl.so.1.1
"
2023-03-15T18:31:25.876Z prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1
2023-03-15T18:31:25.877Z prisma:get-platform The parsed libssl version is: 1.1.x
2023-03-15T18:31:25.878Z prisma:client:libraryEngine:loader Searching for Query Engine Library in /home/alexis/Desktop/site/node_modules/.prisma/client
2023-03-15T18:31:25.878Z prisma:client:libraryEngine:loader loadEngine using /home/alexis/Desktop/site/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node
2023-03-15T18:31:25.882Z prisma:client:libraryEngine library starting |
This is the log from when I commented out the code that causes the crash. Nothing else was changed in the code # ~/Desktop/prisma-no-crash.log
> site@0.0.1 dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/alexis/Desktop/site/.env
warn - You have enabled experimental feature (appDir) in next.config.mjs.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
info - Thank you for testing `appDir` please leave your feedback at https://nextjs.link/app-feedback
2023-03-15T18:32:47.651Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:32:47.652Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
2023-03-15T18:32:47.668Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:32:47.668Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
2023-03-15T18:32:47.679Z next:jsconfig-paths-plugin tsconfig.json or jsconfig.json paths: {}
2023-03-15T18:32:47.680Z next:jsconfig-paths-plugin resolved baseUrl: /home/alexis/Desktop/site
info - automatically enabled Fast Refresh for 1 custom loader
event - compiled client and server successfully in 1497 ms (263 modules)
wait - compiling...
wait - compiling /database/page (client and server)...
2023-03-15T18:32:56.104Z next:jsconfig-paths-plugin paths are empty, bailing out
... (Redacted Because Same Message 1,000+ times)
2023-03-15T18:32:56.105Z next:jsconfig-paths-plugin paths are empty, bailing out
event - compiled client and server successfully in 6.6s (450 modules)
2023-03-15T18:32:56.565Z compression gzip compression
error - SyntaxError: "undefined" is not valid JSON
at JSON.parse (<anonymous>)
2023-03-15T18:32:56.653Z send allow dotfile "/home/alexis/Desktop/site/.next/static/chunks/polyfills.js"
2023-03-15T18:32:56.654Z send stat "/home/alexis/Desktop/site/.next/static/chunks/polyfills.js"
2023-03-15T18:32:56.656Z send pipe "/home/alexis/Desktop/site/.next/static/chunks/polyfills.js"
2023-03-15T18:32:56.657Z send accept ranges
2023-03-15T18:32:56.657Z send modified Wed, 15 Mar 2023 18:32:48 GMT
2023-03-15T18:32:56.657Z send etag W/"16544-186e68bd39c"
2023-03-15T18:32:56.657Z send content-type application/javascript
2023-03-15T18:32:56.662Z send allow dotfile "/home/alexis/Desktop/site/.next/static/chunks/webpack.js"
2023-03-15T18:32:56.663Z send stat "/home/alexis/Desktop/site/.next/static/chunks/webpack.js"
2023-03-15T18:32:56.664Z send allow dotfile "/home/alexis/Desktop/site/.next/static/chunks/main-app.js"
2023-03-15T18:32:56.665Z send stat "/home/alexis/Desktop/site/.next/static/chunks/main-app.js"
2023-03-15T18:32:56.667Z send pipe "/home/alexis/Desktop/site/.next/static/chunks/webpack.js"
2023-03-15T18:32:56.667Z send accept ranges
2023-03-15T18:32:56.667Z send modified Wed, 15 Mar 2023 18:32:56 GMT
2023-03-15T18:32:56.668Z send etag W/"dac4-186e68beffc"
2023-03-15T18:32:56.668Z send content-type application/javascript
2023-03-15T18:32:56.668Z send pipe "/home/alexis/Desktop/site/.next/static/chunks/main-app.js"
2023-03-15T18:32:56.668Z send accept ranges
2023-03-15T18:32:56.669Z send modified Wed, 15 Mar 2023 18:32:48 GMT
2023-03-15T18:32:56.669Z send etag W/"4bc31a-186e68bd39c"
2023-03-15T18:32:56.669Z send content-type application/javascript
2023-03-15T18:32:56.670Z compression gzip compression
2023-03-15T18:32:56.671Z compression gzip compression
2023-03-15T18:32:56.672Z compression gzip compression
2023-03-15T18:32:57.125Z send allow dotfile "/home/alexis/Desktop/site/.next/static/chunks/app-client-internals.js"
2023-03-15T18:32:57.126Z send stat "/home/alexis/Desktop/site/.next/static/chunks/app-client-internals.js"
2023-03-15T18:32:57.126Z send pipe "/home/alexis/Desktop/site/.next/static/chunks/app-client-internals.js"
2023-03-15T18:32:57.126Z send accept ranges
2023-03-15T18:32:57.126Z send modified Wed, 15 Mar 2023 18:32:56 GMT
2023-03-15T18:32:57.126Z send etag W/"82e07-186e68bf000"
2023-03-15T18:32:57.126Z send content-type application/javascript
2023-03-15T18:32:57.127Z compression gzip compression |
I just found out my copy of prisma studio segfaults too, so it may not be nextjs that's the issue |
For some reason, Netlify was about to actually finish the build process this time, so I was able to verify that Prisma works in the Next.js app directory when it's not segfaulting. https://netlify.alexisart.me/database On my Debian laptop, it still segfaults. |
Maybe read through these and see if there is a workaround that might work for you: https://github.com/prisma/prisma/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22topic%3A+segmentation+fault%22 |
I had tested #10649 (comment) and setting |
Hi @alexisart and thank you for the report! Could you check if updating This is an experimental dev version not intended for production but if it works as expected, we'll work on making this land in a stable release. Thank you! |
Yes, this fixes the issue both for Prisma studio and for not using |
Thank you for checking and for confirming! I'm going to leave this issue open for now since #18426 is not merged yet, we are now confident that it works and doesn't introduce any unwanted side effects, and will work on finalizing and releasing it ASAP. |
This issue is fixed in Prisma 4.13.0 which will be released tomorrow, on Tuesday, Apr 18. If you need to temporarily use a pre-release version until then, you can use For future readers: Note that this GitHub issue is about a specific bug that occurs when using Node.js 17+ on a system with OpenSSL 1.1 on x86-64 CPUs when using TLS to connect to database. Please do not post comments here if you encounter a segfault under different circumstances, and open a new issue instead. If you are facing segfaults on ARM, please leave a comment in #18510 or open a new issue. |
Bug description
Prisma causes nextjs dev environment to exit with code 0 after connection
How to reproduce
I don't have a pages directory, I only have an app directory. The client exits no matter if using route.ts(x) or page.ts(x)
Expected behavior
Prisma to retrieve all rows and not exit the nextjs app instead
Prisma information
Environment & setup
Prisma Version
npx prisma -v
The text was updated successfully, but these errors were encountered: