thingsboard / flutter_thingsboard_app

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

Issue in running the mobile app for the first time #34

Closed JustinaMary closed 5 months ago

JustinaMary commented 1 year ago

We are planning to use ThingsBoard’s open-source mobile application, to get the notification for the alarms and to view dashboards on the mobile devices.

I have installed all the packages and software required for the TB flutter app to run on windows system, but the errors attached below got raised whenever I tried to run the app from VS code. Please investigate this and help us in resolving this issue.

image

MM-06 commented 1 year ago

Did you use the thingsboard demo endpoint?

DayDreamer-commits commented 1 year ago

The app doesn't navigate after login. Although I am getting the token and refresh token once the login API is completed.

I closed the app and reopened it but is gives following error

Unsupported ThingsBoard platform version: 3.3.4.1 The docs mentions that Flutter ThingsBoard Mobile Application is served by ThingsBoard platform starting from version 3.3.0. Any help to fix this would be appreciated. @JustinaMary Have you found any solution to this??

DayDreamer-commits commented 1 year ago

After debugging for few hours I realized that the thingsboard client library 1.0.4 needs minimum version 3.4.2. ThingsBoard website docs is valid for client version 1.0.1.

MM-06 commented 1 year ago

@DayDreamer-com so does changing the thingsboard client version to 1.0.1 in the pubspec.yaml file solve the login issue?

DayDreamer-commits commented 1 year ago

No there are some breaking changes. I am trying it with some old commit.

DayDreamer-commits commented 1 year ago

By the way it would be better to update thingsboard server than trying the old commit.

DayDreamer-commits commented 1 year ago

With a previous commit (227c712d)and lots of changes finally its working.

MM-06 commented 1 year ago

@DayDreamer-commits if you don't mind, could you please list the changes you made?

DayDreamer-commits commented 1 year ago

I haven't listed it but just get a branch from that commit and run it. resolve the errors one by one and after few steps it will work.

MM-06 commented 1 year ago

@DayDreamer-commits I've been trying to resolve this issue on the PE edition, with your advice I've used an older commit and debugged. It works perfectly now, Thanks a lot for your help!!

hieunvce commented 1 year ago

I've the same issue. After upgrade TB to the latest version, it works now.