volta-cli / volta

Volta: JS Toolchains as Code. ⚡
https://volta.sh
Other
11.08k stars 233 forks source link

volta-shim v2.0.x crashes on macOS 14.6.1 #1868

Open cthompson-avb opened 2 months ago

cthompson-avb commented 2 months ago

I am running macOS 14.6.1 on an Apple M2 Max.

I downloaded the v2.0.0 and v2.0.1 macos releases from the Releases tab.

The executables volta and volta-migrate work. When I run volta-shim (either directly or through the symlink), I get the error:

zsh: killed ./volta-shim

or using fish as my shell, I get the error

fish: Job 1, './volta-shim' terminated by signal SIGKILL (Forced quit)

This error happens with both v2.0.0 and v2.0.1.

For reference, here at the sha256 hashes of the tested files:

1a3e3eb2dfe3ae04512f54a9d1934681e7a4bd72416bf9d13c5e6e8f12aa7712  volta-shim v2.0.0
5e65a74750bf191fd17b038602fc1d74a0207f65c833f081baad48af7e4b184b  volta-shim v2.0.1
charlespierce commented 2 months ago

Hi @cthompson-avb, that's very strange! I have the same macOS version (even an M2 Max), and the same SHA256 hash for volta-shim v2.0.1 and I'm not seeing anything like that.

If you have a chance, can you share your PATH environment variable (feel free to redact anything sensitive, of course!)? Also, if you do export VOLTA_LOGLEVEL=debug and then run the shim, does it show any additional output?

akhilstanis commented 1 month ago

I was having the same issue as well. Tailing the OSX syslog told me there is something wrong with code signature for volta-shim

$ log stream | grep volta
2024-09-04 12:46:21.828817-0700 0x173301   Default     0x0                  0      0    kernel: proc 11651: load code signature error 2 for file "volta-shim"
2024-09-04 12:46:21.829087-0700 0x173302   Default     0x0                  0      0    kernel: (AppleSystemPolicy) ASP: Unable to apply provenance sandbox: 268451845, 11651, /Users/ram-g-rao/.volta/bin/volta-shim
2024-09-04 12:46:21.829170-0700 0x173302   Default     0x0                  0      0    kernel: volta-shim[11651] Corpse allowed 1 of 5
2024-09-04 12:46:21.857160-0700 0x1732fe   Default     0x0                  1056   0    ReportCrash: Formulating fatal 309 report for corpse[11651] volta-shim
2024-09-04 12:46:21.860287-0700 0x1732fe   Default     0x0                  1056   0    ReportCrash: no MetricKit for process volta-shim type 309 bundleId (null)

When running a binary for the first time, OSX will check the code signature of the binary and if the binary is not signed by an apple identified developer, OSX will prompt the user to explicitly give permission to run the binary. Somehow I missed to give the explicit permission when I ran the volta shim for the first time. All the subsequent runs would just kept getting killed by OSX without a prompt. To force OSX to prompt me again, I had to delete the existing volta-shim binary and replace it with a freshly downloaded copy. Running the volta-shim would prompt you with permission to run and on approval things started to work again. 🙌

EsunR commented 1 day ago

I was having the same issue as well. Tailing the OSX syslog told me there is something wrong with code signature for volta-shim

$ log stream | grep volta
2024-09-04 12:46:21.828817-0700 0x173301   Default     0x0                  0      0    kernel: proc 11651: load code signature error 2 for file "volta-shim"
2024-09-04 12:46:21.829087-0700 0x173302   Default     0x0                  0      0    kernel: (AppleSystemPolicy) ASP: Unable to apply provenance sandbox: 268451845, 11651, /Users/ram-g-rao/.volta/bin/volta-shim
2024-09-04 12:46:21.829170-0700 0x173302   Default     0x0                  0      0    kernel: volta-shim[11651] Corpse allowed 1 of 5
2024-09-04 12:46:21.857160-0700 0x1732fe   Default     0x0                  1056   0    ReportCrash: Formulating fatal 309 report for corpse[11651] volta-shim
2024-09-04 12:46:21.860287-0700 0x1732fe   Default     0x0                  1056   0    ReportCrash: no MetricKit for process volta-shim type 309 bundleId (null)

When running a binary for the first time, OSX will check the code signature of the binary and if the binary is not signed by an apple identified developer, OSX will prompt the user to explicitly give permission to run the binary. Somehow I missed to give the explicit permission when I ran the volta shim for the first time. All the subsequent runs would just kept getting killed by OSX without a prompt. To force OSX to prompt me again, I had to delete the existing volta-shim binary and replace it with a freshly downloaded copy. Running the volta-shim would prompt you with permission to run and on approval things started to work again. 🙌

I have been reinstall volta for twice, but still don't have see any permission request, it seems like still will be crash next time.