-
Notifications
You must be signed in to change notification settings - Fork 44
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
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread #4
Comments
@ENGR-ZEESHAN, Could you post output for |
@anish-adm [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) |
Same problem :/ E/TSLocationManager(22678): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Timer-1 |
Same problem here, anyone get this resolve ? Edited: Future<bool> checkMockLocation() async {
Position position = await Geolocator().getLastKnownPosition();
return position.mocked;
} |
@bagus-setyawan thanks a lot mate, this bug give me a headache. |
Same issue
|
@anish-adm could you check this Similiar issue, ? i think this code make error
|
I am also getting this error when calling |
Still crashed with the latest Flutter version:
|
I think its now updated
|
try to execute this code after turning off and turning on location. It gives some kind of Exception. |
Is there any update on solving this error. I am also facing the same issue. I am on the latest build of TrustFall and flutter. |
Same problem here, after building App in release mode. |
@sunnykinger , @rp014947 , @wisnuwiry guys just use location plugin your own choice and make sure if permission permitted and get mocked properties from that, if you look into this project code you will notice that this is same way. Or you can make a fork and resolved the issue. But once again users can pass this checker with many ways (rooted phone etc) so add another validations if your app consent is about real user's location. |
Fix running on @UiThread : Checking my github: thanhit93@8a24ca5 |
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread
Future checkMockLocation() async { print("check mocklocation "); bool canMockLocation = await TrustFall.canMockLocation; print("mocklocation = "+ canMockLocation.toString()); }
The text was updated successfully, but these errors were encountered: