<div dir="ltr">Great to hear ! And looks like my previous answer was sent while you were sending this answer :) <div><br></div><div>As said in my previous answer, we have some running jobs that cleans up invalid tokens but seeing your issues we need to make that more robust, at least on our side because maybe things are getting wrong on Google&#39;s side as well.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 26, 2015 at 5:56 PM, Rob Willett <span dir="ltr">&lt;<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Got the problem.<br>
<br>
The device token that was being reported by the UPS Push Console was<br>
invalid or out of date.<br>
<br>
We wrote a quick JavaScript script to register the device and then<br>
unregister it.<br>
<br>
We then forced our app to register again. The device token was changed<br>
in the UPS console variant. We tried to do a Send Push from the console<br>
and it came<br>
through fine.<br>
<br>
We now can see notifications :)<br>
<br>
Of course its almost the last thing we tried…<br>
<br>
Now the issue is should the UPS server have got a new device token if<br>
the variant was deleted AND the GCM project was deleted? We are not<br>
clear when the device token is renewed but either<br>
<br>
1. The UPS server should do this automatically when variants are deleted<br>
or some other way of detecting that things have changed.<br>
<br>
OR<br>
<br>
2. Should the app do it. In which case when should push.unregister() be<br>
called. Should we unregister and register every time the app starts up<br>
to make sure the device token is valid. Seems excessive which is why my<br>
first thought is that this should be server side not client side.<br>
<br>
I don’t know what the answer is, but stale Android device tokens have<br>
been an issue for us. The fact they survive multiple different Google<br>
Projects AND multiple different UPS variants makes me think this is an<br>
issue.<br>
<br>
Anybody care to comment?<br>
<br>
Rob (who is now going got a coffee as he’s earn it)<br>
<br>
On 26 Nov 2015, at 16:35, Rob Willett wrote:<br>
<br>
&gt; Sebastien,<br>
&gt;<br>
&gt; Well we have created and deleted variants and various Google Projects<br>
&gt; all with the result. No notification but no errors.<br>
&gt;<br>
&gt; We have validated the server API key using another curl script<br>
&gt;<br>
&gt; We have managed to write a curl script that almost works but not quite<br>
&gt; :) We get a MismatchSenderId error.<br>
&gt;<br>
&gt; Grepping for this on the intertubes shows a lot of Stackoverflow<br>
&gt; nonsense and some stuff from Google.<br>
&gt;<br>
&gt; What we are now wondering if the device token that we are using, that<br>
&gt; reported by the AeroGear UPS console is actually out of date.<br>
&gt;<br>
&gt; When we delete the variant we create a new variant and register with<br>
&gt; that. The device token created and reported by the UPS console is the<br>
&gt; same as the old variant. We are wondering if this is incorrect and it<br>
&gt; should be a new device token. We’re trying to delete it but you<br>
&gt; can’t seem to delete it from the console and trying to delete it<br>
&gt; from<br>
&gt; our app calls the Javascript error function.<br>
&gt;<br>
&gt; We’ll keep trying, but our other Android phone packed up yesterday<br>
&gt; and<br>
&gt; we only one left. We’re pulling out an old Samsung S3 on the off<br>
&gt; chance it might work :)<br>
&gt;<br>
&gt; Any thoughts on invalid device tokens?<br>
&gt;<br>
&gt; Rob<br>
&gt;<br>
&gt;&gt;&gt; I can’t believe that we have missed a simple configuration issue<br>
&gt;&gt;&gt; on<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; UnifiedPush server.<br>
&gt;&gt;&gt;<br>
&gt;&gt; Yes, strange, looks like you are doing everything the correct way<br>
&gt;&gt;<br>
&gt;&gt;&gt; We’ll try and bypass the UPS console and write direct to GCM now<br>
&gt;&gt;&gt; through<br>
&gt;&gt;&gt; curl or something. Do you know if the device token in the UPS<br>
&gt;&gt;&gt; console<br>
&gt;&gt;&gt; is<br>
&gt;&gt;&gt; the Android token to use?<br>
&gt;&gt;&gt;<br>
&gt;&gt; That is good test indeed and yes the token in UPS is the one you can<br>
&gt;&gt; use<br>
&gt;&gt; for your GCM test.<br>
&gt;&gt;<br>
&gt;&gt;&gt; Thanks<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Aerogear-users mailing list<br>
&gt; <a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div><br></div>