Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron crash on Windows on v5.0.0 #67

Closed
sandeepsow opened this issue Jan 27, 2021 · 6 comments · Fixed by #70
Closed

Electron crash on Windows on v5.0.0 #67

sandeepsow opened this issue Jan 27, 2021 · 6 comments · Fixed by #70

Comments

@sandeepsow
Copy link

sandeepsow commented Jan 27, 2021

"electron": "^11.1.0",
"@journeyapps/sqlcipher": "^5.0.0",
node version: 12.20.0
npm version: 6.14.8

error:

npm ERR! code ELIFECYCLE
npm ERR! errno 3228369023
npm ERR! [email protected] ele: electron .
npm ERR! Exit status 3228369023
npm ERR!
npm ERR! Failed at the [email protected] ele script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-01-27T13_27_23_388Z-debug.log

The electron exe is closing if I run db.run("PRAGMA key ='mySecret'");

Could you please help on this.

@rkistner
Copy link
Member

The output from above doesn't say much unfortunately.

To debug:

  1. Check the known issue here: Incompatible with electron-rebuild / electron-forge #65.
  2. Check the debug log file mentioned in the output.
  3. Run electron directly, instead of via NPM.

@sandeepsow
Copy link
Author

sandeepsow commented Jan 27, 2021

hey, thanks for the quick response. please find complete log.

Am using "electron-builder": "^22.9.1",

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'ele'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preele', 'ele', 'postele' ]
5 info lifecycle [email protected]preele: [email protected]
6 info lifecycle [email protected]
ele: [email protected]
7 verbose lifecycle [email protected]ele: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
ele: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Administrator\Downloads\app\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files (x86)\PuTTY;C:\Program Files\nodejs;C:\Users\Administrator.windows-build-tools\python27;C:\Users\Administrator.windows-build-tools\python27;C:\Users\Administrator.windows-build-tools\python27;C:\Users\Administrator.windows-build-tools\python27;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm
9 verbose lifecycle [email protected]ele: CWD: C:\Users\Administrator\Downloads\app
10 silly lifecycle [email protected]
ele: Args: [ '/d /s /c', 'electron .' ]
11 silly lifecycle [email protected]ele: Returned: code: 3228369023 signal: null
12 info lifecycle [email protected]
ele: Failed to exec ele script
13 verbose stack Error: [email protected] ele: electron .
13 verbose stack Exit status 3228369023
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\Administrator\Downloads\app
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "ele"
18 verbose node v12.20.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 3228369023
22 error [email protected] ele: electron .
22 error Exit status 3228369023
23 error Failed at the [email protected] ele script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3228369023, true ]

@jsavage86
Copy link

I’m having the exact same problem no matter if I’m using electron by itself or electron forge on Windows. It runs fine when there is no pragma key but crashes if I try to create an encrypted database. I’m running the example from the readme.

Node 12.18.3
Chrome 87.0.4280.141
Electron 11.2.3

@rkistner rkistner changed the title Electron exe crash on running pragma key with @journeyapps/sqlcipher v5.0.0 Electron crash on Windows on v5.0.0 Feb 19, 2021
@rkistner
Copy link
Member

#70 should fix this issue.

For future reference on debugging a crash like this, this is a good guide: https://felixrieseberg.com/debugging-electron-apps-on-windows/

In my case, crash reports were not created automatically. What did help is enabling electron's crashReporter:

// In main process
const { crashReporter, app } = require('electron');

crashReporter.start({submitURL: ''});
console.log('Crash reports will be logged to:', app.getPath('crashDumps'));

@rkistner
Copy link
Member

Fix released in v5.1.0.

@ajmasia
Copy link

ajmasia commented Feb 24, 2021

Thanks, @rkistner for the solution. Now works fine on windows 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants