kevinwucodes/gmail-quick-links

Seems to have stopped working?

Opened this issue · 26 comments

I re-installed it today and nothing seems to be showing up.

Sorry, not sure how to provide more information or actionable-feedback

Looks like GMail got a UI update (some of the icons look different, etc.), and now Quick Links no longer works for me 😢

I am having the same problem it's no longer working. Looks like gui is updated today

aaaand Quick Links is working for me again this morning. Looks like I still have the GMail UI updates (new icons)... but my list of Quick Links had popped back in after re-logging in today.

Maybe the lesson is: if Quick Links are missing, close and re-open your GMail?

Screenshot of new GMail icons + functioning Quick Links:
image

Logging out and logging in again fixed it for me with the new design

Not working: Version 86.0.4240.111 (Official Build) (x86_64)

Screen Shot 2020-10-29 at 11 49 55 AM

I'm currently unable to reproduce this. The extension is working fine for me in the latest Chrome and Firefox browsers.

I'm wondering if somehow there's an upcoming Gmail UI update that's being slowly rolled out and my account hasn't been updated to the new UI yet.

I'll continue to keep this issue open.

rflor commented

I can confirm the problem on Chrome Version 86.0.4240.111 (Official Build) (x86_64) ( WIndows version too)
Looking with DevTools I got the error:

index.js:30 Uncaught TypeError: Cannot read property 'insertAdjacentElement' of undefined
at injectReact (index.js:30)
at index.js:89
injectReact @ index.js:30
(anonymous) @ index.js:89 setInterval (async)

and now my Quick Links are failing again 🙄

Chrome Version 86.0.4240.111 (Official Build) (64-bit)
GMail has new icons/appearance introduced some time in past 2-3 weeks

As mentioned above, when I look at Dev Tools, I see this error when loading GMail:

index.js:30 Uncaught TypeError: Cannot read property 'insertAdjacentElement' of undefined
    at injectReact (index.js:30)
    at index.js:89
injectReact @ index.js:30
(anonymous) @ index.js:89
setInterval (async)
(anonymous) @ index.js:65
__webpack_require__ @ bootstrap b22e50af75c2561d7207:19
(anonymous) @ bootstrap b22e50af75c2561d7207:62
(anonymous) @ bootstrap b22e50af75c2561d7207:62

Still failing to load the Quick Links panel, this is the error I see today in the DevTool console:

