drexller
drexller

Reputation: 17

Astilectron Launches Additional Window Automatically On System Launch

I am working on a cross-platform (windows + macOS) golang-Electron desktop application. I am using the golang-astilectron library to achieve intercommunication between the backend (golang) and the frontend (electron.js).

Bug Description :

  1. I run my application (golang binary) on macOS.
  2. I restart the system without closing the application before the restart.
  3. Once the system is restarted, the Electron app is run and the following window is displayed : erroneous window:
  4. The bug also exists on Windows, but I did not try anything there yet.

I have tried modifying the /vendor/astilectron/main.js (the vendor directory is created by astilectron to contain the needed electron setup to start interacting with golang).

I have tried to add the following lines to that main.js file separately :

  1. app.setLoginItemSettings({ enabled: false });
  2. app.setLoginItemSettings({ openAtLogin: true })

YET, NONE OF WHICH WORKED!!

How to prevent that electron window (process) from automatically launching on system startup (or even at all as this is an unwanted window) ??

Upvotes: 0

Views: 18

Answers (0)

Related Questions