barbushin / javascript-errors-notifier

Google Chrome and Firefox extension that notifies about JavaScritp errors by icon in address bar & popups
MIT License
206 stars 62 forks source link

Breaks on a page that has Google invisible reCAPTCHA enabled #84

Closed IanKemp closed 6 years ago

IanKemp commented 6 years ago

The invisible reCAPTCHA injects its own element into any page it is enabled on, as shown at https://stackoverflow.com/questions/44543157/how-to-hide-the-google-invisible-recaptcha-badge. Unfortunately this seems to break this extension with the following error:

Uncaught TypeError: Cannot read property '_fromJEN' of null at content.js:210

My guess is that a simple fix would be to change that line from:

if(typeof event.data == 'object' && event.data._fromJEN) {

to

if(typeof event.data == 'object' && typeof event.data._fromJEN !== "undefined" && event.data._fromJEN) {

barbushin commented 6 years ago

Could you please attach some URL that I can use to reproduce this bug?

IanKemp commented 6 years ago

@barbushin Navigate to https://www.google.com/recaptcha/api2/demo?invisible=true - despite the fact that there are no JS errors on that page, the error I've reported still appears in the JS console.

barbushin commented 6 years ago

Fixed. It will be deployed in next few hours.