Skip to content
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

relaunch(); only quits #164

Open
Alex313031 opened this issue Aug 2, 2023 · 12 comments
Open

relaunch(); only quits #164

Alex313031 opened this issue Aug 2, 2023 · 12 comments

Comments

@Alex313031
Copy link

  • Leaving code identical and simply switching out upstream electron for castlabs causes app.relaunch(); followed by app.quit(); to not
    relaunch the app on Linux or Windows 7.

VMS signing on Windows 7 doesn't seem to work. Using Python 3.9 just like on my Win10 machine where singing works.

@khwaaj
Copy link
Collaborator

khwaaj commented Aug 3, 2023

Which version of ECS are you using? Also, do you have some logs from when VMP signing fails?

@Alex313031
Copy link
Author

Alex313031 commented Aug 28, 2023

@khwaaj Fixed the VMP signing, it was an error on my part.

However, the relaunch issue is still present on all platforms.

Using vanilla electron works fine. I made no changes to my code or the electron version, only whether it was vanilla vs Castlabs. The issue occurs with Electron 21 - 25. Seems to be resolved with 26, but I am purposefully using Electron 22 for Win7/8/8.1 and MacOS <10.14 support.

Disabling Widevine completely by removing the await components.whenReady(); and require ( ..., components, ...) section does not fix the issue, leading me to believe some other modification you have made other than the component updater from Chromium is at fault.

Another experiment I did, just to provide further confirmation to rule out my code being the culprit, is I tried changing a completely different app (Caprine) to use castlabs electron rather than upstream, and the same issue appears. When toggling a setting that requires a restart, sending app.relaunch(); and app.quit(); doesn't work, and the app just closes. Enabling Electron logging doesn't show anything amiss, so I am puzzled.

@Alex313031 Alex313031 changed the title Two problems. relaunch() and signing on win7 relaunch(); only quits Aug 28, 2023
@khwaaj
Copy link
Collaborator

khwaaj commented Aug 28, 2023

This is puzzling indeed. None of the changes we have made to Electron even remotely relate to relaunch behavior, so it is very unclear what could be the culprit here.

We did have a similar issue reported a while back which I was not able to reproduce in my setup, I'll see about reproducing this one. Do you perhaps have a minimal example to share?

@Alex313031
Copy link
Author

@khwaaj Sure, I can make a minimal Electron app to show you the issue

@Alex313031
Copy link
Author

Alex313031 commented Aug 30, 2023

@khwaaj Here you go > https://github.com/Alex313031/castlabs-test

Bare minimum app. Only 58 lines long. Simply opens a window to Google.com, and adds Go Back, Go Forward, Relaunch, and Quit menu items.

Try the relaunch and you will see what I'm talking about.

Change the Electron in package.json to upstream electron, re-run npm install, and you will see that relaunching runs correctly.

@khwaaj
Copy link
Collaborator

khwaaj commented Aug 31, 2023

Just tested your minimal example with v25.7.0+wvcus-darwin-arm64 (Ventura) and I can't reproduce the issue. Selecting "Restart App" in the menu quits and relaunches the application as expected.

You said "all platforms", but can this be limited somehow to the setups you are using?

@Alex313031
Copy link
Author

Alex313031 commented Sep 1, 2023

@khwaaj I'm sorry, I shouldn't have said all platforms. I don't have a Mac, so I couldn't test there. On linux it definitely shows up, and occurs every time you try to relaunch. And I dont think its my system. I have tried on ubuntu and debian, with node 14, 16, and 18, and with various castlabs releases from 21-25.

On Windows it sometimes occurs. It seems to happen more often when more than one window is open, for example in my Quark Player app when using Ctrl + N to make a new Window. Because it doesn't occur every time, I wonder if it is some sort of race condition. Windows version doesn't seem to affect it. It happens on Win 7 (electron 21 and 22), and Win 10 and Win 11.

@Alex313031
Copy link
Author

@khwaaj Are you there?

@khwaaj
Copy link
Collaborator

khwaaj commented Sep 14, 2023

Absolutely, there are just a lot of other things going on that has priority at the moment, so I'm not entirely sure when there will be time to debug this properly.

@Alex313031
Copy link
Author

@khwaaj Issue is still present in Electron 28

@Alex313031
Copy link
Author

@khwaaj Issue is still present in all Electron versions including 29 and latest beta. No response since september of last year, and all my apps that have a "restart" or "relaunch" function fail to do so on Linux. I get github issues all the time with users asking why it doesn't work and I have to explain that it's an upstream thing. It's getting frustrating.

@khwaaj
Copy link
Collaborator

khwaaj commented Apr 7, 2024

I did look into this a bit more recently, and I am able to reproduce it on Linux (but nowhere else). Unfortunately the cause is not clear so there is no proper solution yet, it does however seem related to a bunch of other issues reported for ECS as well as other Electron based projects (all of these involve some combination of SIGTRAP/SIGILL errors during sandbox/zygote startup). Passing --no-sandbox --no-zygote arguments does fix the relaunch issue in my test, albeit is not a good production solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants