flutter_line_login
flutter_line_login copied to clipboard
Can't execute any method after logging in
Try to use phone and simulator are the same error
E/AndroidRuntime(31250): FATAL EXCEPTION: DefaultDispatcher-worker-1 E/AndroidRuntime(31250): Process: app.test.com, PID: 31250 E/AndroidRuntime(31250): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: DefaultDispatcher-worker-1 E/AndroidRuntime(31250): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605) E/AndroidRuntime(31250): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:556) E/AndroidRuntime(31250): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:131) E/AndroidRuntime(31250): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225) E/AndroidRuntime(31250): at net.granoeste.flutterlinelogin.FlutterLineLoginPlugin$onMethodCall$2.invokeSuspend(FlutterLineLoginPlugin.kt:140) E/AndroidRuntime(31250): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) E/AndroidRuntime(31250): at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236) E/AndroidRuntime(31250): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) E/AndroidRuntime(31250): at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) E/AndroidRuntime(31250): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
Can you share the code that you've written?
Not own code, use the example of this site
I ran into the same problem. Seems like it has to do with the new Flutter 1.7.8+hotfix.3 release, because it still works with 1.5.4-hotfix.2.
Same problem. I called _flutterLineLogin.startLogin(_onLoginSuccess, _onLoginError);
in a bloc mapEventToState function then the app crashed with same error message.
➜ ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.36.1)
[✓] Connected device (1 available)
• No issues found!
The problem seems occur after flutter v1.6.0.
LINE released their own SDK package. I haven't tried it yet, but I guess it will work with the newer Flutter versions: https://github.com/line/flutter_line_sdk/
@hitshydev Thanks, I already tried the flutter_line_sdk, it works well with v1.7.8+hotfix.4.