flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
163.19k stars 26.85k forks source link

[Web] [Video_Player] Rendering regression #88688

Closed zambetpentru closed 2 years ago

zambetpentru commented 2 years ago

Greetings,

I have been digging into a couple of rendering regressions around video_player / html element views that have creeped in since the current stable 2.2.3.

This one causes widgets to not render correctly once a video_player is present on the screen once (not even played or full screen). It appears that the Web GL messages are a generic error related to several different commits and with different timelines so for me this is not a duplicate of 86809 as it was introduced recently with a specific commit and not the more general case.

Working: 2.2.3 stable and 2.3.0-24.0.pre is not affected 2.4.0-0.0.pre flutter-2.4-candidate.1 flutter-2.4-candidate.2

Broken: *2.4.0-4.0.pre - dragging around the window size draws all sorts of things. And exit from full screen. And broken all the way to current master 2.5.0-7.0.pre.187

Trigger: *Just show a video_player on the screen

Issues: Black screen on resizing Widgets overwriting each other

Expected: image

Actual upon page changes or resizing: image

image

image

Files to recreate: main.dart.txt index.html.txt churn.pdf pubspec.yaml.txt

flutter doctor ```console [√] Flutter (Channel master, 2.5.0-7.0.pre.187, on Microsoft Windows [Version 10.0.17763.2114], locale en-IE) • Flutter version 2.5.0-7.0.pre.187 at C:\Code\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 05bfbbfbec (7 hours ago), 2021-08-22 21:37:03 -0400 • Engine revision 710af46d53 • Dart version 2.15.0 (build 2.15.0-42.0.dev) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Omega\AppData\Local\Android\sdk • Platform android-30, build-tools 30.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) • All Android licenses accepted. [√] Chrome - develop for the web • CHROME_EXECUTABLE = C:\Code\FlutterTesting\ChromeCORS.bat [√] Android Studio (version 2020.3) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) [√] VS Code (version 1.59.1) • VS Code at C:\Users\Omega\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [√] Connected device (2 available) • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.73 • No issues found! ```

If there's anything I can do to support the diagnostic effort please let me know :-)

TahaTesser commented 2 years ago

Hi @zambetpentru Using the same code. packages, assets, Project doesn't run on any channels using both renderers

