Youtube_player_flutter: [BUG] Crash while playing on Android 5.1

Created on 26 Nov 2020  路  1Comment  路  Source: sarbagyastha/youtube_player_flutter

Describe the bug
The cover appears, the loading spins and, when the video starts, there is a crash:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
       at com.android.webview.chromium.WebViewContentsClientAdapter.getDefaultVideoPoster(WebViewContentsClientAdapter.java:992)
       at com.android.org.chromium.android_webview.DefaultVideoPosterRequestHandler$1.run(DefaultVideoPosterRequestHandler.java:39)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5312)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

This behavior don't affect iOS.

To Reproduce
Steps to reproduce the behavior:
Unknown (I've implemented the player for iOS and then when I tested on Android, this crash terminated my app).

Expected behavior
To work.

Technical Details:

  • Device: [e.g. iPhone6] MotoG 1st Edition (2013)
  • OS: [e.g. iOS8.1] Android
  • Version [e.g. 22] 5.1

Additional context
There is a Google AdMob banner at the bottom of the page (so my app is built with a container with a bottom padding to accomodate the banner, since the ad plugin only shows banners on top or bottom)

bug

Most helpful comment

me too ,on android 5.1

>All comments

me too ,on android 5.1

Was this page helpful?
0 / 5 - 0 ratings