capacitor-community / electron

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️
https://capacitor-community.github.io/electron/
MIT License
335 stars 59 forks source link

Unhandled Promise Rejection error when opening build #140

Closed DPMakerQB closed 2 years ago

DPMakerQB commented 3 years ago

Describe the bug I build my app for Windows, zip. When opening the app I receive an error message. The app starts successfully after clicking "Ok"

To Reproduce Steps to reproduce the behavior:

  1. Build the app
  2. Start the app

Expected behavior The app shouldn't error at the start

Screenshots Screenshot

Desktop (please complete the following information):

tommykjensen commented 3 years ago

I get the same error.

I created a new angular project with Ionic then added electron.

I can run the app without errors with npm run electron:start

If I start it with npx cap open @capacitor-community/electron

or if I build with either electron:pack or electron:make and run the built exe file I also get the same error.

Also running on windows.

LipePasqualotto commented 3 years ago

The @capacitor-community/electron when is installed in the project, came with the electron autoUpdater for auto update application (as the name says), because of this when you run a develop build you will get this error, but if you configure it properly (setting up the publish property in electron-builder-config.js) it will save releases in a github repository, that your application will search for most recent versions to update every time you run your app (this error don't will show up when you pack your application). If you don't wan't this, you will have to remove the autoUpdater calls from the electron .ts files and it will stop doing this error.