-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trending nav item is repeating in header #479
Comments
I cannot reproduce on
Not sure how that's happening. Perhaps it's related to #450 and you have a custom domain manually added as a test for that. Try reinstalling it to reset that (toggle/reload doesn't work). Also make sure that it's being built and it's not an old version. |
It is indeed quite strange. The function is actually called twice and it's fixed when I remove both async and await. Would reinstall and report back. |
It's it's called twice then the script is being injected twice, probably. Stick a console.log at the bottom of content.js; this might still be an issue for GHE (although at that point we can just wait for GHE users to report it) |
Do you have multiple extensions loaded? 😃 |
ahhhh I think the dynamic script injector's ping receiver got lost. Try this #492 |
New issue report here: #492 (comment) |
I saw this issue once I re-enabled the AMO version, but then I reloaded the page and it stopped appearing (for now) It might happen once. |
What's AMO? 😅 |
Mozilla Addons site 😃 |
I'm having a hard time figuring this out. Surprisingly, Can you inspect the background page and run this code in its console? chrome.permissions.getAll(console.log);
chrome.tabs.onUpdated.addListener((tabId, ignore, {url}) => console.log(url)); Then open github.com and look back in the background page's console. It should look like this:
|
Are the Trending links consistently there? All the time every time? If so, try this:
Nothing should appear in the console, the page should be loaded via ajax (i.e. the console should still contain what you pasted) |
I'll add some logging at every step and push to Chrome so we can get more details. |
An easy way to work around this is to add the same code we have for most other items we add to the dom and check for it's existence before adding it. Doesn't solve the root cause of why the extension is running twice, but if it's an odd edge case, it may be worth the time savings of solving it the quick and easy way, especially since we use that pattern for everything else. |
I'd rather not do that because it'd push the real problem under the rug, deprioritizing the issue. You don't want an extension to run 10 times. |
While that's fair, I think it's worth fixing the issue as best as we can immediately and then addressing the larger issue without this clear bug in the way. I think @busches suggestion of checking for the existence of the element before adding it is a fine fix for now (we're doing it elsewhere already). Later when we have time to circle back on the underlying issue we can also remove the unnecessary DOM checks for this element and others when we have a better fix. |
+1 for quick fix, it's really annoying... Even though I get an itch by treating symptoms and not the underlying issues |
@bfred-it I'm not suggesting we ignore the issue all together, only that we put in the workaround as it's super annoying, as @paulmolluzzo and @SimenB mentioned. |
Steps to reproduce:
This has been introduced relatively recently on
master
.The text was updated successfully, but these errors were encountered: