Twitch-Tools
Twitch-Tools copied to clipboard
Issue: Endless Tab Looping with Slow Connections or Slow Loading
Describe the bug When Twitch streams are initiated under slow connections, key modules fail to load. Twitch Tools, after waiting about 30 seconds (varies), tries to resolve this by opening another tab for the unresponsive stream. This can lead to a loop where new tabs are continually opened if they don't load promptly, especially since original unresponsive tabs aren't closed. It's unclear if Twitch Tools is waiting for all Twitch modules to load or just its own before this retry mechanism triggers.
To Reproduce
- Open multiple streams with a slow connection, or expended loading times. (Alternative way to reproduce; you can open multiple streams very quickly and you should see same issue occur)
Expected behavior Be able to launch multiple streams quickly and have them load Twitch Tools normally even if the browser is taking a longer than normal/average amount of time to finish loading each stream either due to slow internet connection or slow loading times due to the amount of streams being launched quickly.
Screenshots If having issues reproducing the problem, I can see if I can get a recording of it happening on request.
Extension Information
- Version: 5.32.9
- Source:
store
- Browser:
chrome
- Operating System:
Windows
Additional comments Possible suggested fixes:
- Allow users to adjust or disable the timeout leading to the auto-reload function.
- Close original tabs before opening new ones.
- Notify users when slow load or failure occurs, offering action choices.
- Set a max retry limit to avoid endless looping.
- Focus on reloading only malfunctioning modules instead of entire pages.
- Check if original tabs are still active before opening new ones.
- Optimize module loading and use caching for better performance.
It waits for key modules to load. I have an update that removes a few of them. I've been having similar issues 😊
See if v5.32.10 mitigates the issue. If it continues to reload, go to the settings page and check the console (F12
or Right Click → Inspect
)
Allow users to adjust or disable the timeout leading to the auto-reload function.
- Maybe feasible. As the logic is used in the background ("backend") portion, the setting(s) might not load properly
Close original tabs before opening new ones.
- This is what it's intended to do currently... v5.32.10 no longer waits for a response to force a close
Notify users when slow load or failure occurs, offering action choices.
- Feasible. Would need to add logic to detect failed modules and disable them until the user either enables them or is no longer experiencing slowed speeds
Set a max retry limit to avoid endless looping.
- Feasible. Would limit it to one retry as to not hinder the user any further
Focus on reloading only malfunctioning modules instead of entire pages.
- Already used (to a degree) since v2.9. Some modules are required for the rest of the extension to run smoothly. Usage:
RestartJob(JobName:string, Reason:string) → undefined
Check if original tabs are still active before opening new ones.
- Already used. The
LAG_REPORTER
(primary),GALLOWS_CHECKER
(controlled byLAG_REPORTER
) ping each Twitch tab and (upon receiving no response) will duplicate and destroy the offending tab. TheTabWatcherInterval
(independent) will check (and correct) if any tab is frozen or offline.
Optimize module loading and use caching for better performance.
- The modules that cause the issue do not load any data other than the user's settings
Leaving myself notes
Version 5.32.10 shows significant improvement on the tab looping.
While I can still replicate the issue under extreme conditions (testing using the alternative method of launching multiple streams quickly [20+]) , it tends to resolve and exit the loop much quicker than in 5.32.9 though I'm sure this would vary by connection/processing speed of each user.
If you're still interested, I'll see if I can gather some logs tomorrow to continue this ticket.
When I get time I want to implement a few of the aforementioned features. I think it would be helpful to see what didn't load and have a button popup asking if the user wants to retry loading the module(s).
I occur this issue even when the stream is playing...
Hi @Mishasama, this may occur if the tab does not respond to the backend's PING
command. I will look into making the wait time a bit more lenient.