Firebase cloud function error, how to debug? - firebase

For some reason about a couple week ago, notifications in my app stopped working. I'm looking in the Firebase console through the logs of the function responsible for sending notifications and I see this:
However, I don't see where I can actually see the error that happened. Are the error logs located somewhere?

Related

Firebase Crashlytics Webhook for Slack won't report recurring crashes

I have successfully set up the Webhook for Slack so that it will report crashes on Firebase Crashlytics. This is working completely fine!
However, when it detects the same crash multiple times,
it will report the first crash to the slack channel just fine, but the second time and after the same crash is detected, it does not report to the slack channel.
Is this how it's supposed to be?
I want to notify Slack of all crashes.
I can see in the slack integration settings section that the following settings that can be/is turned on.
Please check my image. ↓
enter image description here
Thank you for watching. :D
This is working as expected. As you can see in the screenshot Triggered when your app experiences a crash Crashlytics hasn't seen before, the notifications will be triggered when a new issue is detected.
After that, crashes that fall in the same issue won't trigger a notification as Crashlytics has already seen them before.
Check this blog post that explains this in detail for the different types of alerts.

Can't create Firebase Cloud Messages From Console

For some reason, I don't see the ability for me to create FCMs from the Firebase console. It's not a browser issue as I tried on multiple browsers. It's not a permissions issue either since I am the owner of the project.
I tried implementing cloud functions to send FCMs and ever since when I go into the Cloud Messaging panel of the Firebase console I can no longer see the option to create messages.
Any insight would help!
Update--This is the error I'm getting from the JavaScript console:

Unable to call Firebase function from React.js application

I have a React.js application powered by a number of Firebase functions and real time database standing behind them. It has been working without any issue for the past 2-3 months and now I am getting a warning on the functions logs which says that:
#firebase/database: FIREBASE WARNING: {"code":"app/invalid-credential","message":"Credential implementation provided to initializeApp() via the \"credential\" property failed to fetch a valid Google OAuth2 access token with the following error: \"Failed to parse access token response: Error: Server responded with status 404.\"."}
The way I initialize firebase from my React.js application looks like this:
I have double-checked everything standing behind process.env and it seems to be as expected. The website written in React.js in hosted under the Firebase hosting.
And this is how Firebase functions connect to Admin SDK:
I am not sure what would be the issue here. Nothing has changes in the code base from our side. Not sure if Firebase changed something internally that we need to consider.
What solved the issue for me was to go to the google cloud console (where Firebase functions are also available). Then I opened one of the failing cloud functions and I navigated to
My_Function_Name/Edit/RUNTIME, BUILD AND CONNECTIONS SETTINGS/RUNTIME SERVICE ACCOUNT/
And then I noticed there that for all of my functions it was selected App Engine Default Service Account instead of Firebase Admin SDK. I never explicitly set the runtime to this option. So, when I brought it back to Firebase Admin SDK the error was gone I was able to use the application once again.

Firebase cloud messaging shows There was an error loading targeting options

I used Firebase cloud messaging to send the notification to the users but from last one week i am getting this error while targetting the App
There was an error loading targeting options.
I have same problem. Interesting thing, that message was shown when I switch to topic, play with it and when I returned back got that message.
So, I save as draft my notification, because I don't want to lose my filled data. Reload page or open again and now it is work as expected.

Cloud Functions for Firebase Logs Take so much time to show up?

I just write small Cloud Function to send notification to specific device and logs some message to console but it's show me that it's have been executed but logs really takes too much time to show up in Cloud Functions for Firebase logs, what exactly time taken to be shown in logs ?
It's seem to be working fine now logs come under one minute.

Resources