68
Views
7
Comments
Solved
Fire base cloud messaging
Question
Application Type
Mobile

Hi 

I have configured the cloud messaging demo application with  Firebase console JSON and build  has been generated but i am unable to send push notification. I am getting an error as Firebase entity is empty can anyone help me on this to overcome this issue. What should be in service account file attribute of Firebase entity.

RichNotifications.oml
UserImage.jpg
Shriyash Dixit
Solution

Hello, This might help you to get the solution Service Account File: 

The service account file is a JSON file containing the credentials required for server-to-server communication with Firebase services. 

To obtain this file - Go to the Firebase console (https://console.firebase.google.com/). > Select your project > Navigate to Project settings  >  Service accounts. > Under "Firebase Admin SDK," click on "Generate new private key" This will download a JSON file to your computer. 

You need to create a Firebase entity in OutSystems and configure it with the settings obtained from the Firebase console. > Create a new entity named "Firebase" or similar. > Add attributes to this entity such as Project ID, FCM sender ID, and Service Account File. > For the Service Account File attribute, it should be of the type Binary Data > Upload the JSON file downloaded from the Firebase console to populate this attribute. 

Ensure that you correctly set up the data type and attribute properties to handle binary data. 

Check that you are correctly mapping the attributes of the Firebase entity to the corresponding settings from the Firebase console. 

Verify that the Service Account File attribute is properly configured to store the binary data from the JSON file. 

Use the appropriate actions or integrations provided by the OutSystems Forge component you are using for Firebase Cloud Messaging. 

Monitor any error messages or logs to identify and troubleshoot any issues that arise during the push notification sending process.   

Cheers, 
Shriyash Dixit 

UserImage.jpg
Rakesh K

Hi Shriyash

Its working now Thanks for your response.

UserImage.jpg
nirav tank

can you give me information about how to send push notifications using FCM token 

or any other way to do this.

2026-04-13 05-08-14
Pankaj Jain

Hi,

You have a entity 'Firebase', which is only used to retrieve the data. I do not see any values your creating/inserting in that by using Create or Update method if entity. So you need to add some values if you want to retrieve the data else it will return empty. Also you should also do a empty check after retrieving the value to avoid the error.

Thanks
Pankaj

UserImage.jpg
Rakesh K

Hi Pankaj Jain 

Thank you for your response
My doubt is what value need to be inserted to that entity what is meant by service account file where can i get that binary file.

Project ID &  JSON  file & FCM sender ID all these three  i got from firebase console but i don't know where to get that service account binary file.

UserImage.jpg
Shriyash Dixit
Solution

Hello, This might help you to get the solution Service Account File: 

The service account file is a JSON file containing the credentials required for server-to-server communication with Firebase services. 

To obtain this file - Go to the Firebase console (https://console.firebase.google.com/). > Select your project > Navigate to Project settings  >  Service accounts. > Under "Firebase Admin SDK," click on "Generate new private key" This will download a JSON file to your computer. 

You need to create a Firebase entity in OutSystems and configure it with the settings obtained from the Firebase console. > Create a new entity named "Firebase" or similar. > Add attributes to this entity such as Project ID, FCM sender ID, and Service Account File. > For the Service Account File attribute, it should be of the type Binary Data > Upload the JSON file downloaded from the Firebase console to populate this attribute. 

Ensure that you correctly set up the data type and attribute properties to handle binary data. 

Check that you are correctly mapping the attributes of the Firebase entity to the corresponding settings from the Firebase console. 

Verify that the Service Account File attribute is properly configured to store the binary data from the JSON file. 

Use the appropriate actions or integrations provided by the OutSystems Forge component you are using for Firebase Cloud Messaging. 

Monitor any error messages or logs to identify and troubleshoot any issues that arise during the push notification sending process.   

Cheers, 
Shriyash Dixit 

UserImage.jpg
Rakesh K

Hi Shriyash

Its working now Thanks for your response.

UserImage.jpg
nirav tank

can you give me information about how to send push notifications using FCM token 

or any other way to do this.

UserImage.jpg
nirav tank

hii

i got error when i use this one
cannot read properties of undefined (reading 'OSFirebaseCloudMessaging')

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.