Open Phelickz opened 1 month ago
Also to add that I could just easily json encode the map data, but I wanted to bring it to your notice that some native platform errors are causing the app to crash.
It also happened when I was trying to join a private channel. If my backend throws an error and the authorizer doesn't complete, my app crashes. Using a try-catch block does not help. Please fix.
Hi there
Bug Report: App crashes when triggering event with a map data type on private channel
Description
I get this error when I try to trigger an event for a private channel:
After this error, the app crashes.
Code Sample
Here is the code I'm using that causes the error:
If I use a string instead of a map for the
data
parameter, no error is thrown, and the event works fine:Additional Information
Expected Behavior
The
data
parameter for thetriggerEvent
method is ofdynamic
type, so I assume it should accept different data types, including maps. I expect that using a map fordata
shouldn't crash the app. Ideally, the framework should handle the error or throw an exception instead of causing a crash.Wrapping the code in a
try-catch
block did not help in catching the error.Environment