[Bug] Preferences wont stick, reset on every page load. #371

Open
opened 2026-04-11 01:09:26 -04:00 by bawatafup1ged5 · 6 comments

Describe the bug
Per title. every time i switch to a difference backend, my preferences all get reset to defaults, its becoming very annoying.

Additional context
i have confirmed cookies aren't cleaned/blocked.
i see preferences are stored in a cookie, was that always the case? (i thought invidious used localstorage, which would be much better)

update
it is possible it could be caused by that annoying go-away stuff, as it just happened again when i clicked a video in a playlist.

as an aside: that go-away triggers WAY too often, pretty much on every single video! and its not exactly fast.

**Describe the bug** Per title. every time i switch to a difference backend, my preferences all get reset to defaults, its becoming very annoying. **Additional context** i have confirmed cookies aren't cleaned/blocked. i see preferences are stored in a cookie, was that always the case? (i thought invidious used localstorage, which would be *much* better) **update** it is possible it could be caused by that annoying go-away stuff, as it just happened again when i clicked a video in a playlist. as an aside: that go-away triggers *WAY* too often, pretty much on *every* single video! and its not exactly fast.

as an aside: that go-away triggers WAY too often, pretty much on every single video! and its not exactly fast.

I can't really confirm that. Bot protection triggers maybe about once per hour for me at worst - probably rather somewhere in the 2-3 hour range. Are you maybe behind some kind of CGN that rotates external IPs? That would kind of explain regular protection triggers. As far as speed of the check is concerned, it's pretty fast for me (millisecond range on 10+ year old hardware). My impression is that if it takes a bit longer its usually not the check itself but rather the actual backend being slow to respond.

In regards to settings being stored in a cookie i'm not really sure. Backend selection used to be stored in a cookie for as long as i know but i've never really looked into where the settings went. With the backend selection pretty much being tacked onto invidious i wouldn't be overly surprised though if said cookie would come with an overly restrictive domain setting therby triggering to problem you describe when switching backends.

As far as cookies vs. local storage is concerned i might be a bit out of the web development loop (and therefore not up to date with recent developments) but i don't really see much of an advantage when it comes to a handfull of values (i.e. not any kind of "substancial" amount of data) as long as long as a reasonable lifetime/domain restriction is defined but i might very well be missing something here.

> as an aside: that go-away triggers WAY too often, pretty much on every single video! and its not exactly fast. I can't really confirm that. Bot protection triggers maybe about once per hour for me at worst - probably rather somewhere in the 2-3 hour range. Are you maybe behind some kind of CGN that rotates external IPs? That would kind of explain regular protection triggers. As far as speed of the check is concerned, it's pretty fast for me (millisecond range on 10+ year old hardware). My impression is that if it takes a bit longer its usually not the check itself but rather the actual backend being slow to respond. In regards to settings being stored in a cookie i'm not really sure. Backend selection used to be stored in a cookie for as long as i know but i've never really looked into where the settings went. With the backend selection pretty much being tacked onto invidious i wouldn't be overly surprised though if said cookie would come with an overly restrictive domain setting therby triggering to problem you describe when switching backends. As far as cookies vs. local storage is concerned i might be a bit out of the web development loop (and therefore not up to date with recent developments) but i don't really see much of an advantage when it comes to a handfull of values (i.e. not any kind of "substancial" amount of data) as long as long as a reasonable lifetime/domain restriction is defined but i might very well be missing something here.
bawatafup1ged5 changed title from [Bug] Switching backend resets preferences to [Bug] Preferences wont stick, reset on every page load. 2026-04-24 22:45:48 -04:00
Author

Happening all the time now, seems it has nothing to do with backend selection.

