8000 Stop tracking before deleting user data when logging out by zatteo · Pull Request #1176 · cozy/cozy-flagship-app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stop tracking before deleting user data when logging out #1176

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 8000 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

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

zatteo
Copy link
Member
@zatteo zatteo commented Feb 22, 2024
### 🐛 Bug Fixes

* Stop tracking before deleting user data when logging out

Logs to explain what was happening

// Everything with geolocation works fine

// I click on log out

DEBUG  📍 Geolocation Plugin Turned off tracking, uploading...
DEBUG  📍 Geolocation Plugin No current Id, generating a new one... // 😱 Oh no a new id is created because we just deleted the previous one 1 ms ago!
DEBUG  📍 Geolocation Plugin Set Id to: bs8bblki9ob
DEBUG  📍 Geolocation Plugin User: "bs8bblki9ob"
DEBUG  📍 Geolocation Plugin Starting upload process for user bs8bblki9ob forced
DEBUG  📍 Geolocation Plugin No openpath user found, let's create one.
DEBUG  📍 Geolocation Plugin Request openpath server to create new user with id "bs8bblki9ob"
DEBUG  📍 Geolocation Plugin Success creating user "bs8bblki9ob", UUID: 20d6c7c7-6d46-4b48-91a3-9e31b9ace91a
DEBUG  📍 Geolocation Plugin No new locations
DEBUG  📍 Geolocation Plugin Add stop transitions on Thu Feb 22 2024 11:22:34 GMT+0100
DEBUG  📍 Geolocation Plugin Uploading content to usercache...
DEBUG  📍 Geolocation Plugin Request size: 1681
DEBUG  📍 Geolocation Plugin Success uploading
DEBUG  📍 Geolocation Plugin Request to run pipeline with webhook : 
DEBUG  📍 Geolocation Plugin Failed openpath processing: {} // 😱 Oh no openpath processing failed because there is no webhook!
DEBUG  📍 Geolocation Plugin Everything cleared
DEBUG  📍 Geolocation Plugin Tracking stopped and everything cleared

Checklist

Before merging this PR, the following things must have been done if relevant:

  • Tested on iOS
  • Tested on Android
  • Test coverage
  • README and documentation

@zatteo zatteo requested a review from paultranvan February 22, 2024 10:35
@zatteo zatteo changed the title Fix/remove useless unique device Stop tracking before deleting user data when logging out Feb 22, 2024
Copy link
Contributor
@paultranvan paultranvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one 👍

@zatteo zatteo force-pushed the fix/remove-useless-unique-device-id branch 2 times, most recently from c29624c to 0cf5827 Compare February 29, 2024 09:03
When we stop tracking, we upload last traces, so we need user id and
user webhook. These values are stored in local storage. But when
logging out, we delete these values first, and then we try to upload
last traces. So it was creating a new id and the webhook call was
failing.
@zatteo zatteo 8000 force-pushed the fix/remove-useless-unique-device-id branch from 0cf5827 to c54ed54 Compare February 29, 2024 09:06
@zatteo zatteo merged commit 72bbd0c into master Feb 29, 2024
@zatteo zatteo deleted the fix/remove-useless-unique-device-id branch February 29, 2024 09:35
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

Successfully merging this pull request may close these issues.

3 participants
0