tingbot / tide-electron

📝   Simple IDE for developing Tingbot apps
Other
22 stars 7 forks source link

A JavaScript error occurred in the renderer process #61

Closed WhistleMaster closed 7 years ago

WhistleMaster commented 7 years ago

Got the following weird error "A JavaScript error occurred in the renderer process" which keeps coming again and again, which makes the IDE completely unusable...

screen shot 2016-11-01 at 13 18 45

Found this, maybe it can help: https://github.com/electron/electron/issues/2479

joerick commented 7 years ago

This error's coming from the mDNS library - it's unhappy with a packet that's been received from something on the network. Short of changing to a different zeroconf library, I'm not sure what we can do about this!

WhistleMaster commented 7 years ago

I understand but it makes Tide completely unusable as the error is popping continually...

Maybe the error could be catch and put in the log file ?

joerick commented 7 years ago

Sorry this is so frustrating @WhistleMaster, this dialog is being shown because of recent changes to exception handling. If you can get to the Javascript console (Window>Toggle Developer Tools), paste the following into a console and hit return.

window.onerror = null

That'll disable the messages for that document.

joerick commented 7 years ago

I don't want to resort to letting errors occur silently again as it gives a bad user experience when things fail - a failed save for example is a unhandled exception at the moment. This should be reported to the user. And buggy libraries that are raising exceptions should be fixed or replaced.

As far as I know, we can't catch errors from this library using Javascript's try/catch because the error happens in a callback - our code is not involved in the call stack. But if anyone knows of a way that would be a great fix for now.

joerick commented 7 years ago

I changed my mind - grab a copy of the latest beta once it's done building :) https://github.com/tingbot/tide-electron/releases/tag/v0.4.6-beta

joerick commented 7 years ago

Fixed in 6f8f2c788d615fe093415ace05e259d763bba350