twilio / voice-quickstart-ios

Twilio Voice Quickstart for iOS with Swift
MIT License
182 stars 96 forks source link

Incoming call push arrives but also receiving error - 52134 #539

Closed alon7 closed 1 year ago

alon7 commented 1 year ago

Description

I successfully registered my device, and it's receiving incoming calls. I used the same device for testing in the past, and when there's an incoming call, there's always another error event (52134) I suspect the error is because there's another token registered to the same user, but that token was invalid when it was set.

I'm not sure how I can explore the token or unregister it (I don't have access to it)

Is there anything I can do to understand better the issue?

Steps to Reproduce

  1. Make a phone call
  2. Receive an incoming call and an error together

Expected Behavior

Expect to receive an incoming call with no errors.

Actual Behavior

Receives an incoming call, but with an error (52134)

Reproduces How Often

Every time I make a phone call to that specific account.

Twilio Call SID(s)

CallSid: CA1d033ff0c380ec59e93d20e467ba9d5b Debug event SID: NO5632df45bdab4bafb3283de2c12fe699 Service SID: NTd15fdd45d62fbd70851134b296132c8f

Logs

Versions

All relevant version information for the issue.

Voice iOS SDK

6.5.0

Xcode

14.3

iOS Version

16.4

iOS Device

iPhone 14 Pro

bobiechen-twilio commented 1 year ago

Hi @alon7

Thanks for reaching out and that's exactly what happened. One way you can self-service and remove the push notification binding is by calling the SDK .unregister() method with PushKit device token and Push Credential of the sandbox or production environment, depending on which combination you think could have caused the environment mismatch.

We recommend using different Twilio accounts during the development/sandbox phase (e.g. using a subaccount) and switching to the main account when the app is ready for production. The Push Credentials and push notification bindings created under these two environment are then separated from each other and should no longer cause this type of error.

Sorry for the confusion.

edit: please feel free to submit a Twilio Support ticket and tag the Programmable Voice SDK team if you need further assistance removing the stale binding.

-bobie