supercolliderjs: sclang timeout on electron build
Sclang booting reaches timeout on electron but only on the production build.
This is the log:
Loading config: /Users/lorenzo/Developer/Node/superorch/.supercollider.yaml
debug : {
"debug": true,
"echo": true,
"sclang": "/Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang",
"scsynth": "/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth",
"stdin": false,
"failIfSclangConfIsMissing": false,
"conf": {
"includePaths": [],
"excludePaths": [],
"postInlineWarnings": false
},
"sclang_conf": "/Users/lorenzo/Library/Application Support/SuperCollider/sclang_conf.yaml"
}
debug : {
"errno": -2,
"syscall": "open",
"code": "ENOENT",
"path": "/Users/lorenzo/Library/Application Support/SuperCollider/sclang_conf.yaml"
}
[ 101, 'connection open' ]
debug : compiling class library...
[Error: net::ERR_HTTP_RESPONSE_CODE_FAILURE]
error : Timeout waiting for sclang to boot pid:28774
SCError {
data: SclangCompileResult {
version: '',
stdout: '',
errors: [],
extensionErrors: [],
duplicateClasses: [],
dirs: []
}
}
How to reproduce this issue:
- Create React App + Electron setup
- On App.js use an electron channel to boot sclang
Environment
- MacOS: 10.15
- electron: 7.1.2
- electron-builder: 21.1.1
- SuperColliderjs 1.0.0-beta.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (10 by maintainers)
Ok, I’ve found a solution.
Basically every module required by supercolliderjs must be unpacked, therefore being located inside
MyApp/Contents/Resources/app.asar.unpacked.Also all path statements that involve unpacked modules should be modified to point to
app.asar.unpackedrather thenapp.asar. To do this I have found this library called hazardous that does that for you.@crucialfelix I’ve created an example repo that you can use as a reference. https://github.com/lorenzorivosecchi/electron-with-supercollider-example
Sorry, it’s been the craziest week of the year. I’ll have a chance to peek at that over the holidays. Thanks!