El 10/09/13 20:58, Vidor Gencel escribió: > On Tuesday, September 10, 2013 8:22:05 PM UTC+2, Guillermo López wrote: >> Hi! >> >> >> >> Are you on Wifi? 3G? >> >> >> >> What is the URL that are you receiving? >> >> >> >> Cheers, >> >> >> >> Guillermo >> >> El 10/09/2013 19:25, <[email protected]> escribió: >> >> >> >>> >> >>> I have problems with simple push on ffos. Here is my code: >> >>> >> >>> >> >>> var endpoint; >> >>> $(document).ready(function() { >> >>> registerPush(); >> >>> navigator.mozSetMessageHandler("push", function(message) { >> >>> if(message.pushEndpoint == endpoint) { >> >>> console.log("push notification: "+message.version); >> >>> } >> >>> }); >> >>> navigator.mozSetMessageHandler("push-register", function() { >> >>> registerPush(); >> >>> }); >> >>> }); >> >>> function registerPush() { >> >>> var req = navigator.push.register(); >> >>> req.onsuccess = function(e) { >> >>> endpoint = e.target.result; >> >>> console.log(endpoint); >> >>> } >> >>> } >> >>> >> >>> It is working ok when i start the app, but after few minutes if i try to >> >>> send a push to the endpoint, nothing happens. But when i call the >> >>> registerPush(); function, everithing works again for few minutes. >> >>> >> >>> >> >>> Any help would be greatly appreciated! >> >>> _______________________________________________ >> >>> dev-b2g mailing list >> >>> [email protected] >> >>> https://lists.mozilla.org/listinfo/dev-b2g >> >>> > > We are using wifi. > > If you are talking about the push URL this is what are we getting > > https://push.services.mozilla.com/update/XXXXpxQ03ED5KBC5hZ6m9CvrujcqxKh39nP369zJS_XJctWLi36GpU9d34uhI41Q2Kni4wrEj6N7PKX_fMXdKDx9YZts7oEP0b3BKYzx6-DuRXvCHg== > _______________________________________________ > dev-b2g mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-b2g >
Are you compiling your own B2G? If so, you can enable Push debug on: gecko/dom/push/src/PushService.jsm (look at top, and uncomment the debug call). If you are making your own gaia, you can change the URL to Telefónica's push server and we can debug on our side (server), to see if you are closing the connection (not you, your network). If that works with our server, we would need to ping our Mozilla folks to see if their server is failing. Cheers, -- Guillermo López [willyaranda] http://mozilla-hispano.org http://twitter.com/mozilla_hispano http://facebook.com/mozillahispano Certified Mozillian: https://mozillians.org/willyaranda
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