Uncaught TypeError: Cannot read property 'insertAdjacentElement' of undefined
    at injectReact (chrome-extension://ecbkcjeoffcjnppapdlncohmehhnfibd/dist.gmailquicklinks.bundle.js:167)
    at chrome-extension://ecbkcjeoffcjnppapdlncohmehhnfibd/dist.gmailquicklinks.bundle.js:223

Problem seems to be that labelControlsContainer is undefined, so code fails when it tries to do labelControlsContainer().insertAdjacentElement

where

const labelControlsContainer = () =>
  document.getElementsByClassName('ajl aib aZ6')[0]

per https://github.com/kevinwucodes/gmail-quick-links/blob/master/src/gmailNodes.js#L14-L15

Inspector shows:
image

Would it work to replace the above with this?:

const labelControlsContainer = () => document.querySelector('div.ajl.aib.aZ6')

with the latest update to chrome, it stopped working again.
before I was able to refresh and get the quick links back but now its no longer the case.

I'm currently unable to reproduce this. The extension is working fine for me in the latest Chrome and Firefox browsers.

I'm wondering if somehow there's an upcoming Gmail UI update that's being slowly rolled out and my account hasn't been updated to the new UI yet.

I'll continue to keep this issue open.

Hi Kevin,
Are you still not able to reproduce this after last week's update?
Because it was working for me on/off before but since the latest update it stopped working completely.

so dang weird... it worked yesterday for the first time in two weeks... but when I closed and reloaded all my Chrome windows this morning, it is broken again. Dev Tools shows the same error I described above

So I used Dev Tools to put a couple of break points into the code, and stepped through the code while I refreshed GMail windows, and it worked: Gmail Links panel loaded. So some kind of timing issue or race condition??

Main break point was here in index.js:

  if (location === 'widget') {
    widgetInsidePanel().append(gmailQuickLinksContainer)
  } else {
    labelControlsContainer().insertAdjacentElement(
      'beforebegin',
      gmailQuickLinksContainer
    )
  }

I have two google suite accounts. On one of them the extension still works, on the other it doesn't. I guess one of them got the new breaking changes, the other didn't. Can I help somehow in debugging the issue?

I can also confirm that it has stopped working on Chrome. It seems to work on Edge. I have also noticed that changing themes can cause it to appear sometimes (gray or high contrast gray theme tends to work but the default one does not).

I might have found the issue. Google has introduced new splash screen that also uses class name '.WT'. This class name is being also used to check if the panel's DOM is loaded. Hence, causing the extension to try to append HTML too early.

The following seems to fix this issue.

const getGmailLocationToInject = () => { // where we want to put the search quick links // this has be be defined after the page loads and becomes ready return document.querySelector('#\\:mh') }

Hi Kevin, have you had a chance to review the proposed fix? Thanks in advance.

I can also confirm that it has stopped working on Chrome. It seems to work on Edge. I have also noticed that changing themes can cause it to appear sometimes (gray or high contrast gray theme tends to work but the default one does not).

No issues here. Quicklinks has worked fine for me on Chrome throughout the Gmail rebrand.

Sorry for the late responses, been working on other projects lately. It looks like the error folks are experiencing are not happening to everyone. And I'm still unable to reproduce the error and quick links is working fine in all my gmail accounts so far.

It would appear that the issue is Gmail has changed the DOM nodes in such a way that Quick Links is unable to inject the Quick Links container screen. Specifically, the error is occurring here:

https://github.com/kevinwucodes/gmail-quick-links/blob/master/src/index.js#L30

which is caused by:

https://github.com/kevinwucodes/gmail-quick-links/blob/master/src/gmailNodes.js#L14

@velingkar the document.querySelector('#\\:mh') selector looks to be at the bottom of the screen pane so I don't think that's the right selector. Can you check to see if either document.getElementsByClassName('ajl aib aZ6')[0] or document.querySelector('div.ajl.aib.aZ6') returns a div node that points to the left hand navigation menu?

@ethirolle I think document.getElementsByClassName('ajl aib aZ6')[0] and document.querySelector('div.ajl.aib.aZ6') would return the same node. At least for me it does. Does this return differently on your account? Also, you might be onto something when you said that it's a timing issue. During the page load of Gmail, Quick Links will scan every 200ms until the div node document.querySelector('div.wT') is found. Once it's found, it will try to determine if you have widgets loaded and will inject the Quick Links container there.

I also suspect that it might be how folks have customized their Gmail in some way. If you are experiencing issues, can you describe if you have the widgets panel opened? The widgets panel include Hangouts Contacts, Handouts Conversations, and Phone Calls.

And if you also have the side panel opened as well? The side panel include the small vertical menu for Calendar, Keep, and Tasks.

Had issue, resolved it. YMMV. Recommended steps:

  1. Uninstall extension & refresh.
  2. Collapse the "Mail" and "Meet" tree items.
  3. Refresh gmail.
  4. Install extension & refresh.
  5. Expand "Mail" tree.

You should see Quick Links under Mail. As info I use GSuite and not personal gmail on OSX.
The container is injected in the navigation div (V6 CL W9).

If you uninstall are you going to lose all the existing links that you have????
I have another issue open for export without the export option or saving existing searches I am willing to simply refresh it a few time to make it work.

@kevinwucodes is there anyway we can help you to see the code maybe do some kind of debugging or something for you?

Hi @kevinwucodes... I realized since I last wrote that my personal GMail account loads Quick Links just fine, every time. It is my work GMail that fails to load it. My two GMail accounts run under separate "person" profiles in Google Chrome (on same laptop). And there def are some differences between config of the two GMail accounts:

  • my work one has two add-ons enabled (Zoom & Slack), my personal one has none
  • my work one is using Inbox type = "Multiple inboxes" (a feature I really like for organizing work email), my personal one is using the default "Priority Inbox"
  • ^^ (NOTE: I enabled Multiple inboxes on my personal GMail, and it still loads Quick Links fine)
  • my work one has 6 or 7 quick links defined, my personal has only one
  • a couple of other small differences I doubt are related to the Quick Links issue (mail notifications on, personal level indicators off)

In both accounts, I have the "Meet" panel open at bottom left, and the right-side panel is open to Tasks or Calendar.

Thanks!

rflor commented

I have a configuration similar to ethirolle one and no Quick Links from a while. I reenabled the Hangouts panel ( Settings -> Chat and Meet -> Hangouts on), reloaded the GMail tab and Quick Links is back again.
Disabled Hangounts and Quick Links is still here ( for now).

@rflor, nice... that worked for me as well! I reenabled the Hangouts panel ( Settings -> Chat and Meet -> Hangouts on), GMail automatically reloaded itself, and my Quick Links are back. And (as you found), the Quick Links are still there after I turn Hangouts back off. Dunno how long this will work, but is a decent workaround for now.

@rflor Yup. Had issue again and enabling hangouts fixed it.