<div dir="ltr">Hi,<div><br></div><div>when I launch a fresh and clean Cordova app (I am unable to reproduce this on our native Android HelloWorld), and open it the first time for registration, I am receiving a 400 status code from the server.</div><div><br></div><div>Uninstalling the app, and launching it again, show the the problem again, ONLY on Cordova...</div><div><br></div><div>This means either the deviceToken from Android is null or invalid (according to the pattern):<br></div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L166-L170">https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L166-L170</a><br></div><div><br></div><div>Doing some debugging, on the server, I see the provided token is actually null.</div><div><br></div><div>Is there a race condition or so on the client, for the initial launch of the app ? </div><div><br></div><div>I added some logging on the client (see [1]), and indeed, it looks like, on Cordova, it is actually null:</div><div><a href="https://gist.github.com/matzew/e66fa3e2bda6c4dd4655fbe5d63ed755#file-gistfile1-txt-L12">https://gist.github.com/matzew/e66fa3e2bda6c4dd4655fbe5d63ed755#file-gistfile1-txt-L12</a><br></div><div><br></div><div>Now... a few lines above... I see &#39;outdated&#39; c2dm packages/permissions, and a GCM: &quot;Missmatched messenger&quot;, it looks like something is still not correct.</div><div><br></div><div>Any thoughts ? </div><div><br></div><div>-Matthias </div><div><br></div><div>[1] <a href="https://github.com/matzew/aerogear-android-push/commit/1fa6aad53da4e1b9c44c59edd3086025b32a12d5">https://github.com/matzew/aerogear-android-push/commit/1fa6aad53da4e1b9c44c59edd3086025b32a12d5</a></div><div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div></div></div>
</div></div>