dmarmor / epichrome

An application and Chrome extension for creating web-based applications that work like standalone Mac apps.
GNU General Public License v3.0
855 stars 57 forks source link

App aborted with error: "Error launching engine: The application “Gmail” could not be launched because a miscellaneous error occurred. The app may not have launched properly. If it did, the engine will not be properly cleaned up upon quitting." [main(665)] #317

Open bjornhansell opened 3 years ago

bjornhansell commented 3 years ago

I restarted my MacBook pro with the selection to open all open windows after reboot.

*[453]Gmail368(545)/launchapp(2883): Error launching engine: The application “Gmail” could not be launched because a miscellaneous error occurred.
![453]Gmail368(665)/abortreport(1155)/abort(1093): Aborting: Error launching engine: The application “Gmail” could not be launched because a miscellaneous error occurred. The app may not have launched properly. If it did, the engine will not be properly cleaned up upon quitting.
dmarmor commented 3 years ago

Does this happen consistently if you reboot with an Epichrome app open, and set to open all windows? Because of the way Epichrome hot-swaps the engine in at runtime, it does seem possible to me that apps will not reopen properly this way, but I haven't tested it myself. Thanks!

bjornhansell commented 3 years ago

Thats correct, it happems with all epichrome apps each time I restart and opt to open windows automatically.

On Sat, Apr 17, 2021 at 12:30 PM dmarmor @.***> wrote:

Does this happen consistently if you reboot with an Epichrome app open, and set to open all windows? Because of the way Epichrome hot-swaps the engine in at runtime, it does seem possible to me that apps will not reopen properly this way, but I haven't tested it myself. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmarmor/epichrome/issues/317#issuecomment-821896319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQRGYX4MXG5BDJ4KYJKATTJIDZRANCNFSM42NW7C4A .

-- Björn Hansell (by-ERN Haan-SELL, he/him/his) Co-founder and Clinical Advisor Steady Health +4157027626

dmarmor commented 3 years ago

OK, thanks for the update! I'll try to reproduce this on my system and see if I can figure out what's going on. As I mentioned, I do have a suspicion that it might be that it simply can't be done, and apps will have to be launched by hand after a restart. But I'll keep you posted.

bjornhansell commented 3 years ago

Excellent. I don’t think it’s a big issue. The most annoying thing is actually the popups of error messages that come up after rebooting.

Bjorn

On Apr 18, 2021, at 4:04 AM, dmarmor @.***> wrote:

OK, thanks for the update! I'll try to reproduce this on my system and see if I can figure out what's going on. As I mentioned, I do have a suspicion that it might be that it simply can't be done, and apps will have to be launched by hand after a restart. But I'll keep you posted.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmarmor/epichrome/issues/317#issuecomment-821996762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQRG3TT2JR7PXNYIQGSP3TJLRHRANCNFSM42NW7C4A.

gregschroeder commented 3 years ago

this also happens to me every time on reboot - all open Epi apps report errors on attempted restart. however, Epichrome Scan doesn't (usually) find any corruption or anything.

they report the following - a missing JSON file that cannot be moved, and then a timeout. fwiw, these are all Brave apps.

if there is a concurrency problem, maybe add some random backoff on restart, or a mutex (lockfile?) of some sort? or maybe they just need a much longer timeout on restart, since there is so much going on that things are really slow..

2[6960]APPNAME(374)/installnmhs(2207)/installepichromenmh(2331)/filterfile(66)/permanent(1565){mv}: mv: rename /Users/USER/Library/Application Support/Google/Chrome/NativeMessagingHosts/org.epichrome.runtime.json to /Users/USER/Library/Application Support/Google/Chrome/NativeMessagingHosts/org.epichrome.runtime.json.10564: No such file or directory
*[6960]APPNAME(374)/installnmhs(2207)/installepichromenmh(2331)/filterfile(66)/permanent(1565): Unable to move old org.epichrome.runtime.json.
*[6960]APPNAME(390)/alert(2138)/dialog(2086): Showing alert 'Warning' starting 'Unable to install Epichrome extension native messaging host. (Unable to move old org.epichrome.runtime.json.)'...
*[6960]APPNAME(546)/launchapp(2887): Error launching engine: Timed out waiting for "APPNAME.app" to open.
![6960]APPNAME(666)/abortreport(1155)/abort(1093): Aborting: Error launching engine: Timed out waiting for "APPNAME.app" to open. The app may not have launched properly. If it did, the engine will not be properly cleaned up upon quitting.
dmarmor commented 3 years ago

Yeah, it could well be a timeout problem given all the stuff going on in the system at login. I'll look into it. Thanks!

dmarmor commented 3 years ago

I'm having trouble reproducing this exactly, though I've experienced a different problem. In my tests, Chrome-based apps reopen just fine on reboot. Brave-based apps do not attempt to reopen at all.

Can people let me know if they're experiencing these failures with Chrome- or Brave-based apps? I'm not sure there's anything I can do about it, but I could try blindly lengthening the timeout to see if that helps.

gregschroeder commented 3 years ago

For me, these are all Brave apps, and they all try unsuccessfully to restart after a reboot. If I remember to shut them all down first, they manually restart without issue.

dmarmor commented 3 years ago

It's so odd, I can't get my Brave apps to try to reopen at all. I've tried changing Brave startup settings and the "Close windows when quitting an app" setting in System Preferences->General but no dice, so I don't have a way to diagnose this myself. I'll increase the timeout for the next release and let's see if it makes a difference.

dmarmor commented 3 years ago

Version 2.4.5 will be up shortly, and I've added a retry to the launch code, in the hope that if it fails the first time on reboot, it will succeed on a second attempt. If you continue to get this errors on reboot after updating to 2.4.5, please let me know and I'll see if there are any other things I can try. Thanks!