[iOS] fix: prevent setDeviceToken to reject after resolving#250
[iOS] fix: prevent setDeviceToken to reject after resolving#250jblarriviere wants to merge 1 commit intointercom:mainfrom
Conversation
|
We are seeing this error constantly, any chance this gets merged? |
|
+1 for this |
|
+1, also seeing this |
|
seems no one is interested in this PR... so i just managed to create a patch-package for it. |
|
@uddish would you mind taking a look at this ? |
|
Came up with a quite similar patch for the issue. I believe it's well understood, and even though the error won't crash your app this PR would address a major annoyance. |
|
@stigi we are addressing this issue directly within the dependant iOS SDK. We will be exposing a new method which provides an explicit success callback. This will allow us to properly resolve the promise only when the operation has really succeeded, and to handle the errors in a clear deterministic way. |
Hello!
Debugging why
setDeviceTokenis rejecting was a bit painful as the error ended up hidden by aTried to resolve a promise that has already been rejectederror.I was a bit surprised about that, I would have expected
failureto be async isn't it ?I made those changes as an attempt to prevent both resolving and rejecting, but if failure is sync maybe just exiting in there would be enough?
Anyway, I guess adding a
successcallback to the iOS SDKsetDeviceTokenand resolving in there would be cleaner.Thanks!