electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.49k stars 519 forks source link

Newly generated project fails to launch #469

Closed Riari closed 6 years ago

Riari commented 6 years ago

I'm on Windows 10 64-bit, using electron-forge 5.1.1. When I try to start a project freshly generated with electron-forge init electron-forge-test, it fails to start - no application window appears and the process seems to die instantly. Debug output below.

λ set DEBUG=electron-forge:* && electron-forge start
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +982ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Locating Application +0ms
  electron-forge:project-resolver searching for project in: F:\Projects\electron-forge-test +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in F:\Projects\electron-forge-test\package.json +4ms
  electron-forge:lifecycle Process Succeeded: Locating Application +7ms
  electron-forge:lifecycle Process Started: Preparing native dependencies +5ms
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +436ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:lifecycle Process Started: Launching Application +2ms
  electron-forge:lifecycle Process Succeeded: Launching Application +77ms

I'm doing absolutely nothing else with it; no CLI args, no changes to any of the generated files. I'm not sure where along the line it's failing.

If I try electron-forge package, it appears to succeed:

λ set DEBUG=electron-forge:* && electron-forge package
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Checking your system +0ms
  electron-forge:lifecycle Process Succeeded: Checking your system +998ms
  electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:lifecycle Process Started: Preparing to Package Application for arch: x64 +0ms
  electron-forge:project-resolver searching for project in: F:\Projects\electron-forge-test +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in F:\Projects\electron-forge-test\package.json +6ms
  electron-forge:hook could not find hook: generateAssets +0ms
  electron-forge:hook could not find hook: prePackage +0ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  packageManager: 'npm',
  afterCopy: [ [Function] ],
  afterExtract: [ [Function] ],
  afterPrune: [ [Function] ],
  dir: 'F:\\Projects\\electron-forge-test',
  arch: 'x64',
  platform: 'win32',
  out: 'F:\\Projects\\electron-forge-test\\out',
  electronVersion: '1.8.4',
  quiet: true } +0ms
  electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +44s
  electron-forge:lifecycle Process Started: Compiling Application +1ms
  electron-forge:lifecycle Process Succeeded: Compiling Application +1s
  electron-forge:lifecycle Process Started: Preparing native dependencies +13s
  electron-forge:lifecycle Process Succeeded: Preparing native dependencies +127ms
  electron-forge:lifecycle Process Started: Packaging Application +1ms
  electron-forge:hook could not find hook: postPackage +1m
  electron-forge:lifecycle Process Succeeded: Packaging Application +7s

But attempting to run the resulting electron-forge-test.exe appears to do nothing at all.

Possibly relevant issue of note, I have 6 Electron-based apps installed on this system; Discord, Insomnia, Atom, VSCode, WorkFlowy and Slack. Of those, Slack and WorkFlowy both fail to start in the same fashion, even after completely fresh reinstalls. The only thing I found in common with those is the file version of their node.dll files - listed as 8.2.1.0, vs. 7.9.0.0 or 7.4.0.0 for the other 4 apps that work. I noticed that my generated electron-forge-test app also includes a node.dll v8.2.1.0. Not sure if this is relevant at all, but it's interesting.

Anything I can try to help narrow down the cause?

Thanks

MarshallOfSound commented 6 years ago

Can you launch electron.exe downloaded from the 1.8.4 release on the github repo electron/electron?

Riari commented 6 years ago

Just tried that; same result. No error messages, process dies instantly. Should I open an issue directly on electron/electron?

MarshallOfSound commented 6 years ago

@Riari yeah you should, sounds like 1.8.x and higher is crashing on your machine. Can you raise that issue and @ mention me 😄