Skip to content

Conversation

jblarriviere
Copy link

Hello!

Debugging why setDeviceToken is rejecting was a bit painful as the error ended up hidden by a Tried to resolve a promise that has already been rejected error.
I was a bit surprised about that, I would have expected failure to 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 success callback to the iOS SDK setDeviceToken and resolving in there would be cleaner.

Thanks!

@saaaab1213
Copy link

We are seeing this error constantly, any chance this gets merged?

@yjb94
Copy link

yjb94 commented Mar 25, 2025

+1 for this

@grydstedt
Copy link

+1, also seeing this

@yjb94
Copy link

yjb94 commented May 14, 2025

seems no one is interested in this PR... so i just managed to create a patch-package for it.
https://gist.github.com/yjb94/d352e167ddb74217e05ac94e2423a499

@ACHP
Copy link

ACHP commented May 28, 2025

@uddish would you mind taking a look at this ?
I've been using a patch similar to this one for almost a year now, it would be nice to get this fixed 🙏

@jasonpraful jasonpraful requested review from a team, IAmConorNolan and niamh-coleman and removed request for a team September 1, 2025 13:07
@jasonpraful jasonpraful self-assigned this Sep 2, 2025
@stigi
Copy link
Contributor

stigi commented Sep 8, 2025

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.

@jasonpraful
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants