GCM no message received in chrome for mac - macos

I am working on a chrome app which receives notification using GCM from a publisher. It is working just fine on linux. However when testing the app on a Mac OSX I never receive any messages even though the registration happen successfully. Nothing appears in the dev console, no exception.
function messageReceived(message) {
console.log("Message received: " + messageString);
}
chrome.gcm.onMessage.addListener(messageReceived);
console.log('App loaded')
Is there anyone experiencing the same problem?

Related

Postman returns "Could not get any response" on Laravel backend - XAMPP on Mac OSX

So I'm running a Laravel backend for my app, and for the last year Postman has been working like a charm, suddenly a couple of days ago it just stopped working.
I updated the app and nothing changed. It's the standalone app, not the Chrome browser extension. I turned off the SSL verification in the settings pane, but still no changes.
Any API request through Postman only doesn't return anything, works fine in the actual website in Chrome.
Any suggestions would be greatly appreciated!
Thanks

APNS "invalid token" error-response (code 8)

I'm using APNS to send push notifications from my app to ~300 devices. I get an error response from APNS with code 8 (invalid token) for some of the devices. When I send again to all devices, I get the code 8 error response again, but for different devices (for some of the devices I always get this error, and for some I never get it).
I sent a request to the APNS feedback service but it did not return any errors for the app (this service should return "expired" tokens - in case the intended app doesn't exist on the device anymore).
I know that the "invalid token" error is commonly a result of environment mismatch - trying to send notifications from the APNS production server to a token that came from the sandbox environment, or vice versa. I can't see how that can be the case here, because the same token sometimes gets an error and sometimes doesn't.
Does anyone know of a different reason for APNS "invalid token" response?

NSURLConnectionLoader exception on first HTTPS request

I have an IOS App that sends HTTPS request to a server, using NSURLConnection, it works without any issue.
Now, I'm trying to put this App on OSX and to reuse code from the IOS App. It's the first time I'm developing on OSX, so I'm a beginner ;-)
My OSX get an exception when I'm sending my first HTTPS requests (using Post), the exception is about NSURLConnectionLoader (it ends at libc++abi.dylib __cxa throw and it seems it has been raised due to security issue Security::KeyChainCore...).
Next, on the debugger, if I click many times on continue, the request is successfully sent and I'm get the correct answer from the server.
The following requests that are sent are working fine (no exceptions), only the first one has issues.
Any idea? Any differences between OSX and IOS for NSURLConnection?
Thanks for the help,
Sebastien.

PushNotification Staus Code 200 but not Receiving Message

After successfully sent the URI to the web service from the push client, I send a toast notification from web service by using the URI, in web service I get the response as :
Push status 200,
NotificationStatus : Received,
DeviceConnectionStatus : Connected,
NotificationChannelStatus : Active.
But no message is received in the push client. The same scenario used to work fine earlier today. Can anyone tell me what is going wrong?
Is the message you are sending the same (ie. identical)? I seem to remember that some instances of a malformed message would get through the service OK, but then be suppressed on the device.
Do you have code to handle toast messages that arrive while your app is running? If you do, put a breakpoint in there and send a toast to the app while you're debugging and see what comes out. In this way you can make sure that the toast is making it to the device, and also see what the content is or what the problem might be.
channel.ShellToastNotificationReceived += channel_ShellToastNotificationReceived;
where channel is your channel object, and then
void channel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
{
Dispatcher.BeginInvoke(() => MessageBox.Show(e.Collection["wp:Text1"] + Environment.NewLine + e.Collection["wp:Text2"]));
}
or something similar to pop the message out to the display.
In web service, if a wrong setRequestProperty is set for example, setting wrong X-WindowsPhone-Target and wrong X-NotificationClass, then web service will receive notification received status, but the push client will not receive any message.
In my case I was sending a toast message with X-WindowsPhone-Target as token and X-NotificationClass as 1. After giving correct value it has started working fine.

WP7 Push Notification 404 response

My push client sends the URI to my web service, by using the URI, from my web service, I am able to send toast notification to my app installed on Emulator. But if I use the device URI and try to send a message to the device from web service, I get 404 as response. Can anyone tell me What the issue could be ?
Assuming you aren't having any problems receiving and storing the URL your physical device sends to your service, and that you are sending messages to this URL, the only thing I can think of is something I noticed during testing. On occasion, if a malformed message is sent to the URL, it appears to go into a faulted state and any subsequent message (even if well-formed) sent to the service returns a 404.
I don't know if this is expected behaviour or a bug - I resolved it by fixing the malformed messages I was trying to send, and refreshing the channel from the device.

Resources