Closed mahshadparsa closed 2 months ago
Hello @mahshadparsa.
Please ensure that you are using the same Firebase for both your mobile app and the backend. If you are using the Firebase CLI script, make sure you have selected the correct Firebase project during the configuration of your mobile app (Step 4.2).
Hello @ybeshkarov I have just one project in my FireBase, and I used the key of that project for ThingsBoard and the google-service.json of that project for my custom Flutter app. But I can not get a notification yet.
Hello @mahshadparsa,
I encountered the same issue when my TB backend instance was using a key from a different Firebase than my mobile app. You might want to regenerate your Firebase Admin SDK key by following this guide (Step 4.1). Afterward, add this key as a sysadmin to your TB backend instance. Finally, confirm with the Firebase CLI that your mobile app uses the same Firebase.
Hello @ybeshkarov, Thanks for your response. I have just one project in the Firebase. I regenerated the Firebase Admin SDK key and added it to my TB backend instance as a sysadmin. I checked the Firebase CLI, and my mobile app uses the same Firebase. But I still have that problem.
Hi @mahshadparsa,
Please do the following:
If it didn't help, you might also try to restart ThingsBoard.
Hello @ViacheslavKlimov I checked the Firebase and Firebase Cloud Messaging API is enable. Please let me know, how can I do a clean rebuild of my custom app in android studio? About restarting TingsBoard I reinstalled it 3 weeks ago.
Hello @mahshadparsa, To perform a clean rebuild of your custom app in Android Studio, follow these steps:
flutter clean
.flutterfire configure
.flutter run
. If you want to build a release version, use flutter run --release
.Based on the steps mentioned, I performed a clean rebuild of my custom app in Android Studio. But I just can receive a notification from the Firebase console, not from the Thingsbaord. In the Thingsboard, I receive the error "User doesn't use the mobile app"!
@mahshadparsa, please try logging out and back into your mobile app.
I logged out of the mobile app and logged in again and I received the error "User doesn't use the mobile app" again! I restarted the Thingsboard again and it doesn't have any effect.
@mahshadparsa, could you open an issue at: https://github.com/thingsboard/thingsboard/issues? It's related to the backend, not mobile.
Thank you @ybeshkarov I opened this issue at: https://github.com/thingsboard/thingsboard/issues https://github.com/thingsboard/thingsboard/issues/10602
hello everyone. I am trying to send a notification from ThingsBoard to my custom Flutter app. I Generated a project in FireBase and I set the key of ThingsBoard like the following link: https://thingsboard.io/docs/pe/mobile/getting-started/ I use thingsboard_client: ^1.1.1 in my custom Flutter app, and I set FireBase in my app according to the following link: https://firebase.google.com/docs/flutter/setup?hl=en&authuser=0&platform=android Now, I can receive notifications from the FireBase console, But not ThingsBoard! when I send a notification from thingsBoard, I get "Failed to send message via FCM: SenderId mismatch" error.![2](https://github.com/thingsboard/dart_thingsboard_client/assets/13507162/0b3c5450-2a01-456b-9d94-c181c5bc99b7)
Please, let me know, how I can fix this problem.
I am using thingsboard 3.6.3, and flutter 3.19.4.