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

Emergency help. SIGABRT: __NSCFNumber > Could not cast value of type '__NSCFNumber' (0x1f1c58d28) to 'NSString' (0x1f1c58cf8). > NSString #72

Closed
duypxd opened this issue Dec 9, 2021 · 10 comments

Comments

@duypxd
Copy link

duypxd commented Dec 9, 2021

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).

NSString`

@jorgeavaldez
Copy link

Same here

@therealemjy
Copy link

Same thing happening with our app.

@jorgeavaldez
Copy link

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.

@dchannell
Copy link

dchannell commented Dec 9, 2021

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.

@duypxd
Copy link
Author

duypxd commented Dec 10, 2021

This is not a good firecracker solution. But it works fine for me. cc: @MrHertal

image

@duypxd duypxd closed this as completed Dec 10, 2021
@MrHertal
Copy link
Owner

Thanks to all of you for reporting this nasty bug.

I am currently working on a fix.

@MrHertal
Copy link
Owner

This should work now with v1.8.1 (see #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 😭

@duypxd
Copy link
Author

duypxd commented Dec 10, 2021

Thanks so much for the support. @MrHertal 🏆

@therealemjy
Copy link

Thanks for the quick update! Much appreciated.

@manjotssd
Copy link

thank you for quick fix @MrHertal

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

6 participants