thingsboard / flutter_thingsboard_pe_app

ThingsBoard PE Mobile Application
https://thingsboard.io/products/mobile-pe/
BSD 3-Clause "New" or "Revised" License
87 stars 69 forks source link

Push Notifications Are Not Configured #93

Closed YuriYabe closed 3 months ago

YuriYabe commented 3 months ago

Hi, I have the 3.6.3PE version of Thingsboard. I have downloaded all the packages to create the application, and everything works fine except for push notifications, just like in the previous versions.

I followed the guide to integrate Firebase with Flutter to enable push notifications. I built an APK to test it. By going to the app's permissions, I can actually enable the notifications (previously I couldn't even see them). I enabled them, logged in, and checked that the dashboard, alarms, etc., work, and everything is functioning correctly. At this point, I did a notification check.

I went to "More," clicked on "Notifications," and I get the message "Notifications are not configured. Please contact your system administrator" (light gray button).

I inserted the JSON into Thingsboard I executed flutterfire configure Followed the documentation How can I resolve this? Immagine WhatsApp 2024-05-16 ore 15 59 33_4fe3e27c 777 Screenshot 2024-05-16 160039

ybeshkarov commented 3 months ago

Hello @YuriYabe!

After running flutterfire configure, you should see changes in lib/firebase_options.dart. Can you confirm if you are seeing these changes?

YuriYabe commented 3 months ago

Hi @ybeshkarov , thanks for your response! Yes, I see the changes. Actually, I managed to resolve it during the night. I deleted the firebase_options file and when I did flutterfire configure, it recreated it correctly! I see the notifications now.

However, as soon as I open the app, I get a message "path '/api/notifications/unread/count': not found." I can close it, but it appears every time I reopen the app! In fact, I can't see the unread notifications. Do you have any idea what the problem might be? Tonight I will try to rebuild the app from scratch!

(At least the notifications arrive; if I go under "all" I can see them. The problem is only with the "unread" ones.)

YuriYabe commented 3 months ago

Hi @ybeshkarov , thanks for your response! Yes, I see the changes. Actually, I managed to resolve it during the night. I deleted the firebase_options file and when I did flutterfire configure, it recreated it correctly! I see the notifications now.

However, as soon as I open the app, I get a message "path '/api/notifications/unread/count': not found." I can close it, but it appears every time I reopen the app! In fact, I can't see the unread notifications. Do you have any idea what the problem might be? Tonight I will try to rebuild the app from scratch!

(At least the notifications arrive; if I go under "all" I can see them. The problem is only with the "unread" ones.)

UPDATE: (Now I still have the same error, but when I go to "unread" I can see the notifications.)

ybeshkarov commented 3 months ago

Hi @YuriYabe,

It's good to hear that the notifications are working for you now.

The error message path '/api/notifications/unread/count': not found indicates that your ThingsBoard instance doesn't have the specified endpoint https://thingsboard.cloud/swagger-ui/#/notification-controller/getUnreadNotificationsCountUsingGET.

This endpoint was added in version 3.6.4.

ybeshkarov commented 3 months ago

Closed due to no further action required. Please reopen if the issue persists.