logs ```console [ +128 ms] executing: sysctl hw.optional.arm64 [ +22 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ +8 ms] executing: [/Users/tahatesser/Code/flutter_master/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +18 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 05bfbbfbecb2429a1a9493a26b0ce02a6040da3c [ +1 ms] executing: [/Users/tahatesser/Code/flutter_master/] git tag --points-at 05bfbbfbecb2429a1a9493a26b0ce02a6040da3c [ +87 ms] Exit code 0 from: git tag --points-at 05bfbbfbecb2429a1a9493a26b0ce02a6040da3c [ +1 ms] executing: [/Users/tahatesser/Code/flutter_master/] git describe --match *.*.* --long --tags 05bfbbfbecb2429a1a9493a26b0ce02a6040da3c [ +49 ms] Exit code 0 from: git describe --match *.*.* --long --tags 05bfbbfbecb2429a1a9493a26b0ce02a6040da3c [ ] 2.5.0-6.0.pre-187-g05bfbbfbec [ +11 ms] executing: [/Users/tahatesser/Code/flutter_master/] git rev-parse --abbrev-ref --symbolic @{u} [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/master [ ] executing: [/Users/tahatesser/Code/flutter_master/] git ls-remote --get-url origin [ +13 ms] Exit code 0 from: git ls-remote --get-url origin [ +1 ms] https://github.com/flutter/flutter.git [ +124 ms] executing: [/Users/tahatesser/Code/flutter_master/] git rev-parse --abbrev-ref HEAD [ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] master [ +7 ms] executing: sw_vers -productName [ +22 ms] Exit code 0 from: sw_vers -productName [ ] macOS [ ] executing: sw_vers -productVersion [ +19 ms] Exit code 0 from: sw_vers -productVersion [ ] 12.0 [ ] executing: sw_vers -buildVersion [ +21 ms] Exit code 0 from: sw_vers -buildVersion [ ] 21A5304g [ +86 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +79 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +38 ms] executing: sysctl hw.optional.arm64 [ +7 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ ] executing: xcrun xcodebuild -version [ +250 ms] Exit code 0 from: xcrun xcodebuild -version [ ] Xcode 13.0 Build version 13A5212g [ +77 ms] Skipping pub get: version match. [ +60 ms] Found plugin device_info at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.2/ [ +31 ms] Found plugin pdf_render at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.12/ [ +37 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-2.0.3/ [ +24 ms] Found plugin integration_test at /Users/tahatesser/Code/flutter_master/packages/integration_test/ [ +2 ms] Found plugin video_player at /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/ [ +100 ms] Found plugin device_info at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.2/ [ +33 ms] Found plugin pdf_render at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.12/ [ +28 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-2.0.3/ [ +15 ms] Found plugin integration_test at /Users/tahatesser/Code/flutter_master/packages/integration_test/ [ +1 ms] Found plugin video_player at /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/ [ +23 ms] Generating /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/example/android/app/src/main/java/io/flutter/plugins/Ge neratedPluginRegistrant.java [ +398 ms] Launching lib/main.dart on Chrome in debug mode... [ +151 ms] Updating assets [ +166 ms] Waiting for connection from debug service on Chrome... [ +10 ms] Found plugin device_info at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.2/ [ +8 ms] Found plugin pdf_render at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.12/ [ +8 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-2.0.3/ [ +6 ms] Found plugin integration_test at /Users/tahatesser/Code/flutter_master/packages/integration_test/ [ +1 ms] Found plugin video_player at /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/ [ +12 ms] Found plugin device_info at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/device_info-2.0.2/ [ +6 ms] Found plugin pdf_render at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.12/ [ +8 ms] Found plugin video_player_web at /Users/tahatesser/.pub-cache/hosted/pub.dartlang.org/video_player_web-2.0.3/ [ +6 ms] Found plugin integration_test at /Users/tahatesser/Code/flutter_master/packages/integration_test/ [ ] Found plugin video_player at /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/ [ +68 ms] <- reset [ +10 ms] /Users/tahatesser/Code/flutter_master/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/tahatesser/Code/flutter_master/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /Users/tahatesser/Code/flutter_master/bin/cache/flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=false -DFLUTTER_WEB_USE_SKIA=false --output-dill /var/folders/2c/0n3lcxpn4s14s3t7jcgg5kmh0000gn/T/flutter_tools.LzyAx9/flutter_tool.64FhmX/app.dill --libraries-spec file:///Users/tahatesser/Code/flutter_master/bin/cache/flutter_web_sdk/libraries.json --packages /Users/tahatesser/StudioProjects/plugins-clone/packages/video_player/video_player/example/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root /var/folders/2c/0n3lcxpn4s14s3t7jcgg5kmh0000gn/T/flutter_tools.LzyAx9/flutter_tools.1KS4h0 --filesystem-scheme org-dartlang-app --initialize-from-dill build/e1ffba66f615b3b54e08e2104bac7ab8.cache.dill.track.dill --platform file:///Users/tahatesser/Code/flutter_master/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --sound-null-safety [ +15 ms] <- compile org-dartlang-app:/web_entrypoint.dart [+17005 ms] Waiting for connection from debug service on Chrome... (completed in 17.2s) [ ] Synced 26.8MB. [ ] <- accept [ ] Caching compiled dill [ +83 ms] Using Google Chrome 92.0.4515.159 [ +11 ms] executing: sysctl hw.optional.arm64 [ +8 ms] Exit code 1 from: sysctl hw.optional.arm64 [ ] sysctl: unknown oid 'hw.optional.arm64' [ +366 ms] [CHROME]: [ +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:52248/devtools/browser/3c0d5dcb-2884-4e92-a7e0-52925ce220d5 [+1084 ms] DwdsInjector: Received request for entrypoint at http://localhost:52236/main_module.bootstrap.js [ +10 ms] MetadataProvider: Loading debug metadata... [ +17 ms] MetadataProvider: Loaded debug metadata (sound null safety) [ +7 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:52236/main_module.bootstrap.js [+1757 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true [ +77 ms] DevHandler: Debug service listening on ws://127.0.0.1:52268/kVe08ZtCwwc=/ws [ +27 ms] This app is linked to the debug service: ws://127.0.0.1:52268/kVe08ZtCwwc=/ws [ +14 ms] Debug service listening on ws://127.0.0.1:52268/kVe08ZtCwwc=/ws [ ] 💪 Running with sound null safety 💪 [ +3 ms] 🔥 To hot restart changes while running, press "r" or "R". [ ] For a more detailed help message, press "h". To quit, press "q". [ +1 ms] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:52268/kVe08ZtCwwc= [ +213 ms] in build [ +247 ms] DevTools activation throttled until 2021-08-23 22:47:00.774182. [ +320 ms] Error: PlatformException(error, TypeError: Cannot read property 'getDocument' of undefined, null, null) at Object.throw_ [as throw] (http://localhost:52236/dart_sdk.js:5079:11) at StandardMethodCodec.decodeEnvelope (http://localhost:52236/packages/flutter/src/services/restoration.dart.lib.js:2286:19) at MethodChannel._invokeMethod (http://localhost:52236/packages/flutter/src/services/restoration.dart.lib.js:1528:47) at _invokeMethod.next () at http://localhost:52236/dart_sdk.js:38629:33 at _RootZone.runUnary (http://localhost:52236/dart_sdk.js:38500:59) at _FutureListener.thenAwait.handleValue (http://localhost:52236/dart_sdk.js:33700:29) at handleValueCallback (http://localhost:52236/dart_sdk.js:34252:49) at Function._propagateToListeners (http://localhost:52236/dart_sdk.js:34290:17) at _Future.new.[_completeWithValue] (http://localhost:52236/dart_sdk.js:34138:23) at async._AsyncCallbackEntry.new.callback (http://localhost:52236/dart_sdk.js:34159:35) at Object._microtaskLoop (http://localhost:52236/dart_sdk.js:38767:13) at _startMicrotaskLoop (http://localhost:52236/dart_sdk.js:38773:13) at http://localhost:52236/dart_sdk.js:34506:9 [ +83 ms] in build [ +244 ms] The Flutter DevTools debugger and profiler on Chrome is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:52268/kVe08ZtCwwc= ```
preview Screenshot 2021-08-23 at 15 30 48

