Foros de discusión

Error sending Apple iOS Push Notifications

thumbnail
Denis Signoretto, modificado hace 7 años.

Error sending Apple iOS Push Notifications

Expert Mensajes: 375 Fecha de incorporación: 21/04/09 Mensajes recientes
Hi,

I'm using Liferay 6.2 CE GA6 and Liferay Push CE Notification portlet 1.3.0. I can successfully register iOS devices and the list of available push tokens is correctly populated in Liferay Push CE portlet. I've configured Apple APN certificate, password and sandbox mode through control panel.

Selecting sanbox certificate and sanbox flag all is working fine. Switching to production mode (using the production certificate and removing sandbox flag) try to send push notification message through control panel test panel I get the following error:

The Destination APNS server is not stated 
Use .withDestination(), withSandboxDestination(), or withProductionDestination().",
"token":null,
"javaClass":"com.liferay.pushnotifications.sender.BaseResponse",
"payload":null}


I've investigated a while looking at source code of Liferay Push Portlet (branch 6.2.x). I've seen that sandbox destination mode is set explitictly when sandbox is flagged in but it seems it doesn't set production Destination mode when sandbox is not flagged in.

https://github.com/liferay/liferay-plugins/blob/6.2.x/portlets/push-notifications-portlet/docroot/WEB-INF/src/com/liferay/pushnotifications/sender/apple/ApplePushNotificationsSender.java

but I'm not sure this is the cause of the problem.


Can you tell me if you have ever had similar problem or was able to setup iOS/Apple Push Notification portlet successfully in production mode?

Thanks,
Denis.
thumbnail
Bruno Farache, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
You're right, Denis.

For some reason this was fixed on EE 6.2 but didn't get backported to 6.2.x, which is weird.

The code should look like this:

if (isSandbox()) {
appleServiceBuilder.withSandboxDestination();
}
else {
appleServiceBuilder.withProductionDestination();
}

I will send a fix to the 6.2.x branch and release a new version of the portlet.

Thanks for reporting this.
thumbnail
Denis Signoretto, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

Expert Mensajes: 375 Fecha de incorporación: 21/04/09 Mensajes recientes
Hi Bruno,

thanks for your feedback.

Just a question, I've seen that current version of Liferay Push CE on marketplace is 1.3.0.
What's the best way to checkout this version from liferay-plugins repository?

Thanks,
Denis.
thumbnail
Bruno Farache, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
I'm not sure, Denis, I will ask the release team how it works.

Every time they release they make commits like this one:

https://github.com/liferay/liferay-plugins/commit/f068ba2a9e6235b5b7c585f5909d62e4a8306ca3

As you can see, they increment the version number in liferay-plugin-package.properties. But I'm not sure how this "module-incremental-version" relates to the dot notation version they use for the plugin. I will ask the team to answer us.
thumbnail
Jeffrey Yang, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

New Member Mensajes: 4 Fecha de incorporación: 24/02/12 Mensajes recientes
Hello Denis,

You can checkout Liferay Push CE 1.3.0 at the following:

Repository: https://github.com/liferay/liferay-plugins
Branch: 6.2.x
Commit: f068ba2a9e6235b5b7c585f5909d62e4a8306ca3
thumbnail
Bruno Farache, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

Liferay Master Mensajes: 603 Fecha de incorporación: 14/05/07 Mensajes recientes
thumbnail
Denis Signoretto, modificado hace 7 años.

RE: Error sending Apple iOS Push Notifications

Expert Mensajes: 375 Fecha de incorporación: 21/04/09 Mensajes recientes
Hey Bruno,

I've just updated to 1.4.0 version and now and I can confirm that ios push notifications with production certificate are successfully delivered !

Thansk for your support!
Denis.
thumbnail
Sushil Patidar, modificado hace 6 años.

RE: Error sending Apple iOS Push Notifications

Expert Mensajes: 467 Fecha de incorporación: 31/10/11 Mensajes recientes
Hi Bruno,

Can i get help on thread

Regards
thumbnail
Mahmoud Elsonbati, modificado hace 4 años.

RE: Error sending Apple iOS Push Notifications

New Member Mensajes: 22 Fecha de incorporación: 10/12/14 Mensajes recientes
I have installed liferay CE push and configured it to use firebase push notification to work with android test app ..in the beginning it was working perfectly but when i changed the account of the  firebase project and used  the new Legacy server key it didn't work ..registering devices is working fine  but when sending push notifications to the device  nothing is sent andi get an error in the server log   ERROR [liferay/push_notification_response-1][PushNotificationsResponseMessageListener:41] {"payload":null,"javaClass":"com.liferay.push.notifications.sender.BaseResponse","id":null,"platform":"android","status":"HTTP Status Code: 400(Error=DeprecatedEndpoint)","succeeded":false,"token":null}

iam using  Liferay Community Edition Portal 7.1.2 CE GA3 and the Liferay CE Push i downloaded from marketplace and it supports  Liferay CE Portal 7.1 GA1+please advise
thumbnail
Javier Gamarra, modificado hace 4 años.

RE: Error sending Apple iOS Push Notifications

Expert Mensajes: 348 Fecha de incorporación: 12/02/15 Mensajes recientes
The legacy server way was shut down by Google a couple of months ago, you have to use firebase now.
thumbnail
Mahmoud Elsonbati, modificado hace 4 años.

RE: Error sending Apple iOS Push Notifications

New Member Mensajes: 22 Fecha de incorporación: 10/12/14 Mensajes recientes
It is firebase  what iam using actually ..i have tested changing the legacy key with the server key but in vain..i started to develop a custom notification portlet manually
thumbnail
Javier Gamarra, modificado hace 4 años.

RE: Error sending Apple iOS Push Notifications

Expert Mensajes: 348 Fecha de incorporación: 12/02/15 Mensajes recientes
I meant not using the legacy key and the firebase key instead. Legacy key can't work right now.
Leonard Duncan, modificado hace 4 años.

RE: Error sending Apple iOS Push Notifications

New Member Mensaje: 1 Fecha de incorporación: 12/03/20 Mensajes recientes
Yup i had same problem like you mentioned erlier but after updating the version the problem is no more.
Leonard Duncan
Thank you
McDVOICE