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

Cannot run the example project on Android #12

Closed
michaelchow2324 opened this issue May 9, 2019 · 4 comments
Closed

Cannot run the example project on Android #12

michaelchow2324 opened this issue May 9, 2019 · 4 comments
Labels

Comments

@michaelchow2324
Copy link

michaelchow2324 commented May 9, 2019

I downloaded and run the project on my android emulator. I could see the thumbnail of the youtube link showing on the YoutubePlayer, however, i could not play the video.

Here are the logs appears when I pressed the play button of the YoutubePlayer

W/System.err( 4071): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: JavaBridge
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:74)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:163)
W/System.err( 4071): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:152)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:95)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:82)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel$1.run(JavaScriptChannel.java:49)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel.postMessage(JavaScriptChannel.java:53)
W/System.err( 4071): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err( 4071): at android.os.MessageQueue.next(MessageQueue.java:323)
W/System.err( 4071): at android.os.Looper.loop(Looper.java:136)
W/System.err( 4071): at android.os.HandlerThread.run(HandlerThread.java:61)
I/chromium( 4071): [INFO:CONSOLE(24)] "Uncaught Error: Java exception was raised during method invocation", source: https://sarbagyadhaubanjar.github.io/youtube_player/player.js (24)
W/System.err( 4071): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: JavaBridge
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:74)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:163)
W/System.err( 4071): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:152)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:95)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:82)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel$1.run(JavaScriptChannel.java:49)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel.postMessage(JavaScriptChannel.java:53)
W/System.err( 4071): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err( 4071): at android.os.MessageQueue.next(MessageQueue.java:323)
W/System.err( 4071): at android.os.Looper.loop(Looper.java:136)
W/System.err( 4071): at android.os.HandlerThread.run(HandlerThread.java:61)
I/chromium( 4071): [INFO:CONSOLE(31)] "Uncaught Error: Java exception was raised during method invocation", source: https://sarbagyadhaubanjar.github.io/youtube_player/player.js (31)
W/System.err( 4071): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: JavaBridge
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
W/System.err( 4071): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:74)
W/System.err( 4071): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:163)
W/System.err( 4071): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:152)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:95)
W/System.err( 4071): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:82)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel$1.run(JavaScriptChannel.java:49)
W/System.err( 4071): at io.flutter.plugins.webviewflutter.JavaScriptChannel.postMessage(JavaScriptChannel.java:53)
W/System.err( 4071): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err( 4071): at android.os.MessageQueue.next(MessageQueue.java:323)
W/System.err( 4071): at android.os.Looper.loop(Looper.java:136)
W/System.err( 4071): at android.os.HandlerThread.run(HandlerThread.java:61)
I/chromium( 4071): [INFO:CONSOLE(24)] "Uncaught Error: Java exception was raised during method invocation", source: https://sarbagyadhaubanjar.github.io/youtube_player/player.js (24)
E/eglCodecCommon( 4071): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4071): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4071): glUtilsParamSize: unknow param 0x000085b5

Is there any initial setup that i have missed?

@sarbagyastha
Copy link
Owner

No initial setup needed. Please include flutter doctor -v log

@JamalBelilet
Copy link

Have the same problem after upgrading to v1.5

@sarbagyastha
Copy link
Owner

flutter/flutter#32315 It seems to be an issue due to changes in 1.5.x . Found some posts which confirms that there is no such issue in dev branch, haven't test it though.

@sarbagyastha
Copy link
Owner

Version 1.1.1 addresses the issue.

@vinodlee vinodlee mentioned this issue Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants