pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.31k stars 1.64k forks source link

Getting Error When Trying to Load an Animated Website with Background Video Player #2316

Open FlutteriPOP opened 1 month ago

FlutteriPOP commented 1 month ago

Environment

Technology Version
Flutter version 3.24.3

Device information:

MITV MOOR2 API Level = 30

Description

I am trying to run a website using this package on Android TV, but I am encountering an animation error. The animations do not work smoothly, and the background video is also not functioning.

Expected behavior:

Animations and video should play smoothly.

Current behavior:

│ ⛔ ERROR: Received Error: Status Code: 493271885, Message: net::ERR_FAILED, URL:

Steps to reproduce

  1. Open the app on Android TV.
  2. Navigate to the website.
  3. Observe the animations and background video.
  4. Stacktrace/Logcat

D/SurfaceUtils( 7166): disconnecting from surface 0x6f434808, reason disconnectFromSurface D/MediaCodec( 7166): flushMediametrics D/MediaCodec( 7166): flushMediametrics I/dia.lotus.lotu( 7166): NativeAlloc concurrent copying GC freed 7399(388KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3712KB/7424KB, paused 114us total 128.091ms W/cr_MediaCodecBridge( 7166): Releasing: OMX.MS.AVC.Decoder D/SurfaceUtils( 7166): connecting to surface 0x6946cc08, reason connectToSurface I/MediaCodec( 7166): [OMX.MS.AVC.Decoder] setting surface generation to 7338012 D/SurfaceUtils( 7166): disconnecting from surface 0x6946cc08, reason connectToSurface(reconnect) D/SurfaceUtils( 7166): connecting to surface 0x6946cc08, reason connectToSurface(reconnect) D/SurfaceUtils( 7166): disconnecting from surface 0x6946cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): connecting to surface 0x6946cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): set up nativeWindow 0x6946cc08 for 1280x720, color 0x15, rotation 0, usage 0x402930 D/SurfaceUtils( 7166): disconnecting from surface 0x6f2f1c08, reason disconnectFromSurface W/cr_MediaCodecBridge( 7166): Codec released D/SurfaceUtils( 7166): disconnecting from surface 0x6946cc08, reason disconnectFromSurface D/MediaCodec( 7166): flushMediametrics [AndroidInAppWebViewController] (android) WebView ID 0 calling "onLoadStart" using {url: https://lotus-dev.codegarage.in/template/animation-template/9} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onUpdateVisitedHistory" using {isReload: true, url: https://lotus-dev.codegarage.in/template/animation-template/9} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 22} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onTitleChanged" using {title: API integration in Dynamic Animation Template} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 35} D/MediaCodec( 7166): flushMediametrics [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 42} I/chromium( 7166): [INFO:CONSOLE(76)] "Uncaught ReferenceError: jsonData is not defined", source: https://lotus-dev.codegarage.in/template/animation-template/9 (76) I/dia.lotus.lotu( 7166): NativeAlloc concurrent copying GC freed 1294(128KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3729KB/7458KB, paused 128us total 118.130ms [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 3, message: Uncaught ReferenceError: jsonData is not defined} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 100} I/chromium( 7166): [INFO:CONSOLE(123)] "Fetched jsonData: [object Object]", source: https://lotus-dev.codegarage.in/template/animation-template/9 (123) [AndroidInAppWebViewController] (android) WebView ID 0 calling "onProgressChanged" using {progress: 100} I/chromium( 7166): [INFO:CONSOLE(138)] "data slick__ [object Object]", source: https://lotus-dev.codegarage.in/template/animation-template/9 (138) I/chromium( 7166): [INFO:CONSOLE(145)] "disclaimerData [object Object]", source: https://lotus-dev.codegarage.in/template/animation-template/9 (145) [AndroidInAppWebViewController] (android) WebView ID 0 calling "onLoadStop" using {url: https://lotus-dev.codegarage.in/template/animation-template/9} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: Fetched jsonData: [object Object]} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: data slick__ [object Object]} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: disclaimerData [object Object]} I/chromium( 7166): [INFO:CONSOLE(589)] "jsonData fade", source: https://lotus-dev.codegarage.in/template/animation-template/9 (589) I/chromium( 7166): [INFO:CONSOLE(594)] "Transition Speeds: 0.5s,0.5s,0.5s,0.5s,0.5s,0.5s,0.5s", source: https://lotus-dev.codegarage.in/template/animation-template/9 (594) [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: jsonData fade} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: Transition Speeds: 0.5s,0.5s,0.5s,0.5s,0.5s,0.5s,0.5s} [AndroidInAppWebViewController] (android) WebView ID 0 calling "onPageCommitVisible" using {url: https://lotus-dev.codegarage.in/template/animation-template/9} I/cr_MediaCodecBridge( 7166): create MediaCodec video decoder, mime video/avc, decoder name OMX.MS.AVC.Decoder I/OMXClient( 7166): IOmx service obtained I/MediaCodec( 7166): MediaCodec will operate in async mode D/MediaCodec( 7166): flushMediametrics D/SurfaceUtils( 7166): connecting to surface 0x6ef9b008, reason connectToSurface I/MediaCodec( 7166): [OMX.MS.AVC.Decoder] setting surface generation to 7338013 D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9b008, reason connectToSurface(reconnect) D/SurfaceUtils( 7166): connecting to surface 0x6ef9b008, reason connectToSurface(reconnect) E/ACodec ( 7166): [OMX.MS.AVC.Decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010 D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9b008, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): connecting to surface 0x6ef9b008, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): set up nativeWindow 0x6ef9b008 for 1920x1080, color 0x13, rotation 0, usage 0x402930 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 7 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 6 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 5 failed: -22 I/cr_MediaCodecBridge( 7166): create MediaCodec video decoder, mime video/avc, decoder name OMX.MS.AVC.Decoder I/OMXClient( 7166): IOmx service obtained I/MediaCodec( 7166): MediaCodec will operate in async mode D/MediaCodec( 7166): flushMediametrics D/SurfaceUtils( 7166): connecting to surface 0x6ef9cc08, reason connectToSurface I/MediaCodec( 7166): [OMX.MS.AVC.Decoder] setting surface generation to 7338014 D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9cc08, reason connectToSurface(reconnect) D/SurfaceUtils( 7166): connecting to surface 0x6ef9cc08, reason connectToSurface(reconnect) E/ACodec ( 7166): [OMX.MS.AVC.Decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010 D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9b008, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): connecting to surface 0x6ef9b008, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): set up nativeWindow 0x6ef9b008 for 1920x1088, color 0x15, rotation 0, usage 0x402930 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 7 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 6 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 5 failed: -22 D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): connecting to surface 0x6ef9cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): set up nativeWindow 0x6ef9cc08 for 1920x1080, color 0x13, rotation 0, usage 0x402930 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 7 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 6 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 5 failed: -22 I/cr_MediaCodecBridge( 7166): create MediaCodec video decoder, mime video/avc, decoder name OMX.MS.AVC.Decoder I/OMXClient( 7166): IOmx service obtained E/ACodec ( 7166): Unable to instantiate codec 'OMX.MS.AVC.Decoder' with err 0xfffffff4. E/ACodec ( 7166): signalError(omxError 0xfffffff4, internalError -12) E/MediaCodec( 7166): Codec reported err 0xfffffff4, actionCode 0, while in state 1 D/MediaCodec( 7166): flushMediametrics W/MediaCodec-JNI( 7166): try to release MediaCodec from JMediaCodec::~JMediaCodec()... W/MediaCodec-JNI( 7166): done releasing MediaCodec from JMediaCodec::~JMediaCodec(). E/cr_MediaCodecUtil( 7166): Failed to create MediaCodec by decoder name OMX.MS.AVC.Decoder E/cr_MediaCodecUtil( 7166): android.media.MediaCodec$CodecException: Failed to initialize OMX.MS.AVC.Decoder, error 0xfffffff4 E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.native_setup(Native Method) E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.(MediaCodec.java:1912) E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.createByCodecName(MediaCodec.java:1890) E/cr_MediaCodecUtil( 7166): at org.chromium.media.MediaCodecBridgeBuilder.createVideoDecoder(chromium-TrichromeWebViewGoogle.aab-stable-666807030:7) I/cr_MediaCodecBridge( 7166): create MediaCodec video decoder, mime video/avc, decoder name OMX.MS.AVC.Decoder I/OMXClient( 7166): IOmx service obtained E/ACodec ( 7166): Unable to instantiate codec 'OMX.MS.AVC.Decoder' with err 0xfffffff4. E/ACodec ( 7166): signalError(omxError 0xfffffff4, internalError -12) E/MediaCodec( 7166): Codec reported err 0xfffffff4, actionCode 0, while in state 1 D/MediaCodec( 7166): flushMediametrics W/MediaCodec-JNI( 7166): try to release MediaCodec from JMediaCodec::~JMediaCodec()... W/MediaCodec-JNI( 7166): done releasing MediaCodec from JMediaCodec::~JMediaCodec(). E/cr_MediaCodecUtil( 7166): Failed to create MediaCodec by decoder name OMX.MS.AVC.Decoder E/cr_MediaCodecUtil( 7166): android.media.MediaCodec$CodecException: Failed to initialize OMX.MS.AVC.Decoder, error 0xfffffff4 E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.native_setup(Native Method) E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.(MediaCodec.java:1912) E/cr_MediaCodecUtil( 7166): at android.media.MediaCodec.createByCodecName(MediaCodec.java:1890) E/cr_MediaCodecUtil( 7166): at org.chromium.media.MediaCodecBridgeBuilder.createVideoDecoder(chromium-TrichromeWebViewGoogle.aab-stable-666807030:7) D/SurfaceUtils( 7166): disconnecting from surface 0x6ef9cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): connecting to surface 0x6ef9cc08, reason setNativeWindowSizeFormatAndUsage D/SurfaceUtils( 7166): set up nativeWindow 0x6ef9cc08 for 1920x1088, color 0x15, rotation 0, usage 0x402930 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 7 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 6 failed: -22 W/ACodec ( 7166): [OMX.MS.AVC.Decoder] setting nBufferCountActual to 5 failed: -22

github-actions[bot] commented 1 month ago

👋 @FlutteriPOP

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!