-
Notifications
You must be signed in to change notification settings - Fork 42
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
sclang timeout on electron build #74
Comments
Always? Do you have a public repo I can try?
Thanks Lorenzo
Lorenzo Rivosecchi <[email protected]> schrieb am So., 15. Dez.
2019, 20:58:
… 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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#74?email_source=notifications&email_token=AABVM4XLDEJX2JZI27UWCTDQY2EABA5CNFSM4J3BXPKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IASXDPQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVM4WZYOVJBS3X4HCK34DQY2EABANCNFSM4J3BXPKA>
.
|
Yes always, here is the repo https://github.com/lorenzorivosecchi/superorch |
Sorry, it's been the craziest week of the year. I'll have a chance to peek at that over the holidays. Thanks! |
Less crazy, but still crazy. Sorry that I haven't had the time to look into this yet. |
|
Good to hear!
…On Thu, Jan 30, 2020 at 2:43 PM Lorenzo Rivosecchi ***@***.***> wrote:
I rebuilt the project from scratch with a new electron configuration and
the problem doesn't persist.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#74?email_source=notifications&email_token=AABVM4T7E6YCMAY2CAMLOILRALKRNA5CNFSM4J3BXPKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKLA3BI#issuecomment-580259205>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVM4VS4SGZRRXR2DREXXDRALKRNANCNFSM4J3BXPKA>
.
|
The compilation of the class library fails because nano ~/Library/Application\ Support/SuperCollider/sclang_conf.yaml includePaths: []
excludePaths: []
postInlineWarnings: false Then the error from before disappear, but the compilation fails again. # launch the app from terminal to see the error message
myapp/dist/mac/myapp.app/Contents/MacOS/myapp
here is a repo to test the problem |
That's surprising. I was pretty sure it wasn't needed. |
This is happening only on the built version of the app via electron builder. What could I do to have more detailed log of the error ? |
Ah, you need to have a portable copy inside your electron bundle! You can't use your /Application one. Electron cannot access anything outside of it's package. This project is 3 years old but might give you some help: I manually copied scsynth etc. into app/vendor. There is a script shown there for launching scsynth. You could do the same for sclang. Look at the SoundApp that starts it up: This is all very fragile. I always wanted to get an npm package that includes a portable scsynth and sclang. That would be ideal. |
sclang can be a problem to make it portable. The way it's built it depends on having the Qt packages in the exact same relative paths. I had problems trying to fix all the linking. |
This was the project I did: https://medium.com/@crucialfelix/experimental-data-aesthetics-4563d01a5ebb I had hoped that Electron would be easier to work with. |
Hi @crucialfelix, i have managed to get sclang to work from the terminal. Here is the file structure I ended up with.
Now I am having a little bit of trouble understanding how to link Thank you very much btw |
Almost solved: I'm passing the correct sclang path to supercolliderjs via options.
I've put a console log inside the function to see what's wrong. console.log(execPath, commandLineOptions); This is the result:
@crucialfelix seems like |
I seem to remember that asar is an isolated filesystem. The path as seen by the node process running in electron is not the full host path. Can you look again at the example app from 2017? Things may have changed since then. Not sure |
Yes, the official guidelines say that using
|
Update: I got around the problem by keeping every supercollider resource, including supercolliderjs, in a unpackaged directory called Now when I call sclang through a shell script, like in play-splom, the class libraries get compiled, but no connection between node and the process is created. What is the difference between passing a script to |
The script is to change your CWD. The way that sclang is linked and compiled, it assumes that you are calling the binary from that directory. The links to the other binary objects are relative to CWD (current working directory). So as long as the process sets the cwd correctly, you can get away with not using the script. When you are done I will put together a document of all you've discovered. I'll add it to the docs as a markdown. |
Ok, I've found a solution. Basically every module required by supercolliderjs must be unpacked, therefore being located inside Also all path statements that involve unpacked modules should be modified to point to @crucialfelix I've created an example repo that you can use as a reference. |
Sclang booting reaches timeout on electron but only on the production build.
This is the log:
How to reproduce this issue:
Environment
The text was updated successfully, but these errors were encountered: