flutter_line_login icon indicating copy to clipboard operation
flutter_line_login copied to clipboard

Can't execute any method after logging in

Open raindy29 opened this issue 5 years ago • 6 comments

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)

raindy29 avatar Jun 30 '19 08:06 raindy29

Can you share the code that you've written?

empongpat avatar Jul 06 '19 08:07 empongpat

Not own code, use the example of this site

raindy29 avatar Jul 08 '19 00:07 raindy29

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.

hitshydev avatar Jul 23 '19 08:07 hitshydev

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.

WLBF avatar Jul 30 '19 15:07 WLBF

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 avatar Jul 30 '19 18:07 hitshydev

@hitshydev Thanks, I already tried the flutter_line_sdk, it works well with v1.7.8+hotfix.4.

WLBF avatar Aug 02 '19 13:08 WLBF