Pretty much renders the site unusable for me atm, since every page load = default prefs, which means a random (different) backend, and 100% player volume, not fun, especially since this is literally the only instance that works nowadays :(

Thought about abusing ublock to cancel whatever sets the cookie as a temporary workaround, but after looking through the devtool debugger sources i can't even find anywhere this cookie is even referenced.

Happening all the time now, seems it has nothing to do with backend selection. Pretty much renders the site unusable for me atm, since every page load = default prefs, which means a random (different) backend, and 100% player volume, not fun, especially since this is literally the only instance that works nowadays :( Thought about abusing ublock to cancel whatever sets the cookie as a temporary workaround, but after looking through the devtool debugger sources i can't even find anywhere this cookie is even referenced.
Owner

Is an issue with your browser, check if the cookies are being sent in the requests image

Is an issue with your browser, check if the cookies are being sent in the requests ![image](/attachments/437fb273-3e6c-4ffc-81ea-a97e7ba8dd6d)
Fijxu closed this issue 2026-04-26 12:27:56 -04:00
Author

This only happens on this instance, not on any other.
The request headers were the first thing i checked, the included screenshot is for a request/page load where none of my preferences were applied, yet they were sent.

They are just being unconditionally overwritten somewhere. (could it be a problem with the domain name? i noticed a comment about it in the video player js somewhere, and noticed the cookies are set with a leading '.', which i thought was weird)
So not a problem with my particular setup (otherwise yewtu.be/nerdvpn would be affected too, which they're not), but firefox doesn't like something in this modified source.

(note: tried a fresh installation of chromium, and couldn't reproduce the issue)

This *only* happens on this instance, not on any other. The request headers were the first thing i checked, the included screenshot is for a request/page load where none of my preferences were applied, yet they were sent. They are just being unconditionally overwritten somewhere. (could it be a problem with the domain name? i noticed a comment about it in the video player js somewhere, and noticed the cookies are set with a leading '.', which i thought was weird) So not a problem with my particular setup (otherwise yewtu.be/nerdvpn would be affected too, which they're not), but firefox doesn't like something in this modified source. (note: tried a fresh installation of chromium, and couldn't reproduce the issue)
Owner

@bawatafup1ged5 wrote in #371 (comment):

This only happens on this instance, not on any other. The request headers were the first thing i checked, the included screenshot is for a request/page load where none of my preferences were applied, yet they were sent.

They are just being unconditionally overwritten somewhere. (could it be a problem with the domain name? i noticed a comment about it in the video player js somewhere, and noticed the cookies are set with a leading '.', which i thought was weird) So not a problem with my particular setup (otherwise yewtu.be/nerdvpn would be affected too, which they're not), but firefox doesn't like something in this modified source.

(note: tried a fresh installation of chromium, and couldn't reproduce the issue)

which browser are you using?

@bawatafup1ged5 wrote in https://git.nadeko.net/Fijxu/invidious/issues/371#issuecomment-9047: > This _only_ happens on this instance, not on any other. The request headers were the first thing i checked, the included screenshot is for a request/page load where none of my preferences were applied, yet they were sent. > > They are just being unconditionally overwritten somewhere. (could it be a problem with the domain name? i noticed a comment about it in the video player js somewhere, and noticed the cookies are set with a leading '.', which i thought was weird) So not a problem with my particular setup (otherwise yewtu.be/nerdvpn would be affected too, which they're not), but firefox doesn't like something in this modified source. > > (note: tried a fresh installation of chromium, and couldn't reproduce the issue) which browser are you using?
Author

Firefox Developer Edition,

I may have been mistaken in my previous comment though, i didnt look too closely at first (the urlencoding makes it hard to read) but when the prefs get reset, the ones sent in the request are the defaults.

Just heading to bed atm, but in the morning i will create a new ff profile and temporarily remove my configs, to make doubly sure its not one of my many "hacks" thats breaking something. (honestly mozilla seems to love breaking things).

Firefox Developer Edition, I *may* have been mistaken in my previous comment though, i didnt look too closely at first (the urlencoding makes it hard to read) but when the prefs get reset, the ones sent in the request are the defaults. Just heading to bed atm, but in the morning i will create a new ff profile and temporarily remove my configs, to make doubly sure its not one of my many "hacks" thats breaking something. (honestly mozilla seems to love breaking things).
Sign in to join this conversation.
No labels
bug
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Fijxu/invidious#371
No description provided.