avi12 / youtube-auto-hd

A simple browser extension for changing YouTube videos' quality based on FPS.
https://avi12.com/youtube-auto-hd
GNU General Public License v3.0
235 stars 28 forks source link

[Bug] Video window resizing every frame #152

Closed Laenthor12 closed 1 month ago

Laenthor12 commented 1 month ago

Describe the bug

When the extension is active, the video player resizes every couple frames.

Example Video

I disabled extensions afterwards, it's the only one that causes this and seems to be linked with the recent 1.9.0 version update.

How to reproduce

Go to a standard youtube video url (e.g. this Activate the extension.

Expected behavior

Video player should not resize itself.

What browser(s) can you reproduce the issue on?

Firefox

What OS does it occur on?

Windows

What's the extension version you're running?

1.9.0

Make sure the bug wasn't reported before

Make sure that YouTube Auto HD + FPS is the only extension running on YouTube

Additional context

No response

avi12 commented 1 month ago

Hm, that's awkward, lemme see what I can do

avi12 commented 1 month ago

Please do the following:

  1. Go to about:debugging#/runtime/this-firefox
  2. Click Inspect next to YouTube Auto HD + FPS
  3. In the console tab, type
    chrome.storage.local.get(data => console.log(JSON.stringify(data, null, 2)));
  4. Capture a screenshot
Laenthor12 commented 1 month ago

image I tried with a video running when it's doing the bug but it seems to do the same thing regardless.

federicorosso1993 commented 1 month ago

same problem

xChickens commented 1 month ago

image This is how the settings look, the extension can't be disabled in the extension's menu

avi12 commented 1 month ago

Yep, as I suspected, for some reason the storage format updater script did not execute as expected for some reason https://github.com/avi12/youtube-auto-hd/blob/58b4ba51d48292be34131c627bc08b193028ab49/src/entrypoints/background.ts#L18-L41 I'll push another version that hopefully fixes it

avi12 commented 1 month ago

Pushed version 1.9.1

federicorosso1993 commented 1 month ago

For me it didn't solve the problem.

avi12 commented 1 month ago

Pushed version 1.9.2

avi12 commented 1 month ago

I wish I could go to bed now 🙈

federicorosso1993 commented 1 month ago

well, go to bed, it's not like this is a life/death situation XD. As soon as it update I will give you a feedback if I'm still online.

avi12 commented 1 month ago

Nah, I'll just wait for someone to receive the updates to ensure that it works As the famous saying goes, "it works on my machine"

federicorosso1993 commented 1 month ago

I did update it with from the firefox addon page https://addons.mozilla.org/it/firefox/addon/youtube-auto-hd-fps/versions/?utm_content=addons-manager-reviews-link&utm_medium=firefox-browser&utm_source=firefox-browser

But it's still broken for me... not sure if it will work if I uninstall it and reinstall it... I'll try.

federicorosso1993 commented 1 month ago

Ok, reinstalling it works.

avi12 commented 1 month ago

The goal is that the update works flawlessly for existing users

avi12 commented 1 month ago

It worked out great for me that the Mozilla store instantly pushed the update to the initial wave of users and you reported it so that I can quickly find out the issue I can't imagine if the update went through on Chrome Web Store and suddenly around 150,000 would suffer from this bug

federicorosso1993 commented 1 month ago

I tried reinstalling them in order of version... 1.9.2 auto-update seem to fix it (it didn't when I tried to manually update it... it did when I manually uninstalled/installed it). So the firefox auto-update should work... other users that didn't try the manual update will confirm if this is true.

avi12 commented 1 month ago

I suppose I can go to sleep and if it's indeed fixed I'll close the issue tomorrow morning

Thryduulf commented 1 month ago

I just tried the manual update to 1.9.2 and it didn't fix the issue for me, but uninstalling and reinstalling did.

avi12 commented 1 month ago

Goddammit, when I try to simulate the old storage and then I update the extension locally, the storage updater does work for me :\

avi12 commented 1 month ago

Pushed 1.9.3 firefox.zip

saladm2 commented 1 month ago

same issue for me on 1.9.0. Reinstalling fixed it - now I'm on 1.9.3 with no issues.

avi12 commented 1 month ago

I need to somehow make users avoid reinstalling the extension

Erikk26 commented 1 month ago

1.9.3 installed here, but the issue is still happening.

https://github.com/avi12/youtube-auto-hd/issues/152#issuecomment-2403491945

image

Plus it looks the same for me.

avi12 commented 1 month ago

I'm not in front of my computer currently

avi12 commented 1 month ago

Pushed 1.9.4

Erikk26 commented 1 month ago

Now with 1.9.4 it's working fine again on my end! Thanks! :)

avi12 commented 1 month ago

In 1.9.4 I changed the strategy of retrieving the storage such that whenever it's retrieved, it will always try to use JSON.parse on it https://github.com/avi12/youtube-auto-hd/blob/3b392b41cd767f12cbd89544a3500dd4704b2a2a/src/lib/ythd-utils.ts#L42-L48 Seems like my work here is done 😁