Closed duypxd closed 2 years ago
Same here
Same thing happening with our app.
Broke in our app in production, just checked. After digging through the internals, one thing that stands out is that the PKPushPayload includes a number value under a timeout key. By the time it crashes, it's trying to dispatch the received payload from Twilio in our case back to TwilioPhone.
Same here. App immediately crashes on incoming calls. It seems to be something related to the handling of the Voip Push Notification and serializing the push payload data.
The culprit seems to be related with:
[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:[NSString stringWithFormat:@"%@", type]];
Note: I noticed that the only value in the payload that is of type __NSCFNumber
is the twi_timeout
property.
This is not a good firecracker solution. But it works fine for me. cc: @MrHertal
Thanks to all of you for reporting this nasty bug.
I am currently working on a fix.
This should work now with v1.8.1 (see https://github.com/MrHertal/react-native-twilio-phone/pull/74)
The bug was due to the fact that in its incoming push, Twilio sends a twi_answer_timeout
field as an integer but the module code was expecting a string ... while on the Android side,twi_answer_timeout
is indeed a string 😭
Thanks so much for the support. @MrHertal 🏆
Thanks for the quick update! Much appreciated.
thank you for quick fix @MrHertal
We got this error 3 days ago. Our app is working normally in prod so far and no new updates. @MrHertal :(
`SIGABRT: NSCFNumber > Could not cast value of type 'NSCFNumber' (0x1f1c58d28) to 'NSString' (0x1f1c58cf8).