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

Issue with parser on newer versions of Electron #23

Closed
DreamitMauri opened this issue Jan 11, 2019 · 10 comments
Closed

Issue with parser on newer versions of Electron #23

DreamitMauri opened this issue Jan 11, 2019 · 10 comments

Comments

@DreamitMauri
Copy link

Using this package on Electron 3x or 4x results in the app crashing with the following error message:

npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! kodinportti@1.0.8 electron:serve: `wait-on http-get://localhost:4200/ && npm run electron:serve-tsc && electron . --serve`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the app@1.0.8 electron:serve 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\user\AppData\Roaming\npm-cache\_logs\2019-01-10T13_12_27_228Z-debug.log
ERROR: "electron:serve" exited with 3221225477.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@1.0.8 start: `npm run postinstall:electron && npm-run-all -p ng:serve electron:serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@1.0.8 start 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\user\AppData\Roaming\npm-cache\_logs\2019-01-10T13_12_27_396Z-debug.log

After digging around the source code I've isolated the problem to somewhere in the Parser.

Enabling debugging in the parser gives these messages:

Got data: 1
waitForData state: 0
Socket read finished prematurely. Waiting for 2 more bytes
Got data: 88
waitForData state: 0
Processing MCS data: state == 0
VERSION IS 41
RECEIVED PROTO OF TYPE 3
Proto size: 86
waitForData state: 3
Processing MCS data: state == 3
GCM Handshake complete.
waitForData state: 1
Socket read finished prematurely. Waiting for 2 more bytes
Got data: 105
waitForData state: 1
Processing MCS data: state == 1
RECEIVED PROTO OF TYPE 7
Proto size: 103
waitForData state: 3
Processing MCS data: state == 3
waitForData state: 1
Socket read finished prematurely. Waiting for 2 more bytes
Got data: 514
waitForData state: 1
Processing MCS data: state == 1
RECEIVED PROTO OF TYPE 8
Proto size: 534
waitForData state: 3
Socket read finished prematurely. Waiting for 23 more bytes
Got data: 23
waitForData state: 3
Processing MCS data: state == 3
@DreamitMauri DreamitMauri changed the title Issue with parser on newer versions of Chromium Issue with parser on newer versions of Electron Jan 11, 2019
@chevonc
Copy link

chevonc commented Feb 2, 2019

I've been hitting the same issue as well. Any update on if/when this will be addressed?

@nshelia
Copy link

nshelia commented Feb 7, 2019

Just checked with debug mode and found issue on this line, which is i think related to Electron (Github Issue)

@MatthieuLemoine
Copy link
Owner

Which versions of Node are used in Electron 3.x and 4.x ?

@nshelia
Copy link

nshelia commented Feb 7, 2019

https://github.com/electron/node

Node 10.11 is used in Electron 4.0.x

@jamesb3ll
Copy link

Like @nshelia and @chevonc have referenced, calling crypto.createECDH(...).setPrivateKey is making Electron crash. I replaced cryto.createECDH with create-ecdh module in decrypt.js and it works as expected without crashes. Let's hope Electron fixes this soon..

@chevonc
Copy link

chevonc commented Feb 11, 2019

Ahh, good to know @jamesb3ll. it seems that there's some traction on the Electron PR, but may try out this workaround for now if they don't merge in a couple of days.

electron/electron#16822

@MatthieuLemoine
Copy link
Owner

It seems that the fix was shipped in Electron 4.0.5 and Electron 5.0.0-beta.3.

@DreamitMauri @chevonc @nshelia @jamesb3ll could you try if upgrading Electron fixes this issue ?

@jamesb3ll
Copy link

jamesb3ll commented Feb 22, 2019

Hey @MatthieuLemoine, I don't think that #16912 and #16909 that was fixed in Electron 4.0.5 or 5.0.0-beta.3 is related to this issue. As pointed out here by @nornagon, that works on Electron.

I think solving #16477 would fix the problem, it seems to be related to compatibility of node/v8's Buffer patches in Electron v4+. I'm not sure quite how to solve it and waiting for a reply from @codebytere in that issue.

@chevonc
Copy link

chevonc commented Mar 14, 2019

Fix for this was merged if anyone else arrives here: https://github.com/electron/electron/releases/tag/v4.1.0

@DreamitMauri
Copy link
Author

Confirmed. Fixed in Electron 4.1.0.

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

No branches or pull requests

5 participants