4

I've built an Electron app using the Squirrel packager/update manager. I've had no issues in building the bundle, targeting Windows 64bits only.

I installed it on my Macbook pro (on a windows 7 x64 dual boot) without trouble. I tested it also on a 64 bit Surface pro 3 (Win 10), and another Win 7 PC. Everything works fine.

I published the app and got a few hundred downloads :half the people that downloaded it has it working, and for the other half it just won't start. The process spawns, then dies a second after. I tried starting it in admin, the admin dialog box won't even show. I tried running it from command line

myapp.exe > out.txt

But out is empty. How can I debug this ?

Rayjax
  • 7,494
  • 11
  • 56
  • 82
  • What version of Electron does your packaged app use? – Vadim Macagon Jun 19 '16 at 02:54
  • electron-builder": "^3.17.1", "electron-installer-squirrel-windows": "^1.3.0", "electron-prebuilt": "^0.37.0", "electron-winstaller": "^2.3.0". I cloned the electron quick start repo about 2 months ago, couole weeks before 1.0 – Rayjax Jun 19 '16 at 09:45

2 Answers2

3

I was having trouble getting the logs for a production build as well.

My solution was to use electron-log to let the production app write logs to disk while debugging the problem.

You can then access the logs on windows at:
%USERPROFILE%\AppData\Roaming\<app name>\log.log.

Add some logs in your app that will give you insights in where the app crashes.

Don't forget to remove electron-log when you're done debugging and don't need to write any logs to disk any more.

Community
  • 1
  • 1
Tieme
  • 62,602
  • 20
  • 102
  • 156
1

I solved it for many users by building directly on a windows 10 fresh install. The builds I used before were built on a windows 7. Not sure if it was that, I also have been cleaning the node modules a little bit, so maybe one of the modules I removed was the issue. Anyways, I still do not know of to debug the built exe in this kind of situation. There must be a way to get a log or something when the process kills itself

Rayjax
  • 7,494
  • 11
  • 56
  • 82