customerio-ios icon indicating copy to clipboard operation
customerio-ios copied to clipboard

clearIdentify does not remove device from dashboard on iOS

Open AristideVB opened this issue 4 months ago • 5 comments

SDK version:
Version: ~> 2.14.1

Environment:
Production - Debug

Are logs available?
Yes, logs are available and have been sanitized for sensitive information.

(siteid:******) ℹ️ clearing identified profile  
(siteid:******) delete device token from *******@*******.com to stop sending push to a profile that is no longer identified  
(siteid:******) ℹ️ deleting device token request made  
(siteid:******) ℹ️ adding queue task deletePushToken  
(siteid:******) added queue task data {"device_token":"**************","profile_identifier":"*******@*******.com"}  
(siteid:******) processing queue status QueueStatus(queueId: "********************", numTasksInQueue: 20).  
(siteid:******) ℹ️ queue met criteria to run automatically  
(siteid:******) running hooks: profile stopped being identified *******@*******.com  
(siteid:******) queue querying next task. criteria: QueueQueryCriteria(excludeGroups: Set([]))  
(siteid:******) 🛑 Tried to get queue task with storage id: ********************, but storage couldn't find it.  
(siteid:******) queue querying next task. criteria: QueueQueryCriteria(excludeGroups: Set(["registered_push_token************"]))  
(siteid:******) removing profile for in-app  
User token cleared  
(siteid:******) 🛑 Tried to get queue task with storage id: ********************, but storage couldn't find it.  
(siteid:******) deleting profile info from device storage  
(siteid:******) queue querying next task. criteria: QueueQueryCriteria(excludeGroups: Set(["registered_push_token************"]))  
(siteid:******) 🛑 Tried to get queue task with storage id: ********************, but storage couldn't find it.  
(siteid:******) ℹ️ clearing identified profile  

Describe the bug
When calling customerio.clearIdentify on iOS, the logs suggest that the profile is successfully cleared, and the device token is deleted. However, despite this, the device is not removed from the Customer.IO dashboard, and push notifications continue to be sent to the old account. Additionally, when I identify with a new account, the device remains associated with the previous account, which results in the device potentially receiving unwanted notifications.

To Reproduce

  1. Call CustomerIO.clearIdentity on an iOS device from Flutter SDK
  2. Observe the logs to verify that the profile has been cleared and the device token is deleted.
  3. Check the Customer.IO dashboard after several hours to see if the device is still associated with the old profile.
  4. Identify with a new account and verify that the device is still linked to the previous account.

Expected behavior
The device should be removed from the old account on the Customer.IO dashboard after customerio.clearIdentity is called, and no push notifications should be sent to the old account. The device should be correctly associated with the new account after re-identifying.

Screenshots
N/A

Additional context
This issue occurs in a Flutter app using the Flutter SDK. The method channels seem to be called correctly, but the device is not removed from the previous account on the Customer.IO dashboard.

AristideVB avatar Sep 28 '24 14:09 AristideVB