Skip to content

Refined GitHub has been loaded twice. #4827

Closed

Description

@RussKie

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.

Description

I haven't found an exact set of steps that leads to the message, but generally a combination of viewing all files in a PR on GitHub, viewing files for a specific commit result in the warning in the logs.
Sometimes I get TypeError: Cannot read properties of undefined (reading 'cloneNode') error first, then after switching between tabs I eventually get the warning. Sometimes I get the warning straight away, followed by the error...

Screenshot

image

Console errors

VM52 refined-github.js:8646 
Uncaught TypeError: Cannot read properties of undefined (reading 'cloneNode')
    at add (VM52 refined-github.js:8646)
    at runAdd (VM52 refined-github.js:4602)
    at applyChanges (VM52 refined-github.js:4572)
    at SelectorObserver.addRootNodes (VM52 refined-github.js:4724)
    at Array.processBatchQueue (VM52 refined-github.js:4544)
    at MutationObserver.handleMutations (VM52 refined-github.js:4561)
add @ VM52 refined-github.js:8646
runAdd @ VM52 refined-github.js:4602
applyChanges @ VM52 refined-github.js:4572
addRootNodes @ VM52 refined-github.js:4724
processBatchQueue @ VM52 refined-github.js:4544
handleMutations @ VM52 refined-github.js:4561
setTimeout (async)
handleMutations @ VM52 refined-github.js:4563
attributes (async)
scheduleMacroTask @ VM52 refined-github.js:4555
(anonymous) @ VM52 refined-github.js:4548
SelectorObserver.observe @ VM52 refined-github.js:4761
observe @ VM52 refined-github.js:4781
init @ VM52 refined-github.js:8642
async function (async)
init @ VM52 refined-github.js:8631
runFeature @ VM52 refined-github.js:1964
setupPageLoad @ VM52 refined-github.js:1977
add @ VM52 refined-github.js:1999
async function (async)
add @ VM52 refined-github.js:1984
(anonymous) @ VM52 refined-github.js:8626
(anonymous) @ VM52 refined-github.js:9712
(anonymous) @ VM52 refined-github.js:9713

Example URL

dotnet/winforms@d9fd500

Browser(s) used

Edge, version 94.0.992.31 (Official build) (64-bit)
Extension, v21.9.18

Activity

  1. graemechapman commented on Sep 28, 2021

    @graemechapman

    I've been seeing similar when opening a PR and then going to the Files Changed tab. Also when this happens I don't seem to get the quick review buttons. Refreshing the page fixes it.

  2. kidonng commented on Sep 28, 2021

    @kidonng
    Member

    Also when this happens I don't seem to get the quick review buttons. Refreshing the page fixes it.

    That's #4702

  3. yakov116 commented on Oct 5, 2021

    @yakov116
    Member

    I am having this on the latest release. I cannot figure out when it happens. But after sometime of having a tab open it triggers.

  4. fregante commented on Oct 29, 2021

    @fregante
    Member

    Tentatively fixed in fregante/webext-dynamic-content-scripts#28

    This could only happen if our code injects the content scripts multiple times. As far as I know the only part that does this is is the dynamic content scripts module. This should never happen and it never happened to me so I can't replicate, but that small change should completely avoid injection on GitHub.com.

    🤞

  5. adrianschmidt commented on Nov 1, 2021

    @adrianschmidt

    I get this error all the time, and have been for at least a few days, but I suspect for a longer time, because I've been noticing that GitHub pages I've had open in a tab for an extended period of time get really slow (I first noticed it on our team's project board that I have pinned, so it stays open for weeks and I occasionally refresh it manually, or restart the browser). Last week it was getting really slow to load when I switched to it from another browser tab after the project tab had not been active for a while (a few minutes at least, but sometimes hours). The problem went away when I refreshed the page, but got worse so quickly that I noticed it taking seconds to load again already later the same day. That's when I open the dev-tools and noticed copious amounts of the message about Refined GitHub having been loaded twice.

    The following screenshot is from a page I refreshed just before starting to write this comment, so, I'm not sure, but maybe 5-10 minutes ago (I've switched to it a few times, and once or twice I noticed that a new warning was logged to the console just after I switched to that tab):

    image

    Chrome says I'm using version 21.10.25 of the plugin, which is the latest one released at the time of writing. I noticed just now that there's been no new release since this issue was closed, so hopefully it's fixed, but since I've written up the comment anyway, I guess I'll post it in case the problem turns out not to be fixed and this can be of any help 🙂

  6. fregante commented on Nov 1, 2021

    @fregante
  7. pinned this issue on Nov 15, 2021
  8. added
    Please! ♥︎
    on Nov 15, 2021
  9. adrianschmidt commented on Nov 25, 2021

    @adrianschmidt

    I plan to look into the underlying issue and see if it's within my capacity to resolve it, but I simply haven't had the possibility to prioritise taking the time to do it. It's top of my personal agenda though (just not my job agenda, unfortunately 😞).

    That said, if anyone else wants to look into it, please do! ❤️

  10. KaelWD commented on Dec 10, 2021

    @KaelWD
  11. adrianschmidt commented on Dec 10, 2021

    @adrianschmidt

    @KaelWD I haven't checked, and I've disabled the add-on for now, because it's been giving me too much trouble. But I'd guess I'd see the same thing.

  12. self-assigned this
    on Dec 10, 2021
  13. fregante commented on Dec 10, 2021

    @fregante
    Member

    This has been fixed in #5180 thanks to fregante/webext-dynamic-content-scripts#30

    However the fix only applies to GitHub.com and not GH Enterprise users.

    We'll likely release a new version on Sunday, 21.12.12

  14. unpinned this issue on Dec 27, 2021
  15. kidonng commented on Feb 13, 2022

    @kidonng
    Member

    Saw this review on Chrome Web Store:

    image

    Not sure what's that about but I do feel the problem persists to some extent.

  16. locked and limited conversation to collaborators on Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Please! ♥︎acceptedbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions