[Bug Report] My Application closes itself after a few seconds of initiating


#1

So recently I added electron.app.makeSingleInstance to my application to make it single instance.

After I compiled the application with electron-package it worked as expected, but suddenly it started to closing itself. I removed the electron.app.makeSingleInstance line and tried to run the app one more time. It closed itself again. After debugging it turned out the application cannot pass mainWindow.loadURL(...) line. Actually I see the log before this line but not after it.

P.S: Trying to add try{...} catch (e) {} around the mainWindow.loadURL(...) didnt provide any info (catch did not being called).

The intersting thing is if I change the name of the executable to anything other than the original name, application loads just fine! It confirms the path I am using in the mainWindow.loadURL(...) is indeed fine.

So any idea what could be the problem? I even have restarted my computer and it didn’t help.


#2

This problem occurred in Windows OS.