Refined-github: Content scripts/styles are erroneously injected multiple times

Created on 4 Jul 2017  ·  20Comments  ·  Source: sindresorhus/refined-github

Most helpful comment

@bfred-it Log message is gone with 1252 🎉

All 20 comments

@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:

error

I got the message by just opening this issue. Will update to latest and see if it still appears 🙂

image

EDIT: Yup, got it just by refreshing.

To answer the questions:

  1. No
  2. No
  3. image
  4. image

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

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

screen shot 2017-11-07 at 5 03 56 pm
screen shot 2017-11-07 at 5 05 02 pm

@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.

  1. Disable Refined GitHub
  2. Open GitHub and see if Refined GitHub enhancements are still applied

If they are, then you have 2 separate instances running.

Also:

  • just try disabling and reenabling RGH
  • are you running it on GitHub enterprise?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fregante picture fregante  ·  3Comments

durka picture durka  ·  3Comments

mareksuscak picture mareksuscak  ·  3Comments

Celthi picture Celthi  ·  3Comments

alexanderadam picture alexanderadam  ·  3Comments