Can you please provide a complete reproducible minimal code sample without third-party paclages, and complete flutter run --verbose logs running the minimal code sample? Thank you

zambetpentru commented 2 years ago

Hi,

Sorry about that I didn't realize I could attach a zip file (considering you cannot attach a .dart file!). :-)

Please see below, I just copied that zip to a Mac and ran that folder from there and it rendered.

copy_videoplayeroverwritewidgets_88688.zip

TahaTesser commented 2 years ago

Hi @zambetpentru

Same result with your project zip, as the app launches, it downloads pdf file but loading indicate stays forever

preview ![image](https://user-images.githubusercontent.com/48603081/130581848-95b139b3-06bb-4dad-85c4-61903785783d.png)
[  +13 ms] Debug service listening on ws://127.0.0.1:55246/WWFJvsfVa44=/ws
[   +1 ms] 💪 Running with sound null safety 💪
[   +3 ms] 🔥  To hot restart changes while running, press "r" or "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[+1728 ms] in build
[ +507 ms] in build
[+1144 ms] Error: PlatformException(error, InvalidPDFException: The PDF file is empty, i.e. its size is zero bytes.,
null, null)
                        at Object.throw_ [as throw] (http://localhost:60325/dart_sdk.js:5041:11)
                        at StandardMethodCodec.decodeEnvelope
                        (http://localhost:60325/packages/flutter/src/services/system_channels.dart.lib.js:785:19)
                        at MethodChannel._invokeMethod
                        (http://localhost:60325/packages/flutter/src/services/system_channels.dart.lib.js:945:47)
                        at _invokeMethod.next (<anonymous>)
                        at http://localhost:60325/dart_sdk.js:37403:33
                        at _RootZone.runUnary (http://localhost:60325/dart_sdk.js:37274:59)
                        at _FutureListener.thenAwait.handleValue (http://localhost:60325/dart_sdk.js:32530:29)
                        at handleValueCallback (http://localhost:60325/dart_sdk.js:33057:49)
                        at Function._propagateToListeners (http://localhost:60325/dart_sdk.js:33095:17)
                        at _Future.new.[_completeWithValue] (http://localhost:60325/dart_sdk.js:32943:23)
                        at async._AsyncCallbackEntry.new.callback (http://localhost:60325/dart_sdk.js:32964:35)
                        at Object._microtaskLoop (http://localhost:60325/dart_sdk.js:37526:13)
                        at _startMicrotaskLoop (http://localhost:60325/dart_sdk.js:37532:13)
                        at http://localhost:60325/dart_sdk.js:33303:9
[+17360 ms] in build
[  +86 ms] in build
[  +25 ms] in build
[  +11 ms] in build
[  +11 ms] in build
[  +11 ms] in build
[  +12 ms] in build
[  +12 ms] in build
[  +24 ms] in build
[  +10 ms] in build
[  +11 ms] in build
[  +11 ms] in build
[  +15 ms] in build
[  +11 ms] in build
[   +9 ms] in build
[   +9 ms] in build
[  +11 ms] in build
[  +70 ms] in build
[   +8 ms] in build
[  +19 ms] in build

Please sample that is runnab;e and better if it is doesn't third-party packages

Can you please provide a complete reproducible minimal code sample without third-party paclages, and complete flutter run --verbose logs running the minimal code sample? Thank you

zambetpentru commented 2 years ago

That is bizarre, I just downloaded the zip (on Windows this time), extracted it and went into the folder and ran:

flutter run -d chrome

*I'm just now installing on a fresh linux machine as well to confirm as I really don't want to waste your time. **It doesn't download the pdf, it is included in the asset folder.

zambetpentru commented 2 years ago

I remember when I started out (I don't use them these days) and I was using assets I was having inconsistences:

I wonder if changing your pubspec.yaml to:

flutter:
  assets:
    - assets/churn.pdf

would help it?

zambetpentru commented 2 years ago

Hi @TahaTesser, I just downloaded the exact zip above onto a fresh Linux Mint and installed flutter from snap and then upgraded to the latest master and it seems to work.

image

zambetpentru commented 2 years ago

Hi @TahaTesser, I woke up and realised if you are having issues with the asset I'd just encode it within the dart file and remove the asset part altogether.

Just checked this on Windows and Mac

videoplayeroverwritewidgets_88688_base64.zip

TahaTesser commented 2 years ago

Hi @zambetpentru I can finally reproduce it using the project from https://github.com/flutter/flutter/issues/88688#issuecomment-905225666 Although the PDF page doesn't glitch for me like your screenshot there is a blank screen and Slider is glitchy at bottom

https://user-images.githubusercontent.com/48603081/130762137-33abf65a-9978-4c6a-9b95-3ca5ca405a6a.mov

https://user-images.githubusercontent.com/48603081/130762156-6a1be670-a6eb-42e7-be69-393f6a91bc19.mov

Can you please provide steps to reproduce glitchy pdf page like in your screenshot? also please put your minimal working sample in a test repository for the team to easily look into it and investigate the cause, rather than a zip file

I can confirm this doesn't happen on stable, 2.2.3

zambetpentru commented 2 years ago

Great!

1) When you scroll and get Slider with two blue circle then give the window more height and you can see there are actually two sliders on screen image

2) I think with your high-resolution window the video is too small and it's harder to replicate the double blue screenshot, so I increased the video size

https://user-images.githubusercontent.com/81489824/130785681-51f31d8a-6f99-4892-8304-5a9f604d6c2a.mp4

Also now it's all in a single text file attached here, if you still need a repo please let me know and I'll set one up. main.dart.txt

TahaTesser commented 2 years ago

Hi @zambetpentru Thanks, I can reproduce on a Linux desktop with 720p display https://github.com/flutter/flutter/issues/88688#issuecomment-905430860

BTW, your single file sample doesn't load when adding the latest dependencies Can you please try a new projecT? it is just a grey screen and is loading forever.

Please create a repo

zambetpentru commented 2 years ago

Hi @TahaTesser, deal and I'll do that from now on for such situations!

The repo is here: https://github.com/zambetpentru/flutter_88688_video_overwriting_widget and is the version that you tested in https://github.com/flutter/flutter/issues/88688#issuecomment-905225666

zambetpentru commented 2 years ago

Hi, I have another type of example that I think is related to the same regression based on testing multiple framework versions.

This is just a simple image and a video, resizing small and big again can produce this:

image

Repository: https://github.com/zambetpentru/flutter_89037_video_exit_fullscreen_black_image

TahaTesser commented 2 years ago

Hi @zambetpentru https://github.com/flutter/flutter/issues/88688#issuecomment-907143339 also reproduces on stable, which would contradict our earlier reproductions as they don't reproduce on the stable. Does this make sense? Maybe a it is the separate issue?

flutter doctor -v ```console [✓] Flutter (Channel dev, 2.6.0-0.0.pre, on Microsoft Windows [Version 10.0.22000.168], locale en-US) • Flutter version 2.6.0-0.0.pre at C:\Users\Taha\Code\flutter_stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 83b9e99cfb (7 days ago), 2021-08-23 19:03:21 +0200 • Engine revision d5adde01dd • Dart version 2.15.0 (build 2.15.0-42.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\Taha\Code\android-sdk • Platform android-31, build-tools 31.0.0 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\android-sdk • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.2) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.11.31624.102 • Windows 10 SDK version 10.0.19041.0 [✓] Android Studio (version 2020.3) • Android Studio at C:\Users\Taha\Code\android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [✓] VS Code (version 1.59.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [✓] Connected device (4 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.168] • Windows (UWP) (desktop) • winuwp • windows-uwp-x64 • • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 • No issues found! ```
zambetpentru commented 2 years ago

Greetings @TahaTesser,

That is very strange, I've never seen it in stable and I just tried my very best to break it there on Windows and Mac, here is Windows:

https://user-images.githubusercontent.com/81489824/131315617-b952a4ff-220e-4a95-83c9-1868d6215fa2.mp4

I don't see anything at all in the Console messages on 2.2.3

flutter doctor [√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.17763.2114], locale en-IE) • Flutter version 2.2.3 at C:\Code\flutter • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Omega\AppData\Local\Android\sdk • Platform android-30, build-tools 30.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) • All Android licenses accepted. [√] Chrome - develop for the web • CHROME_EXECUTABLE = C:\Code\FlutterTesting\ChromeCORS.bat [√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174) [√] VS Code (version 1.59.1) • VS Code at C:\Users\Omega\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [√] Connected device (2 available) • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.73 • No issues found!
ditman commented 2 years ago

I'm pretty sure @hterkelsen has worked on the webGL "object does not belong to this context" very recently. This is probably a dup/related to: https://github.com/flutter/flutter/issues/86809

Maybe fixed by this? https://github.com/flutter/engine/pull/28312

zambetpentru commented 2 years ago

@ditman Cheers, I just checked on the latest master that is a few days beyond that commit you mentioned and the issue is unfortunately still present.

TahaTesser commented 2 years ago

@zambetpentru

[✓] Flutter (Channel dev, 2.6.0-0.0.pre, on Microsoft Windows [Version 10.0.22000.168], locale en-US) • Flutter version 2.6.0-0.0.pre at C:\Users\Taha\Code\flutter_stable

I found why, my stable folder Code\flutter_stable was upgraded to dev, and I also posted the dev channel doctor v (forgot to switch back to the stable channel,

I can't reproduce on the stable channel, just beta and abo### Logs

stable beta
❗️

Check flutter doctor -v outputs for each channel below

flutter doctor -v ```console [✓] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.22000.168], locale en-US) • Flutter version 2.2.3 at C:\Users\Taha\Code\flutter_stable • Framework revision f4abaa0735 (9 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\Taha\Code\android-sdk • Platform android-31, build-tools 31.0.0 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\android-sdk • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.2) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.11.31624.102 • Windows 10 SDK version 10.0.19041.0 [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions). [✓] VS Code (version 1.59.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [✓] Connected device (4 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.168] • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 ! Doctor found issues in 1 category ``` ```console [✓] Flutter (Channel beta, 2.5.0-5.2.pre, on Microsoft Windows [Version 10.0.22000.168], locale en-US) • Flutter version 2.5.0-5.2.pre at C:\Users\Taha\Code\flutter_beta • Upstream repository https://github.com/flutter/flutter.git • Framework revision 19c61fed0d (12 days ago), 2021-08-18 17:10:31 -0700 • Engine revision 7a4c4505f6 • Dart version 2.14.0 (build 2.14.0-377.7.beta) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\Taha\Code\android-sdk • Platform android-31, build-tools 31.0.0 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\android-sdk • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.2) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.11.31624.102 • Windows 10 SDK version 10.0.19041.0 [✓] Android Studio (version 2020.3) • Android Studio at C:\Users\Taha\Code\android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) [✓] VS Code (version 1.59.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.25.0 [✓] Connected device (4 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.168] • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159 • Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.78 • No issues found! ```

✅: No Issue ❗️: Issue reproducedve

zambetpentru commented 2 years ago

Brilliant! Shouldn't the stable channel importantly be green with no issue in the little table above?

khari998 commented 2 years ago

There is another bug regarding this that I want to mention because this bug can also be observed in the stable branch. If there is a video that is rendered and a Drawer from an AppBar is open over top of the video, none of the widgets in the Drawer are clickable and instead the video underneath the Drawer may register the taps on itself instead.

I am trying to make my website in flutter web mobile friendly and on pages where they is any video loaded on the page, the Drawer no longer becomes functional when it is over the video. I believe it is because of how these type of widgets are considered on top of everything in the widget tree despite how they are written into our app. Hopefully this can be fixed soon.

khari998 commented 2 years ago

There is another bug regarding this that I want to mention because this bug can also be observed in the stable branch. If there is a video that is rendered and a Drawer from an AppBar is open over top of the video, none of the widgets in the Drawer are clickable and instead the video underneath the Drawer may register the taps on itself instead.

I am trying to make my website in flutter web mobile friendly and on pages where they is any video loaded on the page, the Drawer no longer becomes functional when it is over the video. I believe it is because of how these type of widgets are considered on top of everything in the widget tree despite how they are written into our app. Hopefully this can be fixed soon.

Funny enough, this bug goes away if I wrap these widgets in the Link widget. Which is probably related to usage of platform view-based plugins https://github.com/flutter/flutter/issues/86809#issuecomment-904998160

khari998 commented 2 years ago

Also I'm getting constant rebuilds with the Link widget. In the stable branch. This may be related to why the ghosting effect is happening with videos as well as it is a platform view-based plugin; The rebuilds can get into a loop and crash the widget it is attached to. It isn't really a problem until the widget is scrolled to, for example, a footer containing a Link widget. It also happens when resizing the screen. My console will just keep saying this while my app rebuilds and gets janky.

Flutter: restoring WebGL context.

ditman commented 2 years ago

There is another bug regarding this that I want to mention...

Please, @khari998, open new issues next time. I marked two of your comments as off-topic, as those particular comments don't have to do with this specific bug (but I think I have a quick answer for you so here goes):

If there is a video that is rendered and a Drawer from an AppBar is open over top of the video, none of the widgets in the Drawer are clickable and instead the video underneath the Drawer may register the taps on itself instead.

This is a current shortcoming of platform views in the web. That's why we built the package:pointer_interceptor, please see if it helps in your case!

Also I'm getting constant rebuilds with the Link widget. [...] The rebuilds can get into a loop and crash the widget it is attached to. [...] Flutter: restoring WebGL context.

Those are the types of things we need as many reproduction cases as possible. If you could file a new issue with a minimal main.dart that reproduces the issue, that'd be awesome. Otherwise, it's quite hard to reproduce exactly what you're seeing on your app.

In the stable branch.

That is correct, some bugs related to this issue are being currently fixed. If you have some time, could you give a shot to the master branch? Fixes for these issues are currently landing there, and you can verify if they work for you a few months before they find their way to stable.

khari998 commented 2 years ago

@ditman I opened my previous comments in another issue and it was marked as a duplicate of this issue https://github.com/flutter/flutter/issues/89497 Which is why I brought it up here. I was told it was the same issue.

I also added a code example in the issue I opened up. So I disagree with your assessment that it is off topic as the same behavior is replicated. Unless you would rather repoen the original issue I created.

I can test on the master branch if the fixes made a difference.

ditman commented 2 years ago

@khari998 ah gotcha, the ones I marked as off-topic were the ones that had to do with stuff on top of the video player (check package:pointer_interceptor!).

The bug you mention in #89497 is indeed a bug (very possibly a duplicate of this one), and still broken in the latest master. I took a look, and this is what I saw:

Screen Shot 2021-09-08 at 5 51 07 PM
khari998 commented 2 years ago

The bug you mention in #89497 is indeed a bug (very possibly a duplicate of this one), and still broken in the latest master. I took a look, and this is what I saw:

Screen Shot 2021-09-08 at 5 51 07 PM

Yes this is the behavior I was experiencing on the master branch. I tried testing it on stable to see if I could reproduce Flutter: restoring WebGL context. but was not able to. I will try and figure out if I can generate that error again on stable. I had a combination of videos and images on my webpage so later I will try and isolate the cause of this bug.

ditman commented 2 years ago

I will try and figure out if I can generate that error again on stable.

@khari998 don't bother, thanks!! If the error reproduces in master it'll get fixed there, and the fix will eventually get released to stable as it flows through the release process (master -> dev -> beta -> stable).

zambetpentru commented 2 years ago

Fixed as part of https://github.com/flutter/flutter/issues/86809 - delighted, thank you! :-)

ditman commented 2 years ago

@khari998 I verified the latest changes to master fix the issues you describe on your app, please give it another shot with flutter channel master!

dit@dit:~/github/repro-cases/issue_89497$ flutter --version
Flutter 2.6.0-6.0.pre.76 • channel master • git@github.com:ditman/flutter.git
Framework • revision fad5e4cf89 (22 minutes ago) • 2021-09-13 13:37:07 -0700
Engine • revision abb1980f65
Tools • Dart 2.15.0 (build 2.15.0-96.0.dev)
github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.