Azure / azure-mobile-services-cordova

Apache License 2.0
23 stars 25 forks source link

Bug in plugin #2

Closed pgharios closed 8 years ago

pgharios commented 9 years ago

Hi,

I am using the plugin to provision Android devices on azure. A trace on the request sent from the device into Azure shows the following trace:

success handler called index.html:140 Android registered!!!! index.html:126 Called onNotificationGCM! index.html:59 gcm id APA91bFLsh_iVWnl0s...O35fTI1Xx8AyaOOhVKM--Ou78PPla2heJf5iGe9rwvO1x8b4w7XgmHQ-xZwFq34Log index.html:63 Failed to load resource: net::ERR_CACHE_MISS https://hipernation.azure-mobile.net/push/registrations?platform=apns&devic…iGe9rgQtzHaKT98i-JGGag9QLVGKqBSk...g Uncaught Error: Unexpected connection failure. MobileServices.Web.min.js:8 mobileClient.push.gcm.registerTemplate(e.regid, "myTemplate", template,null).done(function () {

As you see the registration is being sent as an APNS request: (line -3: registrations?platform=apns) It should be sent as a GCM instead.

Please have a look

Thanks Patrick Gharios

phvannor commented 9 years ago

Root issue fixed in JS source code with commit: https://github.com/Azure/azure-mobile-services/commit/51eb2a662f4a3efbb2c15c6b408abcc1d1464186

phvannor commented 9 years ago

Fixed with 1.2.8 release, #6