raingart / Nova-YouTube-extension

Apache License 2.0
199 stars 9 forks source link

Not applying scripts until refresh #41

Closed Dormin22 closed 1 year ago

Dormin22 commented 1 year ago

Chrome 108.0.5359.125 (Official Build) (64-bit)

Hello, I've had this issue with multiple plugins and tried various things to fix it on my own. The extension is not updating when switching pages until refreshed. I suspect it's an issue with the "yt-navigate-start" scripts but I have no coding experience. Hope it helps, please let me know if it's a problem on my end.

I will post some TamperMonkey debug log, while recording it I relaunched chrome, opened youtube, went to a random video, and refreshed.

Additionally, in the background console I found this issue not recorded in the logs: Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData. Note that for performance reasons, only the first access to one of the properties is shown. 1 source background.js:1

[Uploading TM-Debug(MainPageToVideo-Refresh).log…]()

raingart commented 1 year ago

Try the extension version instead of userscript

Try different types of event page load https://github.com/raingart/Nova-YouTube-extension/blob/master/js/loader.js#L42-L49 Maybe others will work for you

Dormin22 commented 1 year ago

Thank you for responding!

Okay, here's a list of things I tried:

  1. Disabled all other extensions and chrome flags
  2. Updated to latest version
  3. Tried extension version
  4. Tried alternative event page load using TM

Unfortunately none of these worked.

I am sorry for my inexperience, I tried recording another log and included the event listeners from: https://github.com/raingart/Nova-YouTube-extension/blob/master/js/loader.js#L42-L49.

Log: www.youtube.com-1672163268466.log

I think this one should be correct.

Dormin22 commented 1 year ago

I switched to Violent Monkey, like the UI more anyway.

I may not have been very clear sorry, ill explain the issue better.

Nova seems to load initially. In the top right you can see the Nova settings button: https://gyazo.com/e827703cc41f44b5ad71de191c6cba33

But if I click on that video and go to the player it looks like this: https://gyazo.com/99a6a372a4e4a346f19c105639c0f025

And finally when I reload the page it works and looks like this: https://gyazo.com/624e73b60a7cfc0cd07400db134ba40a

For some reason when switching to a video page it does not apply plugins until I refresh the page. The rest of the page is unaffected as well, including comments, playlists... The only thing that works without a refresh seems to be the settings button.

Dormin22 commented 1 year ago

Here is an example with the console loaded. https://gyazo.com/22cc959ba45ae9e124875252dd0d4153

raingart commented 1 year ago

Understand the problem with youtube loading parts of a page. And it happens that yotube reports a page update, the plugin works and then it updates the element Most likely this is the problem

From the very beginning, I tried to find out if you had problems with the plugin or with the definition of page refresh

You have just shown only the info tab in the console. And the errors are in another tab.

It is not clear to me that you showed the log when you only loaded the old one once (without a transition) or switched to the 2nd video.

That is, the log is needed after switching to another video.

UPD add img

Screenshot_3

Dormin22 commented 1 year ago

The update did not work 😞

Here are the logs in order:

  1. Opened-Youtube-Homepage.log
  2. Opened-A-Video.log
  3. Reloaded-Page.log
raingart commented 1 year ago

try replacing document.addEventListener('yt-navigate-start', () => isURLChanged() && processLander()); on document.addEventListener('transitionend', () => isURLChanged() && processLander());

I was sure that the problem was with Nova and not with Youtube itself

Dormin22 commented 1 year ago

It seems to have had an effect! Still not fixed but look at this: https://i.gyazo.com/340dd0149971af3244d22614543592c6.jpg Seems to be a bug in the "Quick Quality" display, but at least something loaded. Many other features still not loading.

Here are the updated logs:

  1. Opened-Youtube-Homepage.log
  2. Opened-A-Video.log
  3. Reloaded-Page.log
raingart commented 1 year ago

From what I understand, you have broken youtube events. What breaks them

Try this browser. same error? https://chromium.woolyss.com/

Dormin22 commented 1 year ago

Seems to work just fine on chromium.

I'm unable to sync my google account to it though.

raingart commented 1 year ago

try reinstalling chrome while either synchronizing the settings or somehow saving it. You need to either rename or delete the profile directory. If you need them of course

Windows 7, 8.1, and 10: C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default Mac OS X El Capitan: Users/<username>/Library/Application Support/Google/Chrome/Default Linux: /home/<username>/.config/google-chrome/default

Dormin22 commented 1 year ago

Unfortunately the problem returns even after a completely clean reinstall.

raingart commented 1 year ago

There are several similar scripts. I can send you a list. They will replace most of the Nova

There is a possibility that there is a gap in the synchronized data. You can clear them (Everything in the cloud will be deleted!) chrome://sync-internals/ click "Disable Sync (Clear Data)"

There is another option to replace the browser. But this is the final step

Or you can use a mirror that I personally use: https://piped.kavin.rocks

Dormin22 commented 1 year ago

I have good news and bad news. The good news is that you're right, it seems to be a problem with my google account or something, when I'm logged out Nova works.

The bad news is that even after deleting all synced data from the cloud and off of my PC, whenever I login to google (which my youtube account uses) the extension stops working.

raingart commented 1 year ago

try another way https://chrome.google.com/sync button "clear date"

only on the working version of the browser. And then the broken settings are synchronized back

Dormin22 commented 1 year ago

No matter what i clear the problem remains, even after deleting all files and resetting from https://chrome.google.com/sync.

The only way i can get it to work is by logging out of my google account. I would rather not lose my data, so I'm just going to forget about it.

Thank you for trying to help @raingart.