date |
---|
Thu Oct 19 2017 12:29:00 GMT+1100 (AEDT) |
my fork: https://github.com/joshwnj/electron-hot
Overview:
-
a few libs are out of date, and
electron-prebuilt
is deprecated -
still works when I upgrade
electron
alone, but after updatingchokidar
andchrome-remote-interface
it's not picking up changes. -
getting this error in the console:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unable to connect to client
So it's not connecting to the chrome remote debugger. First let's handle that promise rejection.
Error: Unknown implementation
It's checking the browser against a whitelist to see if the browser is supported. I wonder what browser electron
is reporting?
So it looks like electron reports Browser: ''
, which is why it's failing the whitelist.
Is there a way to set that Browser
value? Not quite sure what to search for... I can see a way to override the User-Agent
value, however it doesn't seem to be picked up by chrome-remote-interface
.
Before going further, I can see that this browser whitelisting block was changed in v0.25.0
. I know it worked at some point, so I'll try an older version.
Sure enough, it works fine in v0.24.0
. That might give some clues about what changed.
Ok, one of the other things that changed in the minor version was how the options.local
and options.remote
defaults are handled:
- if (!options.remote) {
+ if (options.local) {
Instead of asking "is it not remote", it's asking "is it local". Without that explicit opt-in, it won't look for a local connection (which is what we have with electron). Let's try that out.
Hooray it worked!!1!