Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings' changes don't persist if you don't close or reload all open youTube tabs/pages... #44

Closed
tympapost opened this issue Jun 28, 2017 · 9 comments

Comments

@tympapost
Copy link
Contributor

tympapost commented Jun 28, 2017

I don't know if this is a known issue or not. Excuse me if it is.
I've been using the latest script and I found that Iridium settings don't save correctly.
The behavior isn't fully reproducible, because I found it to be very inconsistent.
Sometimes settings don't stick even with one YouTube tab open. You open the settings, make your changes, close the settings tab, then reopen them and the settings are reset.
Other times they do stick around if I reopen them, but when I close the YouTube tab and open another, I find that the settings are reset.
The most common case is when I close and reopen the browser. That way options are reset to defaults.

I'll be happy to try out any suggestions, or share any info that might be useful to resolve this.

I've tested this on 2 systems. One with win7 x64 and another with win10 x64. Both with latest Chrome Beta: Version 60.0.3112.40 (Official Build) beta (64-bit)
and both with latest Tampermonkey Stable 4.3.6
No other userscripts are running besides Iridium, and no other chrome extensions that mess up YouTube are running either.

@ParticleCore
Copy link
Owner

I am using the same Tampermonkey version on latest Chrome stable (59) and I cannot replicate your problem and it has never happened on Firefox or Chrome since the development started. Please try with the Chrome stable version to rule out any problems that the Tampermonkey might be having with the Chrome beta version. Also do follow the instructions exactly like they are detailed, including disabling all extensions - no exceptions, apart from Iridium - and testing with a new Chrome profile: https://github.com/ParticleCore/Iridium/wiki/Report-a-bug#troubleshooting

Without a way to replicate this problem I cannot solve it, so please find a way to replicate this problem with step by step instructions.

@tympapost
Copy link
Contributor Author

I'm on the win7 x64 system right now and I cannot replicate the problem in any way I've tried.
The issue could be happening just the first time you install the script without restarting the browser, but that needs further testing.
I will also try some senarios when I get to my other system with win10.
In a few hours I will be able to update you with my findings.
The only quirky thing I can think of is that I installed Tampermonkey and the script for the first time, without restarting the browser in between. And by the next restart, the settings were reset but they seem to be saving OK after that first restart.
In any case, I will let you know.

@tympapost
Copy link
Contributor Author

tympapost commented Jun 28, 2017

Update:
The issue is definitely there. I just need to find a way to reproduce it. It's really tricky.
While I have 4-5 youtube tabs open, I see that settings are saved correctly at first.
Upon closing 2-3 tabs, I reopen the settings and the last changes I've made are undone.
This is really weird to explain and stand by it without looking an idiot, I know how all of this sounds, but it's definitely happening.
Since nobody else has experience it, I cannot stop you from closing this issue. I will continue to search for a solid senario to reproduce it though.

@ParticleCore
Copy link
Owner

Please follow the troubleshooting instructions. Just because you are on a different machine does not mean the problem cannot be migrating, if you use profiles then everything from your other browser will transfer to any Chrome browser you use. Follow the instructions and confirm that this problem is restricted to Iridium and is not related to using a Beta version of Chrome + Tampermonkey.

@tympapost
Copy link
Contributor Author

tympapost commented Jun 29, 2017

OK, Tried with
latest Chrome x64 Stable and
latest Vivaldi 32bit Stable
(I know Vivaldi is not supported, but it's on an older stable webkit engine and I wanted to see if x64 was the problem).
New profile, Only Tampermonkey + Iridium installed.

  1. Open youtube. Sign in. Make the necessary changes to get material design.
  2. Page refreshes. If not refresh manually. Iridium button appears.
  3. Open Iridium settings, make some changes. Close settings tab.
  4. Pick a video from home page to view. (same tab, not a new one)
  5. When the new page finished reloading, open Iridium settings again.
    Boom, back to defaults. Same result with both browsers I've tested. But it goes on:
  6. Make some changes, close the settings tab.
  7. Choose another video from the suggested ones, still remaining on the same tab. Page reloads with the new video.
  8. Open Iridium settings -> Back to defaults.
  9. Make some changes, close the settings tab.
  10. Choose another video, still same tab, page reloads.
  11. Open Iridium settings. Back to defaults.
  12. Now, this time make some changes then close settings tab and all open youtube tabs.
  13. Open a new tab with a youtube video. Settings have been saved with chosen options.

This also happens later on, when you make a new settings' change. The settings remain at the previous state unless you close all youtube tabs right after you alter a setting.

@ParticleCore
Copy link
Owner

ParticleCore commented Jun 29, 2017

Oooh I think I get what is going on now. Unless you refresh all the opened tabs after changing the settings, whichever settings those tabs had before they were changed in the iridium settings page will override the new ones when any feature is used; let's say change volume using the mouse wheel. This is because currently there is no way to propagate the new settings from the settings page to any of the opened tabs, meaning that all of those tabs are still using the settings prior to your changes (not good).

Am I correct in saying that if you have all YouTube tabs closed - just like your last line said - when you change settings OR if you refresh all YouTube tabs without doing anything else (like changing a video or changing player size/volume, etc.) after changing settings the settings are not reset?

If so then I really need to find a way to work around this, this is not a good experience.

@tympapost
Copy link
Contributor Author

tympapost commented Jun 29, 2017

Yes, you are correct.
I opened 3 youtube tabs.
Opened settings, made a change.
Closed settings tab.
Switched to another youtube tab, opened settings. The setting I've changed was not saved.

But:
This time I changed something and without closing settings, I reloaded all open youtube tabs, then closed the settings tab.
And yes, this time the change persisted. So that's the problem.

One solution I've seen from another Chrome extension (sadly it's not open source) is this:
After making a single change to the settings, it reloads all open youtube tabs by itself.
I thought it was weird behavior when I saw it, but now I understand why it does it.

@ParticleCore
Copy link
Owner

Yeah but this is a userscript, it is extremely limited when compared with an extension, it can't just read tabs like that, but I will find a way. Thanks for being so patient with this, this definitely needs to be improved. Until that happens I'd suggest that you either refresh all the tabs after changing anything in the settings tab or changing with no opened tabs, since we know those will have the previous settings persisting until they are refreshed.

@tympapost tympapost changed the title Settings don't save permanently... Settings' changes don't persist if you don't close or reload all open youTube tabs/pages... Jun 29, 2017
ParticleCore added a commit that referenced this issue Jul 1, 2017
Improved: Video time and count is less prone to failure
Improved: Memorize volume is now more persistent
Fixed: Mini player top gadient displaying when normal player was paused
Closes #50
Closes #44
@ParticleCore
Copy link
Owner

ParticleCore commented Jul 1, 2017

In the latest version the settings should update throughout any opened YouTube tabs running Iridium, but due to some strange behavior with the Tampermonkey userscript manager, saving new data and fetching it really quick from a different tab was returning the old data, so the process overall has a delay of 1.5s, which I believe to be more than enough.

This is not failure proof, there might be certain scenarios where the old settings might persist in this way, but I believe this case will be rare.

Let me know if this experience is now better for you as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants