[Bug]: Once user_subscription_limit is reached it is not possible to change users
arctouch-danielishara opened this issue · 4 comments
What happened?
After reaching the User Subscription Limit with one user (20 subscriptions per User), the SDK gets stuck with that user.
Logout, login, and initialization do not work until that user goes below the maximum subscription limit.
Steps to reproduce?
1. Reach the Subscription limit with a particular user by logging in on multiple devices and/or uninstalling and reinstalling the app multiple times. (make sure you are logging in with the same user, i.e., setting the same externalID every time).
2. After reaching this state, the API will start to return the error: "Operation is not permitted due to user having the maximum number of subscriptions assigned". "user_subscription_limit": 20
3. Once the app receives this message, simulate a logout and a login by calling OneSignal.Users.logout() and OneSignal.Users.login(<newExternalID>) this time using a new external ID.
4. Logout and login operations are not triggered. Nothing is sent to the OneSignal API.
5. Closing and reopening the app to trigger the initialization again will still trigger the login on the first externalID (the user that reached the subscription limit) and fail (even if the login is explicitly called with the 'new external ID')
What did you expect to happen?
I expect the app to not be stuck with the user that has reached the user_subscription_limit.
OneSignal.logout
and OneSignal.login
should work normally and switch the user.
OneSignal Flutter SDK version
5.2.2
Which platform(s) are affected?
- iOS
- Android
Relevant log output
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on macOS 13.6.4 22G513 darwin-x64, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.91.1)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Code of Conduct
- I agree to follow this project's Code of Conduct
Hi @arctouch-danielishara, did you figure out a solution for it? It happen to me on Android and Ios platforms
@arctouch-danielishara have you tried to contact OneSignal by contact form?
No, I have not.
Please contact support@onesignal.com with your app ID, the subscription ID and external ID. We can help resolve this for you.
See this comment for the current solution and what is planned for the future:
OneSignal/OneSignal-Android-SDK#2143 (comment)
Please follow that issue for updates.