Liferay Push - Receiving "Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $" when sending notifications
Written By
Alfonso Crisci
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- When sending
json Liferay Push notifications in Liferay DXP from Control Panel -> Configuration -> Push notifications -> Test , portal administrators may see a failure of such operation with the following errors:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
ERROR [liferay/push_notification_response-1][PushNotificationsResponseMessageListener:41] {"payload":null,"javaClass":"com.liferay.push.notifications.sender.BaseResponse","id":null,"platform":"firebase","status":"java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $","succeeded":false,"token":null}
Environment
Resolution
- Rather than focusing on the
syntax, the message indicates that other elements are at the root of the error: e.g.: incorrect API Key, misconfiguration, connection and authentication issues, etc ...
- In case https://issues.liferay.com/browse/LPS-102340 will be fixed and released, users will see a more fine-tuned error message, showing the actual root cause
Did this article resolve your issue ?