Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unauthorised and session expired #27

Closed
LokeshReddy63 opened this issue Dec 16, 2022 · 10 comments
Closed

unauthorised and session expired #27

LokeshReddy63 opened this issue Dec 16, 2022 · 10 comments

Comments

@LokeshReddy63
Copy link

I am getting below error saying unauthorized for the first time and later session expired. I am providing right credentials.

I/flutter ( 4917): ERROR ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter ( 4917): ERROR │ ThingsboardError: message: [Unauthorized!], errorCode: null, status: null
I/flutter ( 4917): ERROR │ #0 toThingsboardError (package:thingsboard_pe_client/src/error/_thingsboard_error_handler_io.dart:89:18)
I/flutter ( 4917): ERROR │ #1 HttpInterceptor.onError (package:thingsboard_pe_client/src/interceptor/http_interceptor.dart:104:19)
I/flutter ( 4917): ERROR │ #2 DioMixin.fetch._errorInterceptorWrapper... (package:dio/src/dio_mixin.dart:574:28)
I/flutter ( 4917): ERROR │ #3 DioMixin.checkIfNeedEnqueue (package:dio/src/dio_mixin.dart:789:22)
I/flutter ( 4917): ERROR │ #4 DioMixin.fetch._errorInterceptorWrapper.. (package:dio/src/dio_mixin.dart:572:22)
I/flutter ( 4917): ERROR │ #5 new Future. (dart:async/future.dart:253:37)
I/flutter ( 4917): ERROR │ #6 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
I/flutter ( 4917): ERROR │ #7 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
I/flutter ( 4917): ERROR │ #8 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
I/flutter ( 4917): ERROR │ #9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
I/flutter ( 4917): ERROR │
I/flutter ( 4917): ERROR

@salemsw
Copy link

salemsw commented Dec 19, 2022

I have exactly the same error

@Seungkoo
Copy link

I also have the same problem.

@ezeroldan24
Copy link

I have the same problem, did you find a solution?

@Seungkoo
Copy link

Seungkoo commented Dec 27, 2022

I found the solution for this problem.
API and model might be changed from ThingsBoard platform version 3.4.2. "Asset_profile" model was added and this change was applied to dart package "thingsboard_pe_client" v1.0.5.
Open the file "pubspec.yaml" in your project directory and change the version of thingsboard_pe_client from 1.0.4 to 1.0.5, recompile your project.

@salemsw
Copy link

salemsw commented Dec 27, 2022

Thank you very much @Seungkoo, it works.

@ezeroldan24
Copy link

Thank you very much, it works fine @Seungkoo .

@badril1978
Copy link

works for me as well.

@ezeroldan24
Copy link

Does anyone know if there is a way to prevent this from happening again with new updates? Thank you.

@LokeshReddy63
Copy link
Author

probably someone from thingsboard team has to take a pick and change the version on the pubsepec file may be... probably not sure how the development process is in thingsboard.

@LokeshReddy63
Copy link
Author

thanks @Seungkoo its working fine !! but how come you know this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants