-
Notifications
You must be signed in to change notification settings - Fork 115
What happens if ...?
The SDK no longer automatically unsubscribes or modifies IndexedDB data when an App ID is detected to be different from before.
Instead, for existing users, the user will receive a new user ID, since users are registered on every new session, and the registration now occurs on a different app ID, so OneSignal will create a new user ID since it isn't able to find a previous user with the provided registration token.
The user will keep the same registration token and the same push subscription. This means that for non-working subscriptions, it will not be fixed by creating a new app.
For upgrades from HTTP to HTTPS, the change of origin automatically wipes out all IndexedDB data and push subscription, so users upgrading from HTTP to HTTPS only need to use a new app ID.
Environment: Chrome 54.0.2840.87 (64-bit) on Mac OS X 10.11.6
Revision: c5ec6c5a12f2ed748bb08c1a8567b3c0df89dccd-refs/branch-heads/2840@{#805}
- Subscribe.
- Close the tab you subscribed on.
- Clear Cookies and other site and plugin data (Settings -> Privacy -> Clear Browsing Data...).
- Send yourself a notification.
- Observe delivery results are okay.
- Send yourself another notification.
- Observe delivery results mark you as unsubscribed.
No. It looks like the browser sends an unregistration message though:
Yes. Google immediately tells us the user is no longer subscribed. The browser's chrome://gcm-internals does not record any message received.
Note 1: It looks like clearing Cookies and other site and plugin data is the only setting necessary in clearing browser data to unsubscribe the user (all the other clearing options are unrelated).
Note 2: This method of clearing data also unregisters the service worker itself which means the entry in chrome://serviceworker-internals is missing.