callumlocke / json-formatter

Makes JSON easy to read.
https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en
BSD 3-Clause "New" or "Revised" License
3.8k stars 878 forks source link

Failing with error "Cannot read properties of null" #194

Closed lancekuttner closed 2 years ago

lancekuttner commented 2 years ago

I am running Chrome Version 100.0.4896.60 (Official Build) (64-bit) I noticed that just a few hours ago the extension stopped working. The console shows the following error:

Error in event handler: TypeError: Cannot read properties of null (reading 'setAttribute') at chrome-extension://bcjindcccaagfpapjjmafapmmgkkhgoa/js/content.js:77:64

microparsec commented 2 years ago

I ran into the same issue.

This is due to #191 not checking if the "meta" "color-scheme" property is actually set or exists, which is not the case on many browsers, and trying to invoke setAttribute on it anyway.

image

VR6R commented 2 years ago

I had this issue as well on chrome version 100.0.4896, but just updated to 101.0.4951.67 and it is resolved.

jakauppila commented 2 years ago

I'm also encountering this issue with Microsoft Edge 100.0.1185.44 (Official build) (64-bit)

liguobao commented 2 years ago

Me Too

asch3ron commented 2 years ago

Same issue here.

wommy commented 2 years ago

just submitted a PR https://github.com/callumlocke/json-formatter/pull/195

fixes it for me

callumlocke commented 2 years ago

Now fixed in v0.6.2