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

[BUG/INCOMPLETE DOCS] "event" listener (and others) missing in skippable list #28

Open
theca11 opened this issue Feb 7, 2022 · 0 comments

Comments

@theca11
Copy link
Contributor

theca11 commented Feb 7, 2022

Issue details
There a number of events received by the onEventReceived listener that don't cause the widget to be added to the SE queue, and thus that shouldn't trigger a call to SE_API.resumeQueue(). These events are referred to as skippable in the documentation/example widgets, and defined with this array:
let skippable=["bot:counter","event:test","event:skip","message","kvstore:update"];

However, this array is missing a critical type: "event". "event" is the production equivalent of the dev/test one "event:test": any real event received from the corresponding platform (e.g. Twitch) is first received with listener: event, which doesn't add widgets to the queue, and then the corresponding underlying event is broadcasted (e.g. subscriber-latest), which does add widgets to the queue. Therefore, by not having "event" in the skippable list, queueing fails in production environments under certain scenarios, even though everything seems fine in the editor.

Other listeners are also missing in the array: "delete-message","delete-messages","alertService:toggleSound". The delete ones are probably the most impactful ones, as moderating chat messages is a frequent task that can unexpectedly interfere with widgets.

How to reproduce (for free!)

  1. Create a new overlay. Add the Gift Bomb widget of this repo, and a store redemptions widget
  2. Emulate a community gift to trigger the gift bomb widget, and inmediately emulate an item redemption. The item redemption alert will not be displayed until the gift bomb train has ended, as it's properly queued (the redemption is sent as "event:test"). This is the expected behaviour
  3. Create a loyalty store item for testing, of type perk and cost 0 points. Now, emulate a community gift and right after redeem yourself the store item. The item redemption alert will be displayed while the gift bomb alert is still playing, because this widget has been incorrectly removed from the queue when receiving the "event" event of the redemption

What is affected by the issue

  • Documentation (PR [FIX] Include missing events in skippable array #29)
  • Certain widgets published in this repo and Streamelements itself: Gift Bomb/Season of Subgiving & Wheel of Fortune
  • Potentially other widgets shared in the Discord. Since it seems no one has noticed this for a long time, and given it's a potentially breaking issue for some widgets, it might be a good thing to make some announcement for the devs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant