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

Issue: Endless Tab Looping with Slow Connections or Slow Loading #18

Open
P-rox-y opened this issue Aug 10, 2023 · 8 comments
Open

Issue: Endless Tab Looping with Slow Connections or Slow Loading #18

P-rox-y opened this issue Aug 10, 2023 · 8 comments
Assignees
Labels
bug this item causes errors that make the project unusable enhancement this item makes the project better in some way in-progress this item is being worked on

Comments

@P-rox-y
Copy link

P-rox-y commented Aug 10, 2023

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

  1. 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.
@P-rox-y P-rox-y added bug this item causes errors that make the project unusable enhancement this item makes the project better in some way labels Aug 10, 2023
@Ephellon
Copy link
Owner

It waits for key modules to load. I have an update that removes a few of them. I've been having similar issues 😊

@Ephellon
Copy link
Owner

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)

@Ephellon
Copy link
Owner

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 by LAG_REPORTER) ping each Twitch tab and (upon receiving no response) will duplicate and destroy the offending tab. The TabWatcherInterval (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

@Ephellon
Copy link
Owner

Leaving myself notes

@P-rox-y
Copy link
Author

P-rox-y commented Aug 10, 2023

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.

@P-rox-y P-rox-y closed this as completed Aug 10, 2023
@P-rox-y P-rox-y reopened this Aug 10, 2023
@Ephellon
Copy link
Owner

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).

@Ephellon Ephellon added the in-progress this item is being worked on label Jun 3, 2024
@Mishasama
Copy link

I occur this issue even when the stream is playing...

@Ephellon
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this item causes errors that make the project unusable enhancement this item makes the project better in some way in-progress this item is being worked on
Projects
None yet
Development

No branches or pull requests

3 participants