Closed lehades closed 2 years ago
Hey can you try on cider's devtools console with
ipcRenderer.send('relaunchApp','');
?
This never worked correctly, electron's relaunch function doesn't seem to operate correctly on Linux.
Tried:
ipcRenderer.send('relaunchApp','');
Console result was 'undefined'
Remembered seeing somewhere else and tried:
ipcRenderer.invoke("relaunchApp")
Same result... app closed and never opened again.
This never worked correctly, electron's relaunch function doesn't seem to operate correctly on Linux.
It's a fact that it has some issues but i've used it succesfully before in some other projects (ytmdesktop being one of them), but i'm actually stuck here.
Since I saw there's a WIP into restarting the app after an update I tried asking... I'm guessing whoever is working on that would end up hitting the same roadblock.
By default, the new instance will use the same working directory and command line arguments with current instance. When args is specified, the args will be passed as command line arguments instead. When execPath is specified, the execPath will be executed for relaunch instead of current app.
Note that this method does not quit the app when executed, you have to call app.quit or app.exit after calling app.relaunch to make the app restart.
When app.relaunch is called for multiple times, multiple instances will be started after current instance exited.
I've attempted to fix this with the recommended patch found here, however from personal testing, this doesn't fix this. Feel free to test it yourself, but not much more can be done to resolve this.
Describe the Bug
I'm working on a plugin and i've found that trying to restart the app under linux does not work (in windows everything works as intended).
electron's standard procedure to restart the app is:
Steps to Reproduce
1- Call these functions in a plugin
2- App closes (Linux & Windows) 3- App reopens (Windows), App stays closed (Linux)
Environment Information
Anything else?
https://www.electronjs.org/es/docs/latest/api/app#apprelaunchoptions
According to the docs there is an optional execPath which i've tried passing as process.execPath, process.argv0 or hardcoding the app path without any success
Code of Conduct