bijij / ViewImage

Extension to re-implement the "View Image" and "Search by image" buttons into google images.
MIT License
780 stars 106 forks source link

View image button no longer visible on CHROME #254

Closed BriggsIDP closed 6 months ago

BriggsIDP commented 2 years ago

Describe the bug Last week the extensions view image button vanished and I've not be able to restore it though uninstalling and reinstalling.

Screenshots image

System Information

urfausto commented 2 years ago

same in vivaldi (chromium).

funblaster22 commented 2 years ago

I believe this has been fixed in 3.6.4 (Issue #242) and the Chrome web store just hasn't updated

tsuliwaensis commented 2 years ago

The UserScript stopped working also

TheCodemonger commented 2 years ago

I did some investigation/debugging and discovered the following error being thrown by the extension in Chrome: image

I was able to trace the likely cause of the nullref back to a switch statement responsible for populating the value of 'viewImageButtonText' - which has no default case. This remains true in the current version of the repo's main branch.

// Set the view image button text
    var viewImageButtonText;
    switch (version) {
        case VERSIONS.FEB18:
            viewImageButtonText = viewImageButton.querySelector('.Tl8XHc');
            break;
        case VERSIONS.JUL19:
            viewImageButtonText = viewImageButton.querySelector('.irc_ho');
            break;
        case VERSIONS.OCT19:
            viewImageButtonText = viewImageButton.querySelector('.pM4Snf, .KSvtLc');
            break;
    }

'viewImageButtonText' is later passed to 'localiseObject()' as the 'obj' arg. While probably not the root cause of the issue and work needed for this update, can we please follow good coding practices and include default cases in switch statements - or at the very least provide a default value when declaring members?

This is my first dive into the Google page code relevant to this plugin, so I don't know if the above needs updating, but here are two examples of containers using the 'tvh9oe' class. The first is the one we want to target and additionally uses 'BIB1wf', others seem to use 'LRNLRb'.

<div jsname="CGzTgf" class="tvh9oe BIB1wf" data-tbnid="z4_uU0QB2pe-SM">…</div>
<div jsname="R5S48d" class="tvh9oe LRNLRb" style="display: none; transform: translate3d(445px, 0px, 0px);" aria-hidden="true" data-tbnid="-VCM1w56w6u5VM">…</div>

Any further down this rabbit hole and I might as well write my own replacement, lol.

Thank you for continuing to maintain this extension, @bijij! I'll be patiently awaiting your fix/update.

ner00 commented 2 years ago

The UserScript stopped working also

Which one?

ner00 commented 2 years ago

I did some investigation/debugging and discovered the following error being thrown by the extension in Chrome

Well done. Coding practices are a good rule of thumb, worthless in this case.

Any further down this rabbit hole and I might as well write my own replacement, lol.

That would be reinventing the wheel, unless you make it dynamic enough to parse the structure regardless of Google's changes - as was the case. Part of the problem here is that people haven't been able or willing to read the history of #242

Thank you for continuing to maintain this extension, @bijij! I'll be patiently awaiting your fix/update.

There is a fix, and there is an update.

If I were @bijij I would leave at least on Chromium-related issue open since closing them perpetuates this problem of users not noticing that the issues has been brought up and solved, yet not available because... <rant>Google isn't very good at processing things manually (like vetting Chrome Web Store updates to extensions, although ironically letting the Play store become a cesspool of malware and spyware for mobile devices </rant>.

Back to the matter at hand, as mentioned by @funblaster22 this is indeed a duplicate of #242 and every other issue in between, as is this one. In less than 10 days, Google made 2 separate class name changes to their Google Images styling. The dev eventually fixed them but warned Chromium-based users (Chrome, etc) that the vetting process on the side of Google could take as long as 2 weeks, while Firefox would take a couple hours. Firefox users have had their situations solved for a good week now. Chromium-based users are depending on Google for approval or they would need to go through hoops to install an unsigned extension.

Now, while you guys are still having issues, and until the official extension gets vetted by Google, you can use the workaround I provided which builds on top of @bijij own UserScript which I updated and fixed when these issues started. If you want to use the workaround while the extension's update isn't officially available, read here: https://github.com/bijij/ViewImage/issues/242#issuecomment-1139210812

tsuliwaensis commented 2 years ago

The UserScript stopped working also

Which one?

I was referring to the one on this project, but I found the updated UserScript you posted on #242 that one works.

trlkly commented 2 years ago

@bijij It would be really nice if @ner00's script were linked on the front page (readme.md)--or better yet, uploaded to the update URL. It seems that the current link goes to version 3.5.0.

bijij commented 2 years ago

Hi Folks, I'd been a bit under the weather since last week and hadn't taken a moment to look at GitHub, my apologies.

Firstly I'd like to thank @ner00 for taking it upon themselves to help me out there it's really been a great help.

So a few things: 1 - I definitely should have updated the user script, fixing the extension in the first place was my priority at the time, I was in a rush and forgot to, so apologies to everyone for that, I have now done this 2 - I have resubmitted the extension to google for review I am hoping this will be done before the end of the week, I am sorry that google's review process seems exponentially slower than Mozillas, (I see there is a PR to move to manifest v3, and I have a feeling doing so will speed up reviews, so fingers crossed)

I'm incredibly sorry for any inconvenience caused over the past couple weeks from this.

bijij commented 2 years ago

I'll leave this issue open until google approves v3.6.4.

firew4lker commented 2 years ago

I have noticed that version 3.6.4 doesn;t work in firefox.

ner00 commented 2 years ago

It's working fine for me, but a few things to consider:

  1. If you previously used the UserScript with Tampermonkey, make sure to disable it or uninstall it since if both are used concurrently they will interfere with each other;
  2. Make sure to close the browser and return to the list of installed extensions, one time mine disappeared mysteriously after re-installation;
  3. Make sure you're not on a private tab (would need specific permissions for those);
  4. When in Google Images, press CTRL+F5 - or SHIFT+F5 in macOS - to reload the page/cache.
firew4lker commented 2 years ago

After several uninstallations and installations it seems to be ok.

ner00 commented 2 years ago

@bijij has gotten Google to approve v3.6.5 update, it's working perfectly afaik, I think this can now be closed.

TeamRainless commented 1 year ago

@bijij has gotten Google to approve v3.6.5 update, it's working perfectly afaik, I think this can now be closed.

Umm... NO.

March 2023. Not working again. Looks exactly like the photo in the OP.

ner00 commented 1 year ago

March 2023. Not working again. Looks exactly like the photo in the OP.

Umm... WORKS FINE.

Has been, for months, clearly.

chrome_eHOk7oYFUg

TeamRainless commented 1 year ago

Not for me...

[image: Screen Shot 2023-03-04 at 2.35.28 AM.png]

On Sat, Mar 4, 2023 at 12:13 AM ner0 @.***> wrote:

March 2023. Not working again. Looks exactly like the photo in the OP.

Umm... WORKS FINE.

Has been, for months, clearly.

[image: chrome_eHOk7oYFUg] https://user-images.githubusercontent.com/2269603/222852678-b6ef6f10-c359-4b42-a405-befe9b0b6234.png

— Reply to this email directly, view it on GitHub https://github.com/bijij/ViewImage/issues/254#issuecomment-1454249273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2KI54YOOUZLXTEARXF5D3W2J3I3ANCNFSM5YJDMAVQ . You are receiving this because you commented.Message ID: @.***>

bijij commented 1 year ago

Likely this is another A:B test from google. Unfortunately the extension is still working for me, so I can't fix it.

PR's welcome

vladimirgluten commented 1 year ago

Likely this is another A:B test from google.

This is extremely weird because I just tried it on my 2nd google account and I do have the view image button, but if I use my main account it's not there. Now I want to know what the difference between the 2 accounts is!

vladimirgluten commented 1 year ago

And now even weirder, it just started working again using my main google account. I think I just needed to complain hard enough!

TeamRainless commented 1 year ago

Mine is still not working. Just uninstalled and re-installed. Nothing.

On Fri, Mar 10, 2023, 3:19 AM VladimirGluten @.***> wrote:

And now even weirder, it just started working again using my main google account. I think I just needed to complain hard enough!

— Reply to this email directly, view it on GitHub https://github.com/bijij/ViewImage/issues/254#issuecomment-1463120193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2KI57EY7XUWFND6XEA2ATW3KFR7ANCNFSM5YJDMAVQ . You are receiving this because you commented.Message ID: @.***>