<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 26, 2015 at 4:36 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"><div>
<p dir="auto">Sebastien,</p>

<p dir="auto">We’ve checked and Google Cloud Messaging is enabled</p>

<p dir="auto">We’ve created a whole new Google project and started again. We’ve created the Google GCM Server API key again, we’ve deleted the old variant and created a new one with the new server API key and the new Google project number. I’m going to start publishing the keys and the secrets as it makes it difficult to follow exactly what has been done and where. Once we have it working, I’ll remove the old Google project and start again. </p>

<p dir="auto">We’ve updated our Cordova project with the new variant information and restarted up our Cordova app. We can see the Alias we created in our Android version in the Android Push variant along with a Device Token. The alias matches our Android alias that we uploaded.</p>

<p dir="auto">We fire up android and look at the logcat output. Rather scary…</p>

<p dir="auto">We send a new Push from the UPS console with the app in foreground, background and not fired up.</p>

<pre><code>E/WifiStateMachine(  740): WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=2.06 rxSuccessRate=2.05 targetRoamBSSID=30:85:a9:6d:dc:fc RSSI=-78
E/WifiStateMachine(  740): WifiStateMachine starting scan for “XXXX”WPA_PSK with 5240
I/wpa_supplicant(  939): wlan0: CTRL-EVENT-SCAN-STARTED
I/art     (  740): Explicit concurrent mark sweep GC freed 159875(7MB) AllocSpace objects, 8(128KB) LOS objects, 29% free, 37MB/53MB, paused 1.177ms total 96.881ms
I/EventLogService( 1730): Opted in for usage reporting
I/EventLogService( 1730): Aggregate from 1448549400100 (log), 1448549400100 (data)
I/SyncAdapterService(24506): Ignoring sync request for inactive user
I/ServiceDumpSys( 1730): dumping service [account]
E/WifiStateMachine(  740): WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.76 rxSuccessRate=2.76 targetRoamBSSID=30:85:a9:6d:dc:fc RSSI=-77
E/WifiStateMachine(  740): WifiStateMachine starting scan for “XXXXX”WPA_PSK with 5240
I/wpa_supplicant(  939): wlan0: CTRL-EVENT-SCAN-STARTED
E/WifiStateMachine(  740): WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=1.65 rxSuccessRate=2.54 targetRoamBSSID=30:85:a9:6d:dc:fc RSSI=-78
E/WifiStateMachine(  740): WifiStateMachine starting scan for “XXXXX”WPA_PSK with 5240
I/wpa_supplicant(  939): wlan0: CTRL-EVENT-SCAN-STARTED
</code></pre>

<p dir="auto">Nothing obvious appears in the logcat output.</p>

<p dir="auto">We have looked in the log of the Push server and can see the message being sent to GCM</p>

<pre><code>2015/11/26 10:22:00,265 WARN  [org.jboss.resteasy.resteasy_jaxrs.i18n] (http-/127.3.204.1:8080-3) RESTEASY000235: Field clientConnection of subresource org.keycloak.services.resources.TokenService will not be injected according to spec
2015/11/26 10:22:12,244 INFO  [PushNotificationSenderEndpoint] (http-/127.3.204.1:8080-3) Message submitted to PushNetworks for further processing
2015/11/26 10:22:12,244 INFO  [PushNotificationSenderEndpoint] (EJB default - 6) Processing send request with &amp;apos;[alert=Test 16, criteria=[aliases=null, deviceTypes=null, categories=null, variants=null], time-to-live=-1]&amp;apos; payload
2015/11/26 10:22:12,364 INFO  [APNsPushNotificationSender] (EJB default - 6) Message to APNs has been submitted
2015/11/26 10:22:12,487 INFO  [GCMPushNotificationSender] (EJB default - 6) Sending payload for [1] devices to GCM
2015/11/26 10:22:12,546 INFO  [GCMPushNotificationSender] (EJB default - 6) Message to GCM has been submitted
2015/11/26 10:22:15,267 WARN  [org.jboss.resteasy.resteasy_jaxrs.i18n] (http-/127.3.204.1:8080-3) RESTEASY000235: Field providers of subresource org.keycloak.services.resources.TokenService will not be injected according to spec
</code></pre>

<p dir="auto">The Aerogear Console also reports that the test pushes have gone AND that they succeeded. </p>

<p dir="auto">I can’t believe that we have missed a simple configuration issue on the UnifiedPush server.</p></div></blockquote><div>Yes, strange, looks like you are doing everything the correct way </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p dir="auto"> </p>

<p dir="auto">We’ll try and bypass the UPS console and write direct to GCM now through curl or something. Do you know if the device token in the UPS console is the Android token to use?</p></div></blockquote><div>That is good test indeed and yes the token in UPS is the one you can use for your GCM test.  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>

<p dir="auto">Thanks </p><span class="HOEnZb"><font color="#888888">

<p dir="auto">Rob</p></font></span><span class="">

<p dir="auto">On 26 Nov 2015, at 14:33, Sebastien Blanc wrote:</p>

<blockquote>
<p dir="auto">Hi Rob,</p>

<p dir="auto">Maybe obvious but just to be sure :  have you enabled &quot;Google Cloud<br>
Messaging for Android&quot; API ?</p>

<p dir="auto">You also mention that you are using an old project, I have seen before<br>
issues with my old projects, could you create a new google project to see<br>
if that helps ?</p>

<p dir="auto">Last point : have you checked in the Android logs (logcat) that the message<br>
really dies not arrive ?</p>
</blockquote>

</span></div><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>
<br></blockquote></div><br></div></div>