Repository navigation
Closed as not planned
Labels
r: invalidIssue is closed as not validIssue is closed as not valid
Description
Steps to reproduce
Hi @mdebbar ,
I found another bug related to #180610
However, this time I cannot reproduce it outside our (closed source) app yet. I'll do my best to find something, but I already report it now, just in case it rings a bell and I can skip the repro 😄
Here's the scenario:
- I run a flutter app inside a custom HTML element, same as [Web] regression in 3.41 when using viewFactories #182292. It shows a video stream using https://github.com/flutter-webrtc/flutter-webrtc
- once I enter Document PiP (see [Web/Embedded Mode] Support Document Picture-in-Picture API #181953), rendering completely stops. Not like in the feature request, where the problem only occurs when the main tab/window is in the background. For this bug, I just see an empty window.
The app itself seems to be functional, as I can click the areas where the buttons usually are, and the app reacts accordingly.
But even when closing the pip window and moving the app back to the main window doesn't resume rendering.
It's 100% reproducible and bisecting again points to #180610
Do you have any pointers on how to debug the web rendering engine?
Expected results
properly visible flutter app
Actual results
empty window
Code sample
TBD
Screenshots or Video
TBD
Logs
Console doesn't show anything different
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.41.2, on Arch Linux 6.18.9-arch1-2, locale en_US.UTF-8) [43ms]
• Flutter version 3.41.2 on channel stable at /home/tobias/src/3rdparty/flutter
• Upstream repository https://github.com/flutter/flutter
• Framework revision 90673a4eef (8 days ago), 2026-02-18 13:54:59 -0800
• Engine revision 6c0baaebf7
• Dart version 3.11.0
• DevTools version 2.54.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets,
omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3.3s]
• Android SDK at /home/tobias/Android/Sdk
• Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• ANDROID_HOME = /home/tobias/Android/Sdk
• Java binary at: /opt/android-studio/jbr/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.9+-14649483-b1163.86)
• All Android licenses accepted.
[✓] Chrome - develop for the web [8ms]
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop [274ms]
• clang version 21.1.8
• cmake version 4.2.3
• ninja version 1.13.2
• pkg-config version 2.5.1
• OpenGL core renderer: AMD Radeon 740M Graphics (radeonsi, phoenix, LLVM 21.1.6, DRM 3.64, 6.18.9-arch1-2)
• OpenGL core version: 4.6 (Core Profile) Mesa 25.3.5-arch1.1
• OpenGL core shading language version: 4.60
• OpenGL ES renderer: AMD Radeon 740M Graphics (radeonsi, phoenix, LLVM 21.1.6, DRM 3.64, 6.18.9-arch1-2)
• OpenGL ES version: OpenGL ES 3.2 Mesa 25.3.5-arch1.1
• OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
• GL_EXT_framebuffer_blit: yes
• GL_EXT_texture_format_BGRA8888: yes
[✓] Connected device (2 available) [80ms]
• Linux (desktop) • linux • linux-x64 • Arch Linux 6.18.9-arch1-2
• Chrome (web) • chrome • web-javascript • Chromium 145.0.7632.116 Arch Linux
[✓] Network resources [1,465ms]
• All expected network resources are available.
• No issues found!Metadata
Metadata
Assignees
Labels
r: invalidIssue is closed as not validIssue is closed as not valid
Activity
holzgeist commentedon Feb 26, 2026
I poked the bear (i.e. the engine) and found out that everything works fine if I force the renderer to use OnScreenCanvases/MultiSurfaceRaster (via
FLUTTER_WEB_CANVASKIT_FORCE_MULTI_SURFACE_RASTERIZER).I'll try to dig deeper in a few days
ReinisSprogis commentedon Feb 26, 2026
I also had recently problems with video playback on flutter web. I had custom camera in app that allowed user to record video and upload. But then one day I got report that user get blank screen when should be camera. I could not resolve it and migrated to system camera. Then I had problems with playback on safari as well, eventually I got it working with custom video HTML video player. The video was there, I could click on empty area, and I heard video playing, but no visual.
puneetkukreja98 commentedon Mar 2, 2026
Hello @holzgeist can you confirm if the way I am reproducing this is correct? I am attaching a video. If I am wrong, could you please provide a video sample/complete steps to reproduce?
Video:
flutter-pip-issue.mov
holzgeist commentedon Mar 2, 2026
Hi @puneetkukreja98
thanks for tackling/triaging this!
No, the issue does not happen with "plain" Picture-in-Picture, but with Document Picture-in-Picture (https://developer.mozilla.org/en-US/docs/Web/API/DocumentPictureInPicture). It's an extension of the Picture-in-Picture API that allows to show arbitrary HTML in an overlay window instead of just the video.
Unfortunately I wasn't able to reproduce it using public code yet, I'll try to find something
puneetkukreja98 commentedon Mar 3, 2026
@holzgeist
I’ll be closing this issue for now due to the lack of a reproducible example.
Could you please reopen it once you’re able to reproduce the issue on your side and share the necessary details? That will help us investigate it further.
holzgeist commentedon Mar 3, 2026
Ok, I'll reopen once I find something 👍
holzgeist commentedon Mar 4, 2026
ok, now I know this is not exactly a reproducible example, but it's huge progress.
I could find the underlying cause and a workaround for the problem. So here's what's happening
Upon moving the flutter host element from the main window to the pip window, this element receives a spurious resize event from the browser, stating that the element is now huge (e.g. width 2048, height 44244), sometimes height can be up to 60000 pixels. Width is typically set correctly. Immediately afterwards, another resize event corrects this and sets it to the actual pip window size (e.g. 400x500).
However, it looks like the flutter render engine has crashed by then. Unfortunately without any logs (any hints on how to get render crash logs?)
Limiting the size of the custom element, like here fixes the issue
@puneetkukreja98 I don't have permission to reopen the issue, but is this enough to continue triaging this?
github-actions commentedon Mar 18, 2026
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 -vand a minimal reproduction of the issue.