-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
After upgrading to Prisma 3.10 from 3.9, remix site crashes on connection (Codesigning issue on M1 Macs) #12016
Comments
What does |
Remix builds the site, and starts an express server. The Prisma connection is managed through this code
which is form the Remix documentation (https://remix.run/docs/en/v1/tutorials/jokes#connect-to-the-database). As far as I can tell, it deadlocks when trying to connect to the database. I have unfortunately not had the time to attempt a reproducing example, but I hope to do so. I wanted to create a bug before I had a reproduction with enough description that others could find it if they encounter the same issue. |
I experienced something similar though with a Next.js application - I wasn't able to put together a reproduction as my clean repo didn't crash the process, so I decided to try deleting all I have a monorepo, so I located all So at least for me, the issue manifested when I already had a generated client from 3.9, and cleaning up the old version before running generate again appears to have fixed it. |
Thanks, that solved my issue! Wouldn't have occured to me, since otherwise the watcher I have regenerating prisma files has worked without a hitch. |
Can you still follow which |
The repository I work in is not a monorepo yet, so for me it was the standard node_modules/.prisma location. |
Interesting. Upgrading the package should also |
@janpio fascinating, this is an interesting one, I was able to reproduce! For extra context, I did run So the issue is macOS code signing on M1 Macs! Specifically, code signing breaks when replacing a binary with the contents of a new binary, for example you can reproduce this via the following: $ cp /usr/bin/false ./example
$ ./example # works
$ cp /usr/bin/true ./example
$ ./example # killed by the kernel By creating the I believe that's what is happening here, when upgrading from 3.9 to 3.10, the file This manifests as the following log lines in Console:
Note the I think the potential fixes would be:
Another benefit to (1) is it would clean up old files, I also discovered that after upgrading from 3.9 to 3.10 a leftover Credit to https://openradar.appspot.com/FB8914243 for the simple reproduction of the issue above. |
Oh wow. Instant reopen of this issue then. This points that we should probably add the version to the file name or put the engines into a folder named after the version. |
Might be superfluous since the cause seems to have been found by @jacobwgillespie above, but can confirm the issue also happens with SvelteKit (so not only Remix) after updating Prisma to Attempting to connect after starting a dev server ends the process with I am also on M1 and I did run |
If anyone is in the position to do this, a copy of the |
I still have a copy of my test files, here's some zips:
You can see the leftover One of the things that lead to the finding above was that if I made a copy of the project the copy worked. As in, if I upgraded from 3.9 to 3.10, the project was broken, but if I |
I did try this on my machine and wasn't able to reproduce. Looks like we will require more information here. |
@pantharshit00 do you have an M1 Mac? From my understanding this specifically triggers on The steps to reproduce that work for me, if useful:
|
Got the same issue when upgrading Prisma from version 3.14 to 3.15. I'm on a MacBook Pro (14-inch, 2021) with an M1 Pro chip. |
Same here on M1 MacBook Pro and upgrading from version 3.14 to 3.15. |
I experienced the same problem when upgrading to 4.0.0 on a Mac Book Pro M1 Max. Completely uninstalling Here's first part of the node crash report that led me to this GitHub issue:
|
Related: #14058 |
A fix for the codesigning problem (or rather a workaround since it seems to be a macOS issue) is included in 4.1.0 and later, so this should be resolved now. I'm going to go ahead and close this issue, please feel free to reopen or create a new issue if you still run into this. |
Bug description
In a Remix.run site I'm developing, I updated Prisma from 3.9.1 to 3.10. This made the server crash with the following message.
Downgrading to Prisma 3.9.2 worked again. Tested multiple times to switch version with consistent behaviour.
Note that Prisma studio works in both versions.
How to reproduce
Unclear. Similar issues have been discussed in the Remix discord (https://discord.com/channels/770287896669978684/938793097414975528/938795339757010964)
See also #11995
Expected behavior
No response
Prisma information
System seems to crash on connection to the database.
Environment & setup
Computer: MacBook Pro 14 inch, M1 Max, macOS Monterey 12.2
Database: Postgresql 14.1 installed from homebrew
Node: v17.6.0
Remix: 1.2.2 (also tested 1.2.1)
Prisma Version
Non-working version
Working version
The text was updated successfully, but these errors were encountered: