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

Cant use go run github.com/prisma/prisma-client-go db push on Linux ARM-64 #572

Closed
Looskie opened this issue Sep 12, 2021 · 13 comments · Fixed by #814
Closed

Cant use go run github.com/prisma/prisma-client-go db push on Linux ARM-64 #572

Looskie opened this issue Sep 12, 2021 · 13 comments · Fixed by #814
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.

Comments

@Looskie
Copy link
Contributor

Looskie commented Sep 12, 2021

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
prisma/prisma#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
@heybereket
Copy link

cheers
image

@steebchen steebchen added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Sep 13, 2021
@hexiro
Copy link

hexiro commented Sep 15, 2021

cheers
image

@liamross
Copy link

liamross commented Jan 11, 2022

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?

@janpio
Copy link
Collaborator

janpio commented Jan 11, 2022

Nothing got changed there, so nothing should break.

Do you get the same message as the original poster? Or something slightly different? Whcih version?

@liamross
Copy link

liamross commented Jan 11, 2022

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.

@janpio
Copy link
Collaborator

janpio commented Jan 11, 2022

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.

@liamross
Copy link

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.

@janpio
Copy link
Collaborator

janpio commented Jan 12, 2022

So generate is the first command that fails? Same error output?

@steebchen
Copy link
Owner

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

@heybereket
Copy link

Thank you
image

@hexiro
Copy link

hexiro commented Jun 21, 2023

Thank you
image

@steebchen
Copy link
Owner

It MIGHT be fixed via #814, but honestly I have no idea if it does :D

@steebchen steebchen linked a pull request Jun 21, 2023 that will close this issue
5 tasks
@Looskie
Copy link
Contributor Author

Looskie commented Jun 26, 2023

steeb the GOAT

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
Development

Successfully merging a pull request may close this issue.

6 participants