prisma-client-go
prisma-client-go copied to clipboard
Cant use `go run github.com/prisma/prisma-client-go db push` on Linux ARM-64
Hi, I've been having a ton of problems on my Raspberry Pi running Ubuntu 64bit running the go run github.com/prisma/prisma-client-go db push
command.
I've been trying to debug this for around 10hrs+ and I think I might have found the issue?
I think its related to this https://github.com/prisma/prisma/issues/861
Here is the stack trace for go run github.com/prisma/prisma-client-go db push
panic: could not run [db push --preview-feature]: fork/exec /home/ubuntu/.cache/prisma/binaries/cli/2.26.0/prisma-cli-linux: exec format error
goroutine 1 [running]:
main.main()
/home/ubuntu/go/pkg/mod/github.com/prisma/[email protected]/main.go:29 +0x40c
exit status 2
Please let me know what you think! Hope you're having a good day ❤️
Also side note, I tried installing the prisma CLI and tried doing it that way just for a shine of hope, and it generated it, but it panics on Connect
saying
panic: ensure: version check failed: fork/exec /tmp/prisma/binaries/engines/9b816b3aa13cc270074f172f30d6eda8a8ce867d/unpacked/prisma-query-engine-linux: exec format error
goroutine 1 [running]:
main.main()
/home/ubuntu/actions-runner/next/imperial/imperial/services/go/packages/api/main.go:91 +0x350
exit status 2
cheers
cheers
This issue started randomly happening for me today. Deployed on Render. System info:
Linux
5.4.0-1039-gke
#41~18.04.1-Ubuntu SMP Sat Mar 20 14:57:07 UTC 2021
x86_64
Obviously I know the package is dead in the water, but I didn't expect it to just randomly break the binaries. Are these not the common Prisma binaries? Presumably it should continue to work?
Nothing got changed there, so nothing should break.
Do you get the same message as the original poster? Or something slightly different? Whcih version?
The error started happening on a redeploy of the exact same branch, so I suspect it has to do with fetching the system-specific CLI or binaries? You would probably know more about what Prisma does under the hood. Here is the error readout:
panic: could not run [migrate deploy --schema data/prisma/schema.prisma]: signal: segmentation fault
goroutine 1 [running]:
main.main()
/opt/render/project/go/pkg/mod/github.com/prisma/[email protected]/main.go:29 +0x34c
exit status 2
I fixed it by doing the generate and deploy locally (M1 mac) and then zipping it up with the binaries that I extracted from my last functioning deploy and unzipping it during deploy on the server... Not an ideal fix. Basically if I try to generate or deploy on the linux box it breaks.
Can you compare the new (broken) to the old (working) binaries? Can you list the binaries more exact? I do not have the full context on what the Go client does internally.
I can't because the binaries never actually get generated. The command to generate the Go types and the binaries (generate
) also fails with a similar message to the deploy
command above. That's why the workaround is to run it locally on M1 and then zip it and deploy that on the server to avoid running generate
and deploy
as part of my build script on Linux where it breaks.
So generate
is the first command that fails? Same error output?
Alright so it's quite clear why this is not working at this point. This is not a priority but I can take a look if anyone is still interested in having linux arm 64 binaries.
If you try, please use the latest branch as there are some fixes around the binaries: go get github.com/steebchen/prisma-client-go@main
Thank you
Thank you
It MIGHT be fixed via #814, but honestly I have no idea if it does :D
steeb the GOAT