Skip to content

Android device still receives push from old installationId after app re-installed #40

Open
@macmoe

Description

@macmoe

I'm seeing the same issue that @jiawenzhang had in parse-community/parse-server#1705

Here is the issue:

  • Install app on Android phone, open app and register with parse-server (as user A), get installationId_1
  • Uninstall app and re-install app on the same phone, open app and register with parse-server (as user B), get installationId_2.

Note that the app on this phone is now associated with installationId_2 (as user B). The installationId_1 should not be valid.

  • Now send a push notification to the parse-server targeting installationId_1, the app still receives the push even when its installationId is not installationId_1.

The parse-server is showing the following in the log:

verb parse-server-push-adapter GCM sending to 1 devices
verb parse-server-push-adapter GCM GCM Response: {
verb parse-server-push-adapter GCM "multicast_id": 7047466558839750000,
verb parse-server-push-adapter GCM "success": 1,
verb parse-server-push-adapter GCM "failure": 0,
verb parse-server-push-adapter GCM "canonical_ids": 1,
verb parse-server-push-adapter GCM "results": [
verb parse-server-push-adapter GCM {
verb parse-server-push-adapter GCM "registration_id": "APA91bEB01Bmhz3g0ZMRqBJIwg-DbQzNnvYeZxJKoj0ixVYFBW9UN2zQIMiDV86FWDDqHlJInaA9h_Mb-xV3tfCUNk2mpUdAjeYi7AdM6ggImQbATHKEp24Xg7yyS76nNLH1UDXqiMxP",
verb parse-server-push-adapter GCM "message_id": "0:1475256512754990%d7f644cef9fd7ecd"
verb parse-server-push-adapter GCM }
verb parse-server-push-adapter GCM ]
verb parse-server-push-adapter GCM }

According to GCM, the app-server (parse-server) should be updated to use the registration_id that was returned:
https://developers.google.com/cloud-messaging/registration#how-uninstalled-client-app-unregistration-works

The problem is I don't want any notifications to be successfully sent with the installationId_1.

If I try to duplicate this same issue with the production api.parse.com and SDK, I can't duplicate it.

NOTE: GCM states "Eventually, the registration token (installationId_1) will be removed and the server will get a NotRegistered error" - Does anyone know how long this would take?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions