question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to get the visit button: Cannot read properties of null (reading 'cloneNode')

See original GitHub issue

Describe the bug Just stopped working out of the blue, I’d been using it fine for the past couple years; I’m not exactly sure if it stopped working today or during the week. I’ve tried in different computers and browsers, using both Firefox and Chrome. I typically just use Firefox, but to make sure it wasn’t down to the browser I also tested it on Chrome, which gave a bit more info on the console per the screenshot:

Cannot read properties of null (reading 'cloneNode') and it points to content-script.js, line 134

Seems there is probably a new element or naming convention that doesn’t fall into the current 3 switch cases.

To Reproduce Search anything on Google Images.

Expected behavior I would expect it to show the usual “View Image” button.

Screenshots imagem

imagem

System Information

  • Browser: Firefox v100.0.2
  • Browser: Chrome v102.0.5005.63
  • Version: 3.6.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:40 (13 by maintainers)

github_iconTop GitHub Comments

10reactions
ner00commented, May 27, 2022

I looked into this closer and it’s just that the Visit button has a new class name; this is the PR to fix the issue: https://github.com/bijij/ViewImage/pull/243

In the meantime, I also updated the script to be used with extensions such as GreaseMonkey, TamperMonkey, etc. You can grab the script here: https://gist.github.com/ner00/ec9ae47e202b8e99f19be44a5af6baf3

NOTE: The script linked above will not work if the extension is running at the same time. While the extension isn’t updated, you can disable it and use the script instead.

For those who might not know how to install custom scripts to run in your browser, like an extension, follow this:

  1. Make sure to disable or uninstall the View Image extension in your browser (go to settings, find the section with extensions, and disable or uninstall it).

    • Firefox addons URL: about:addons
    • Chrome extensions URL: chrome://extensions/
  2. Install an extension that allows to add custom scripts, most popular are Tampermonkey and Greasemonkey (choose one):

  3. Install the script mentioned, which can be installed directly by clicking here: https://gist.github.com/ner00/ec9ae47e202b8e99f19be44a5af6baf3/raw/viewimage.user.js

3reactions
bijijcommented, Jun 15, 2022

Should be fixed up now for firefox, again chrome is pending review. hopefully doesn’t take too long.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'cloneNode' of null, but works when the ...
I am getting a cloneNode error Uncaught TypeError: Cannot read property 'cloneNode' of null at application.js:42 when I move my script into ...
Read more >
js error: Cannot read property 'cloneNode' of null #12 - GitHub
I see this in my Chrome console after upgrading workbench to 0.2.0. (ScalaJS is 0.5.4) Uncaught TypeError: Cannot read property 'cloneNode' ...
Read more >
How To Fix Cannot Read Property 'style' of Null in JavaScript
This error boils down to one problem. The element you are trying to access does not exist in the DOM (document object model)...
Read more >
Export of single user group with patch 202107 is not complete ...
SG-2486 CLONE - Base - Using F8 to search on a cached screen can result in a Javascript error (Uncaught TypeError: Cannot read...
Read more >
Node.textContent - Web APIs | MDN
If the node is a document or a doctype, textContent returns null . Note: To get all of the text and CDATA data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found