Bugs Affecting Twitch Extensions on Mobile Devices

Hello,

We’ve identified two different issues that occur on mobile.

On Android:
Extension icons are visible only the first time you open a channel on the Twitch app. When you return to the Twitch app home and then open the same channel or another one, the icons are no longer visible. This issue is reproducible and is still happening with the latest update. It was first reported on October 24, 2023, in the Twitch Dev Discord. I believe this issue is affecting all extension owners and the overall Twitch experience.


On iOS:
Since the latest update, when an extension is active and you go back to the chat, the extension stops listening to PubSub. Specifically, we have found that the “window.Twitch.ext.listen: void function(target: String, callback: Function)” function is no longer working, whereas it was functioning before the latest update.

On Android

the flow is different, as it appears the extension shuts down when you open the chat and then reruns if you click on the extension icon/name again.

To reproduce this issue: open a Twitch channel on iOS, open an extension (we tested with our extension Live Bingo), go to chat, wait for the event to happen (like a number drawn), then go back to the extension.

Thank you for your attention to these issues.

I couldn’t repro this one on my iOS device with the current Twitch App and the described flow.

I did:

  • open channel
  • open kitchen sink test extension
  • sent a pubsub from EBS/test
  • check recieved a pubsub (it was)
  • went back to chat
  • sent a pubsub from EBS/test
  • reopend the extension
  • log showed recieved message

Recieved visibility false
Recieved global message
a second later reopened visiblity true

waiting to cross check droid as my droid needs to update first.

have confirmed your android issue of

  • open chat
  • open extension
  • go back to chat
  • go back to extension

and it full loads instead of “remembers state”

Hello. I’ve sent you a video on Discord showing how we were able to reproduce the iOS bug. As for the Android issue, do you know if there’s a chance it will be fixed in the future? We first discovered this problem in October 2023. Thank you!

No idea I’m not staff so no insight on the issue

Not too much good there, since it got stuck in the discord spam filter and if legit but needs to be here on the thread for those with the power to fix it to see/confirm.

I did the same steps and couldn’t replicate your fault

I did

  • open channel
  • open extension
  • trigger a pubsub
  • check it was recieved, it was
  • close by going back to chat
  • trigger a pubsub
  • open the extension
  • check it was recieved, it was

So it seems like your extension is not drawing/marking [5] as selected rather than pubsub is not being recieved.

So your dom selector isn’t selecting the item for some reason. Or marking it as such when it’s reopened. Which is a common thing people miss when the dom is essentially “not visibile”

You either need to do a full state recheck when onVisibilityChanged becomes true, or some other sync function. (or at least this works as a work around for any missed events)

So you need potentially additional logging and trace where the fault is, I suspect the fault is in your code and it’s dom selection not that you didn’t recieve the pubsub message at all. As I can’t replicate it using your steps at the moment.

Edit: the only time I could replicate it was whilst trying to video it whilst trying to capture the non replication, and that was intermittent/not 100% repro then…

So seems something might be awry but I can’t 100% for sure where the fault is as it’s not 100% faulting all the time

I’m gonna tinker and get a cleaner/testable/more reliable repro case with additional logging when I get time

Additionally given

When an extension is not visible, it does not receive onContext updates and must perform only minimal work in the background.

So it might be “correct” on the behaviour, or a potential “won’t fix”

Filed as

and