Caused by https://github.com/bfred-it/webext-dynamic-content-scripts. Hard to debug because it only happens to some.
Related issue: https://github.com/bfred-it/webext-dynamic-content-scripts/issues/2
Replaces issue: https://github.com/sindresorhus/refined-github/issues/479
@bfred-it any idea on how I can try and debug this? I'm getting this 100% of the time that I load a page. When Ajax kicks in it seems to only happen for the issues tab and the PR tab.
Refined GitHub was loaded multiple times: https://github.com/sindresorhus/refined-github/issues/479: 1
@bfred-it Do you think this is still reproducible with the latest loading changes?
Probably. I'm gonna have to sprinkle console.logs all over the place for everyone and then hopefully we'll figure it out.
Version 17.11.7.548 should soon hit the store, you can force an update on chrome://extensions. This should give us a better understanding of what's happening.
@OmgImAlexis @hkdobrev @busches @derimagia @SimenB do you still see the error in the console? In this new version, the error is no longer just Refined GitHub was loaded multiple times but this:
I got the message by just opening this issue. Will update to latest and see if it still appears 🙂

EDIT: Yup, got it just by refreshing.
To answer the questions:


Clearing the background console and refreshing to get the error again, this is the clean output:

1 and 2 are no. The extra noise on the first screenshot is a privacy extension I use.


@SimenB it looks like is a simple timeout. I’m gonna have to increase it.
@OmgImAlexis is that all? I’m not seeing the “injecting” message. The log seems correct as the ping happens in time so no injection occurs.
Yeah I'm not seeing any issues now. One of the last few updates has caused it all to work again.
I just pushed a new release: 17.11.7.1252
This changed the whole underlying mechanism (https://github.com/bfred-it/webext-dynamic-content-scripts/commit/95eb02c30e957aa3b170e9a167bbb59f9bfb41e0) and probably this will be more reliable and faster because it doesn't need a timeout; Chrome should just run the code and handle the callback when ready.
@bfred-it Log message is gone with 1252 🎉
Great! Now we just need to make sure it works on GHE.
Thanks for everyone providing feedback so quickly here! 🎉
I couldn't reproduce this from the get go anyway.
I use GHE at work, but I haven't notices the same issue there. Can check tomorrow anyways
Thanks everyone! Hopefully this will no longer be a problem after v17.11.7 :)
Hopefully this will no longer be a problem after
v17.11.7:)
@bfred-it I just noticed this — I'm on v19.2.18.
Probably because you're running both the Chrome Store version and the side-loaded dev version.
I don't recall doing so. How can I check to make sure? Btw, I'm on Firefox on macOS.
If they are, then you have 2 separate instances running.
Also:
Just try disabling and reenabling RGH
Hahaha this solved it! Another win for the "turning it off and on again" move -- dammit! :)
Getting the issue on GitHub main page
Most helpful comment
@bfred-it Log message is gone with 1252 🎉