Closed puopg closed 2 years ago
I'm having the similar issue where the handler is invoked multiple times. v4.33.0 is working fine. After updating to v4.34.1 its firing multiple times.
For one message, the handler is firing 4 to 5 times depending on the number of times the pubnub.subscribe()
method was called.
I have attached 2 videos, one on 4.33.1 the other using 4.34.0.
Code sandbox also attached. This is a simple counter to visually see how many times the handler is invoked. Notice I only call addListener once, and the only change is calling subscribe.
Codesandbox: https://codesandbox.io/s/dazzling-cannon-y71vi
https://user-images.githubusercontent.com/7741481/144104536-8b4a4693-ac45-48ed-99b8-05f53ceb2803.mov
https://user-images.githubusercontent.com/7741481/144104541-850fddd4-1104-4385-b1d9-ee485be0c2c5.mov
@raipubnub Have you guys noticed this?
Thanks for the detailed report @puopg. We are looking at this and will provide an update once we finish the analysis.
This was a result of a change in superagent that affected chaining the end
method. We have a fix ready to go out, should be released soon.
@puopg this issue is addressed in v4.34.2
Cool thanks!
Edit: Changed the title to be more representative of the bug at hand.
Seeing some interesting behavior differences after upgrading to version 4.34.0.
Services currently enabled on my key:
Context here is a simple chat application. On message publish, a client receives that message via subscribing to the channel. However, a special situation here is we are subscribed to a channel group.
Affected version: 4.34.0 Unaffected version: 4.33.1
Actual outcome: Multiple invocations to the handler.
Expected outcome: A single invocation to the handler.