`JZZ()` call fails on WSL(1,2) and Ubuntu without sound devices
lhl2617 opened this issue · 11 comments
Reproduction Repository
https://github.com/lhl2617/jzz-wsl2-repro
Issue Summary
JZZ()
call fails crashes on WSL2 without any catch-able exceptions.
Reproduction environment
Windows Version
Windows 10 Version 20H2 (OS Build 19042.867)
WSL2 Version
2
WSL Ubuntu Version
$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l
$ uname -a
Linux <REDACTED> 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Node version
v12.22.1
Reproduction Steps
- Set up reproduction environment.
- Clone repository into WSL2.
- Run
npm i
- Run
npm start
Expected Behavior
Runs without any logs (succeeded), or fails gracefully with the exception caught.
Obtained Behavior
$ npm run start
> jzz-testing@1.0.0 start /home/$USER/experimental/jzz
> node index.js
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
node: seq.c:1880: snd_seq_query_next_client: Assertion `seq && info' failed.
Aborted
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! jzz-testing@1.0.0 start: `node index.js`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the jzz-testing@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/$USER/.npm/_logs/2021-05-14T11_23_57_411Z-debug.log
I also tried using JZZ().or(...)
which has the same behavior.
I am not expecting JZZ to work on WSL2 (or any Docker container running on top of a Windows host for that matter)--but it would be nice to have it able to catch the errors rather than let it crash catastrophically.
This is now also failing on Ubuntu and WSL1
https://github.com/lhl2617/jzz-wsl2-repro/actions/runs/842109677
Likely due to the fact that there is no snd
device
Interesting problem...
Apparently, there is no /dev/snd/seq on Windows.
I wonder if any MIDI application works on WSL at all...
On ubuntu
it may fail if the system doesn't have any sound devices: https://github.com/lhl2617/jzz-wsl2-repro/runs/2583738892?check_suite_focus=true
I wonder if any MIDI application works on WSL at all...
I doubt so--it took me a whole day to set up even simple audio playback via a Pulse server. Though, I think more importantly the call to JZZ()
should fail gracefully
That makes sense. Hopefully it can be fixed on the jazz-midi side...
Thanks a lot for bringing it up!
Please update jazz-midi to v1.7.5 - it should work now (I hope)...
Please update jazz-midi to v1.7.5 - it should work now (I hope)...
Still getting the same result after running npm i jazz-midi@1.7.5
$ npm run start
> jzz-testing@1.0.0 start /home/$USER/experimental/jzz
> node index.js
ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
Pushed to repo. GitHub actions is currently dead, but we should be able to see results later...
Yes, I keep the ALSA warning, but it should not throw anymore.
Yes, I keep the ALSA warning, but it should not throw anymore.
Ah my bad! Yes it does work now :) Thanks so much!
PS--would be great if you could update and re-release the JZZ/jzz-midi-smf etc. packages with "jazz-midi": "^1.7.5"