Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

google.message_id seems to have a carriage-return (%0d) on Android #197

Closed yves-s closed 8 years ago

yves-s commented 8 years ago

After taping on the push-message I get an Uncaught SyntaxError: Invalid or unexpected token I could backtrace the issue to an carriage-return on the Google message-id.

At the time we found the issue we we're on 5.1.2 after updating to 6.0.0 the issue was still existent.

One of the failed Google message-ids is: "google.message_id": "0:1470074202458384%0d4053e4f9fd7ecd"

I quickfixed the issue by deleting the carriage-return in the doOnMessageReceive-Method on line 858 in the PushNotification.java

yves-s commented 8 years ago

Thanks for this quick fix. So the issue was in our unlucky case, the special-char (%) and the string after it resulted in a carriage-return. And now you're "splitting" the string into two and put them together with an "+" like: "0:1470074202458384%" + "0d4053e4f9fd7ecd". Ok, got it. Thanks again.