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

[Bug]: Continues Login and logout not working properly. #923

Open
3 tasks done
ilyasarafathemvigo opened this issue Jul 16, 2024 · 4 comments
Open
3 tasks done

[Bug]: Continues Login and logout not working properly. #923

ilyasarafathemvigo opened this issue Jul 16, 2024 · 4 comments

Comments

@ilyasarafathemvigo
Copy link

ilyasarafathemvigo commented Jul 16, 2024

What happened?

While trying a login and logout with two more times , the subscription status got "Not subscribed" and notification is not receiving .
Same thing like if try continues login and logout, am getting notification after logout.

Steps to reproduce?

1. call this function  OneSignal.login(userId);
2. Then OneSignal.logout()
3. wait 2 seconds 
4. call this function  OneSignal.login(userId);
5. Then OneSignal.logout()

What did you expect to happen?

The notifications get properly based on login and logout .

OneSignal Flutter SDK version

5.2.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@affan3699
Copy link

Yes facing same issue. the login and logout does not update the external id on onesignal dashboard when done frequently.

@nan-li
Copy link
Contributor

nan-li commented Aug 8, 2024

Hi @ilyasarafathemvigo and @affan3699,

Thanks for reporting. It is hard to tell what may be happening.

We would need verbose-level logs that capture these steps taken.

Please set OneSignal.Debug.setLogLevel(OSLogLevel.verbose) before you call OneSignal.initialize("YOUR_ONESIGNAL_APP_ID") to capure these logs.

@stralz
Copy link

stralz commented Oct 30, 2024

Same here, any updates?

@stralz
Copy link

stralz commented Oct 30, 2024

D/OneSignal(18884): [main] initWithContext(context: com.si_cleaning.ca.MainActivity@d6a1146, appId: xxxx-xxxx-xxxx-xxxx-xxxx) D/OneSignal(18884): [main] initWithContext: SDK already initialized D/OneSignal(18884): [main] Retrieving service interface com.onesignal.inAppMessages.IInAppMessagesManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.inAppMessages.internal.InAppMessagesManager@e79f379 D/OneSignal(18884): [main] InAppMessagesManager.addLifecycleListener(listener: com.onesignal.flutter.OneSignalInAppMessages@ab1b8be) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.inAppMessages.IInAppMessagesManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.inAppMessages.internal.InAppMessagesManager@e79f379 D/OneSignal(18884): [main] InAppMessagesManager.addClickListener(listener: com.onesignal.flutter.OneSignalInAppMessages@ab1b8be) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.notifications.INotificationsManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.notifications.internal.NotificationsManager@ba3ea2f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.notifications.INotificationsManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.notifications.internal.NotificationsManager@ba3ea2f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.notifications.INotificationsManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.notifications.internal.NotificationsManager@ba3ea2f D/OneSignal(18884): [main] NotificationsManager.addForegroundLifecycleListener(listener: com.onesignal.flutter.OneSignalNotifications@fc03117) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.notifications.INotificationsManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.notifications.internal.NotificationsManager@ba3ea2f D/OneSignal(18884): [main] NotificationsManager.addPermissionObserver(observer: com.onesignal.flutter.OneSignalNotifications@fc03117) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f D/OneSignal(18884): [main] ApplicationService.onActivityPaused(1,APP_OPEN): com.si_cleaning.ca.MainActivity@d6a1146 D/OneSignal(18884): [main] ApplicationService.onActivityResumed(1,APP_OPEN): com.si_cleaning.ca.MainActivity@d6a1146 D/OneSignal(18884): [main] logout() D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] createAndSwitchToNewUser() D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.application.IApplicationService D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@409d557 D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.application.IApplicationService D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@409d557 D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.properties.PropertiesModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.properties.PropertiesModelStore@4f794e5 D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.operations.IOperationRepo D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.operations.impl.OperationRepo@6113be3 D/OneSignal(18884): [main] OperationRepo.enqueue(operation: {"name":"transfer-subscription","appId":"xxxx-xxxx-xxxx-xxxx-xxxx","subscriptionId":"b84adb8b-0337-44e0-bf1b-7433043da2a3","onesignalId":"local-cceddd44-f122-40c8-acf9-b13676691bf9"}, flush: false) D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.operations.IOperationRepo D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.operations.impl.OperationRepo@6113be3 D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] OperationRepo.enqueue(operation: {"name":"login-user","appId":"xxxx-xxxx-xxxx-xxxx-xxxx","onesignalId":"local-cceddd44-f122-40c8-acf9-b13676691bf9"}, flush: false) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.notifications.INotificationsManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.notifications.internal.NotificationsManager@ba3ea2f D/OneSignal(18884): [main] NotificationsManager.addClickListener(handler: com.onesignal.flutter.OneSignalNotifications@fc03117) D/OneSignal(18884): [main] logout() D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] login(externalId: 3, jwtBearerToken: null) D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] createAndSwitchToNewUser() D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.application.IApplicationService D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@409d557 D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.application.IApplicationService D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@409d557 D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.properties.PropertiesModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.properties.PropertiesModelStore@4f794e5 D/OneSignal(18884): [main] Retrieving service interface com.onesignal.core.internal.operations.IOperationRepo D/OneSignal(18884): [main] Already instantiated: com.onesignal.core.internal.operations.impl.OperationRepo@6113be3 D/OneSignal(18884): [main] OperationRepo.enqueue(operation: {"name":"transfer-subscription","appId":"xxxx-xxxx-xxxx-xxxx-xxxx","subscriptionId":"b84adb8b-0337-44e0-bf1b-7433043da2a3","onesignalId":"local-d5f28b00-46b4-4d00-ad98-2de038cd6499"}, flush: false) D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.subscriptions.SubscriptionModelStore@fe3ea6b D/OneSignal(18884): [main] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.identity.IdentityModelStore@7509bdc D/OneSignal(18884): [Thread-38] Retrieving service interface com.onesignal.core.internal.operations.IOperationRepo D/OneSignal(18884): [Thread-38] Already instantiated: com.onesignal.core.internal.operations.impl.OperationRepo@6113be3 D/OneSignal(18884): [Thread-38] OperationRepo.enqueueAndWait(operation: {"name":"login-user","appId":"xxxx-xxxx-xxxx-xxxx-xxxx","onesignalId":"local-d5f28b00-46b4-4d00-ad98-2de038cd6499","externalId":"3","existingOnesignalId":"local-cceddd44-f122-40c8-acf9-b13676691bf9"}, force: false) D/OneSignal(18884): [main] Retrieving service interface com.onesignal.user.IUserManager D/OneSignal(18884): [main] Already instantiated: com.onesignal.user.internal.UserManager@4e9bd1f
Here are my logs. Same stuff on my end, when frequently loggin in and logging out while testing on the same device with different users im getting not subscribed on the admin, no notifications are popping up, when sending the notification from the other device it isnt loggin anything.

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

No branches or pull requests

4 participants