Skip to content

[Web] another regression in 3.41 when using viewFactories #182940

Closed as not planned

Description

@holzgeist

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:

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!

Activity

  1. holzgeist commented on Feb 26, 2026

    @holzgeist
    ContributorAuthor

    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

  2. ReinisSprogis commented on Feb 26, 2026

    @ReinisSprogis

    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.

  3. puneetkukreja98 commented on Mar 2, 2026

    @puneetkukreja98
    Contributor

    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
  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    and removed
    in triagePresently being triaged by the triage team
    on Mar 2, 2026
  5. holzgeist commented on Mar 2, 2026

    @holzgeist
    ContributorAuthor

    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

  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 2, 2026
  7. puneetkukreja98 commented on Mar 3, 2026

    @puneetkukreja98
    Contributor

    @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.

  8. holzgeist commented on Mar 3, 2026

    @holzgeist
    ContributorAuthor

    Ok, I'll reopen once I find something 👍

  9. holzgeist commented on Mar 4, 2026

    @holzgeist
    ContributorAuthor

    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?

  10. github-actions commented on Mar 18, 2026

    @github-actions

    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.

  11. locked as resolved and limited conversation to collaborators on Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions