Invalid registration id returns ACK instead of NACK

50 views
Skip to first unread message

Bogdan Zurac

unread,
Mar 11, 2015, 8:19:44 AM3/11/15
to andro...@googlegroups.com
Hello again.

I've flashed the 5.1 image yesterday on my Nexus 5 with our app still on it, registered with registration id APA91bGuhx1EvYrbAUiV4v4NDAhZWko6qcttO4PtouS-To_dX-F9vDaQ1I-Br7cg8Qv1yTflSfu3KG6crjIH7KrFC7yTpOGQr44EFsr1DLgZX5OCnqT71dJKOzyu-f1dZz4mHmRr1pWOAhYOvypc7kze9eJfyFcuQU4Zr64snxBQmUC-Kk9dHe8. After 5.1 was installed, I installed our app again, and got registration id APA91bGsDV5GjB6kw7i6tz2qGMp9boHnQb66BctNsRGvkLRYKnvucspvLPxHGuCuWFSMT_cLiVjRP9igo0QVi-Fe3jtHXpqGeiBrO3bbm8aaODrtRIU36PQNOX9Ep7D6LFziGUZB69DWXWdJa-bMACQElAPeK7Wng_5-mwPz0gXPpAJLyluVa1o. The thing is, the old registration id still returns ACK, even though it technically doesn't exist anymore. Shouldn't your servers determine it doesn't exist and return a NACK instead? I tested it again right now and it still returns ACK.

Bogdan Zurac

unread,
Mar 16, 2015, 6:00:19 AM3/16/15
to andro...@googlegroups.com
So can we get an answer on this matter ?

Bogdan Zurac

unread,
Mar 19, 2015, 5:29:06 AM3/19/15
to andro...@googlegroups.com
This is still an issue a week since the device has been flashed. We still receive ACK for that device. Can you confirm this issue?

 
On Wednesday, March 11, 2015 at 2:19:44 PM UTC+2, Bogdan Zurac wrote:

Costin Manolache

unread,
Mar 19, 2015, 3:15:55 PM3/19/15
to andro...@googlegroups.com

Factory reset is not detected by our servers - the factory reset registrations are treated the same with devices not in use.

The framework doesn't provide any notification to GCM that a device is about to be factory reset, and all previous data is erased, so the new device looks like a brand new device with no trace of the previous one.

Costin


--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/41a09c62-b779-4356-9fde-8a678d908751%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bogdan Zurac

unread,
Mar 19, 2015, 4:33:33 PM3/19/15
to andro...@googlegroups.com
Ok, so it follows the procedure for a device not in use (I presume that means an offline device, so you can't trace it for the offline period). This means that any message is ACKed for the duration of the TTL (4 weeks), then it gets a NACK? If not even this works for a new flashed OS image, then what exactly can tell us that the requested REG id is not available anymore?

Costin Manolache

unread,
Mar 19, 2015, 4:46:41 PM3/19/15
to andro...@googlegroups.com
On Thu, Mar 19, 2015 at 1:33 PM, Bogdan Zurac <bogdan...@gmail.com> wrote:
Ok, so it follows the procedure for a device not in use (I presume that means an offline device, so you can't trace it for the offline period). This means that any message is ACKed for the duration of the TTL (4 weeks), then it gets a NACK? If not even this works for a new flashed OS image, then what exactly can tell us that the requested REG id is not available anymore?

If the app is uninstalled, or calls 'unregister' - we'll know and return it.

Currently even after 4 weeks we'll continue to accept messages, in case the user is in a long vacation. The current protocol spec is that we'll expire 
messages after 4 weeks, not that we'll stop accepting them. 

There is a much longer time - usually 9 month - when we stop accepting more message and consider the device gone.

Costin
 


On Thursday, March 19, 2015 at 9:15:55 PM UTC+2, Costin Manolache wrote:

Factory reset is not detected by our servers - the factory reset registrations are treated the same with devices not in use.

The framework doesn't provide any notification to GCM that a device is about to be factory reset, and all previous data is erased, so the new device looks like a brand new device with no trace of the previous one.

Costin


On Mar 19, 2015 2:29 AM, "Bogdan Zurac" <bogdan...@gmail.com> wrote:
This is still an issue a week since the device has been flashed. We still receive ACK for that device. Can you confirm this issue?
 
On Wednesday, March 11, 2015 at 2:19:44 PM UTC+2, Bogdan Zurac wrote:
Hello again.

I've flashed the 5.1 image yesterday on my Nexus 5 with our app still on it, registered with registration id APA91bGuhx1EvYrbAUiV4v4NDAhZWko6qcttO4PtouS-To_dX-F9vDaQ1I-Br7cg8Qv1yTflSfu3KG6crjIH7KrFC7yTpOGQr44EFsr1DLgZX5OCnqT71dJKOzyu-f1dZz4mHmRr1pWOAhYOvypc7kze9eJfyFcuQU4Zr64snxBQmUC-Kk9dHe8. After 5.1 was installed, I installed our app again, and got registration id APA91bGsDV5GjB6kw7i6tz2qGMp9boHnQb66BctNsRGvkLRYKnvucspvLPxHGuCuWFSMT_cLiVjRP9igo0QVi-Fe3jtHXpqGeiBrO3bbm8aaODrtRIU36PQNOX9Ep7D6LFziGUZB69DWXWdJa-bMACQElAPeK7Wng_5-mwPz0gXPpAJLyluVa1o. The thing is, the old registration id still returns ACK, even though it technically doesn't exist anymore. Shouldn't your servers determine it doesn't exist and return a NACK instead? I tested it again right now and it still returns ACK.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/41a09c62-b779-4356-9fde-8a678d908751%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.

Bogdan Zurac

unread,
Mar 19, 2015, 4:51:54 PM3/19/15
to andro...@googlegroups.com
So what you're saying is that, in this specific case, there isn't *any* solution in order for us to remove the REG id from our database. At least in a timely manner (1-30 days).
Only after a long long time, 9+ months, will we receive a NACK, thus we could delete the REG id.
Have I understood correctly?

Bogdan Zurac

unread,
Mar 19, 2015, 5:01:18 PM3/19/15
to andro...@googlegroups.com
Also, just for posterity and for other users searching for this issue, if we request delivery receipts for our messages, what will happen in this case?


On Wednesday, March 11, 2015 at 2:19:44 PM UTC+2, Bogdan Zurac wrote:

Costin Manolache

unread,
Mar 19, 2015, 6:41:49 PM3/19/15
to andro...@googlegroups.com
AFAIK we do not send delivery receipts on message expiration.

A possible solution is for the app to periodically contact the app server - if you did not hear from your 
app in 4 weeks, you can assume either long vacation or phone was factory reset. We are looking for ways 
to simplify this - but factory reset is very tricky to detect given the constraints.

Costin




--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.

Bogdan Zurac

unread,
Mar 20, 2015, 5:38:18 AM3/20/15
to andro...@googlegroups.com


On Friday, March 20, 2015 at 12:41:49 AM UTC+2, Costin Manolache wrote:
AFAIK we do not send delivery receipts on message expiration.
So in that case we wouldn't receive any delivery receipt at all I presume.

A possible solution is for the app to periodically contact the app server - if you did not hear from your 
app in 4 weeks, you can assume either long vacation or phone was factory reset. We are looking for ways 
to simplify this - but factory reset is very tricky to detect given the constraints.
Good idea. Would've liked a built-in solution, but will look into that. Hope you guys will find a solution even for this use case.
Anyhow, thanks for all the answers. Hope they will help other as well.

Costin Manolache

unread,
Mar 20, 2015, 1:28:30 PM3/20/15
to andro...@googlegroups.com
On Fri, Mar 20, 2015 at 2:38 AM, Bogdan Zurac <bogdan...@gmail.com> wrote:


On Friday, March 20, 2015 at 12:41:49 AM UTC+2, Costin Manolache wrote:
AFAIK we do not send delivery receipts on message expiration.
So in that case we wouldn't receive any delivery receipt at all I presume.

Yes, there are some optimizations for expiration that makes it pretty expensive to send (non-)delivery receipts
for expiration on devices that don't connect for > 4 week ( including factory reset in this category ). 
 

A possible solution is for the app to periodically contact the app server - if you did not hear from your 
app in 4 weeks, you can assume either long vacation or phone was factory reset. We are looking for ways 
to simplify this - but factory reset is very tricky to detect given the constraints.
Good idea. Would've liked a built-in solution, but will look into that. Hope you guys will find a solution even for this use case.
Anyhow, thanks for all the answers. Hope they will help other as well.

Thanks for the feedback !

Costin
 

Costin




On Thu, Mar 19, 2015 at 2:01 PM, Bogdan Zurac <bogdan...@gmail.com> wrote:
Also, just for posterity and for other users searching for this issue, if we request delivery receipts for our messages, what will happen in this case?

On Wednesday, March 11, 2015 at 2:19:44 PM UTC+2, Bogdan Zurac wrote:
Hello again.

I've flashed the 5.1 image yesterday on my Nexus 5 with our app still on it, registered with registration id APA91bGuhx1EvYrbAUiV4v4NDAhZWko6qcttO4PtouS-To_dX-F9vDaQ1I-Br7cg8Qv1yTflSfu3KG6crjIH7KrFC7yTpOGQr44EFsr1DLgZX5OCnqT71dJKOzyu-f1dZz4mHmRr1pWOAhYOvypc7kze9eJfyFcuQU4Zr64snxBQmUC-Kk9dHe8. After 5.1 was installed, I installed our app again, and got registration id APA91bGsDV5GjB6kw7i6tz2qGMp9boHnQb66BctNsRGvkLRYKnvucspvLPxHGuCuWFSMT_cLiVjRP9igo0QVi-Fe3jtHXpqGeiBrO3bbm8aaODrtRIU36PQNOX9Ep7D6LFziGUZB69DWXWdJa-bMACQElAPeK7Wng_5-mwPz0gXPpAJLyluVa1o. The thing is, the old registration id still returns ACK, even though it technically doesn't exist anymore. Shouldn't your servers determine it doesn't exist and return a NACK instead? I tested it again right now and it still returns ACK.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/8b1b525d-efc4-4fef-940f-962855235738%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages