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

Iterable.updateSubscriptions fails silently #525

Open
p-sebastian opened this issue Oct 27, 2023 · 0 comments
Open

Iterable.updateSubscriptions fails silently #525

p-sebastian opened this issue Oct 27, 2023 · 0 comments

Comments

@p-sebastian
Copy link

p-sebastian commented Oct 27, 2023

Calling Iterable.updateSubscriptions during app init after initializing Iterable

Iterable.initialize(apiKey, config);
// new userId that creates a new user
Iterable.setUserId(anonymousId);

can fail silently if done too quick in succession, XCode will only log:

.9520:0x280d29500:RequestProcessorUtil:sendRequest(requestProvider:successHandler:failureHandler:authManager:requestIdentifier:):32: No user exists with userId

13:26:56.9530:0x280d29500:RequestProcessorUtil:defaultOnFailure(_:):112: updateSubscriptions failed:, No user exists with userId

even calling await Iterable.getUserId() will return the userId but the call will fail still.
but the function itself is not a Promise that returns any value indicating if it succeeded or not. meaning there is no way to know if we should try again in a different session or not.


Ideally Iterable.updateSubscriptions should be a promise that returns it's status.


Tested on

iOS 17
"@iterable/react-native-sdk": "1.3.17"
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

1 participant