-
Notifications
You must be signed in to change notification settings - Fork 6
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
Not working in packed electron >=17.3 #74
Comments
Although I didn't expect that to also happen in a minimal sample with just the |
After some more investigation and trying out a lot of different electron versions, I can report that it breaks with electron version 17.3.0. The prior version, 17.2.0 works fine and all 17.x versions > 17.3 fail. This makes sense, as in the release notes we can find the following:
That PR is a backport of electron/electron#33216 which changes the behaviour of asar support in worker threads. That all makes sense now. Companion is using an electron version which is way lower than 17 and before it broke for me, I was using electron 17.2.0. Hopefully someone knows how to fix this! I'm happy to test possible fixes or make a PR if someone points me in the right direction. |
I guess this is probably the hack I did for asar support threadedClass/src/parent-process/workerPlatform/workerThreads.ts Lines 25 to 29 in 1f6458a
|
Yeah, I found that, too. I tried to disable that by just deleting those four lines. If you look at
in the first comment and at the second code block, you can see that it did start the worker thread then, but the communication did not seem to work. However, I just tried that in the reproduction repo and it works fine there. That means, I probably broke something in my application. I guess I'll make a PR then which only uses the loader if the electron version is below 17.3. |
@nytamin maybe at some point soon the DEFAULT_ELECTRON_LOADER should be removed and a semver major bump could be done? electron 19 is EOL now, so dropping support for those older versions isnt unreasonable. |
According to the release notes electron |
Hi,
continuing here from nrkno/sofie-atem-connection#133.
TLDR:
electron@20
andthreadedclass@1.2.0
atem-connection
which internally usesthreadedclass
node .
orelectron .
electron-builder
)After digging a bit into the code (and rebuilding the installer every time to test changes), I found that somehow:
console.log
statements (using a debugger is difficult since the app needs to be packed for the bug to happen) to all the event listeners here.Details
I would see this as partly successfull, because the log line
--------------> Worker thread started
is being logged in the worker file at the very top. That means it should have loaded the worker now, right?Maximum call stack size exceeded
is thrown due to my primitive way of logging. Still investigating@Julusian any thoughts on that?
The text was updated successfully, but these errors were encountered: