-
Notifications
You must be signed in to change notification settings - Fork 231
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
Plugin crashing app with: Methods marked with @UiThread must be executed on the main thread #100
Comments
Fixed in master: dependencies:
flutter_background_geolocation:
git:
url: https://github.com/transistorsoft/flutter_background_geolocation.git |
I have cleaned up and recompiled the app after changing pubspec.yaml as you suggest. The error is still occurring: E/AndroidRuntime( 6949): java.lang.RuntimeException: An error occurred while executing doInBackground() |
While monitoring
|
cool. will do in a few minutes |
Here is the result from running the adb command: aubreys-imac:carapp aubs$ adb logcat -s TSLocationManager
|
You are not using the latest from master.
When you have latest from master (posted yesterday), you will see:
|
I ran the command again, hope there are more clues :) aubreys-imac:carapp aubs$ adb logcat -s TSLocationManager |
As you can see, you're still not using the latest from master:
Until you see this in your logs, it's not going to work:
|
Thank you ever so much!! Everything is working as expected. Much appreciated! 👌👌👌 |
Master is released to 1.0.12 |
Thanks again! will update to 1.0.12. |
Your Environment
flutter doctor
):[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.4 18E2034, locale en-GB)
• Flutter version 1.7.8+hotfix.3 at /Users/aubs/WORK/flutter
• Framework revision b712a172f9 (2 weeks ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/aubs/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.7.4
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] IntelliJ IDEA Community Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 37.1.3
• Dart plugin version 191.7830
[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0
[✓] Connected device (2 available)
• Pixel 2 • HT79S1A03826 • android-arm64 • Android 9 (API 28)
• Redmi 3S • cfe0c29e7d43 • android-arm64 • Android 6.0.1 (API 23)
! Doctor found issues in 1 category.
E/AndroidRuntime(23893): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: pool-4-thread-1
E/AndroidRuntime(23893): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:794)
E/AndroidRuntime(23893): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:684)
E/AndroidRuntime(23893): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:80)
E/AndroidRuntime(23893): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:174)
E/AndroidRuntime(23893): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:144)
E/AndroidRuntime(23893): at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation.success(EventChannel.java:226)
E/AndroidRuntime(23893): at com.transistorsoft.flutter.backgroundgeolocation.streams.GeofencesChangeStreamHandler.onGeofencesChange(GeofencesChangeStreamHandler.java:23)
E/AndroidRuntime(23893): at com.transistorsoft.locationmanager.geofence.TSGeofenceManager.a(Unknown Source)
E/AndroidRuntime(23893): at com.transistorsoft.locationmanager.geofence.TSGeofenceManager.a(Unknown Source)
E/AndroidRuntime(23893): at com.transistorsoft.locationmanager.geofence.TSGeofenceManager.a(Unknown Source)
E/AndroidRuntime(23893): at com.transistorsoft.locationmanager.geofence.TSGeofenceManager$b$1.run(Unknown Source)
E/AndroidRuntime(23893): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
E/AndroidRuntime(23893): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
E/AndroidRuntime(23893): at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: