-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Samsung phones running Android 14 stops drawing platform views on resume #139039
Comments
Hi @lmk378 Also, which webview_flutter plugin version are you using? Please also share the output of |
I have the same issue on my Samsung Galaxy S22 Ultra when using flutter_inappwebview. The issue appears after switching to different applications then back to my app and the webview is blank but my app bar is still there and I'm able to interact with it but the webview doesn't reload. So far tested on another vivo phone and I'm unable to reproduce with it. |
Hello the same problem for me on S23 Ultra/Android 14. |
Looks like this only occurs on Samsung device with Android 14. @jbourny Could you please share the current |
Hi @huycozy . |
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.22621.2715], locale ko-KR) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.3.6) [√] Android Studio (version 2021.3) [√] Android Studio (version 2022.1) [√] Android Studio (version 2022.3) [√] IntelliJ IDEA Ultimate Edition (version 2022.1) [√] VS Code (version 1.84.2) [√] Connected device (5 available) [√] Network resources • No issues found! |
@lmk378 Sorry, I didn't make it clear. What I mean is whether the original issue (webview is white) occurred due to Looks like this is a device-specific issue on Samsung with Android 14. Labeling the issue for other's input. |
Adding |
potentially a platform view issue. @johnmccutchan to take a look or reprioritize. |
Hello, actually I was using inappwebview I forgot but I tried the sample code with webview and its the same problem. `[✓] Flutter (Channel stable, 3.16.1, on macOS 14.2 23C5030f darwin-arm64, locale fr-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] VS Code (version 1.85.0-insider) [✓] Connected device (3 available) [✓] Network resources This is the debug output when I run the app : And when I minimize the App :
When I resume it (the webview is still visible) :
And when I minimize it, I open an other app (not using web renderer, for example the settings app) and the I come back to the example app :
Here I see behind the webview (white background).
I dont know if it can help but when we minimize and we resume the App we can see the webview flashing fastly (but not in this example). Here is a video capture : https://drive.google.com/file/d/1j3XQPkx1IlLIPfX_DQ0qKxigK7LPJbzt/view?usp=drive_link Thank you |
@jbourny HI. |
I'm facing the same issue on both Android and iOS devices. |
I think it's very likely that this is the same issue as #139630. |
@johnmccutchan thanks for sharing this info. do you have a link to track their progress/update? |
Unfortunately, this seems to be a somewhat different issue compared to #139630, although rotating the phone (which causes a relayout/surface creation) does get things rendering again. |
flutter/engine#50734 seems to make this issue goes away, but introduces some other regressions around first frame on resume. |
#50792) - Close all ImageReaders and Images when we get an onTrimMemory callback. - Remove the first frame fix based around caching the last image displayed because it isn't safe to do on some platforms. Leave a TODO to revisit this. We have seen some reports of platform views not working after an application is backgrounded and then resumed. According to Android GPU folks ImageReader/Image/HardwareBuffers should be valid after an application has been resumed. However on Samsung we know that isn't the case and there are (unconfirmed) reports of it also impacting Pixel devices. Should fix flutter/flutter#142978 and flutter/flutter#139039 Also fixes flutter/flutter#143720
Any updates on this issue? When will the fixes be released? As more and more users upgraded Android to Android 14 we got many complaints about the issue. |
We are waiting on Samsung to respond. |
Thanks for the quick reply. I can see a fix has been merged, does that fixes the issue? Or is there a workaround we can try to temporarily solve the issue? |
The merged fix will be reverted because it broke other things that can't be worked around. Samsung broke the Android API contract and we can't do anything but wait for them to fix it. |
@YuxuanDu eventually we replaced this package with InAppWebview as we couldn't find any quick workarounds in time. But even so I hope that Samsung fixes this issue soon for everyone.. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Is there a way to track this bug with Samsung? I remember reading that the target was end of march but I can't get a hand on it. I guess they are also using a tracker to communicate with developers but I am unable to find a link to it. @johnmccutchan pls if you have it share it. or if you have a more concrete update on their progress do share it. or deny receiving any update if you haven't heard back from them. |
I suggest you reach out to Samsung and file bugs via their official bug reporting mechanism. The Flutter project has no control over when Samsung releases a firmware with the bug fixes. |
I take it because "Samsung broke the Android API contract and we can't do anything but wait for them to fix it." that while you have no control over the timeline of the fix, this assures us that Samsung will indeed fix the problem? Or is this incorrect. |
My understanding is that Samsung is(has) fixing(fixed) the issue. Asking the Flutter team questions about Samsung-internal processes is not productive though. Please take this issue up with Samsung directly. I'm going to lock this issue now because the spammy questions are not productive. |
We now believe that this is a bug in some releases of Android 14 (and all releases of Android 15 betas). Closing this issue, updates will be here: #146499 |
Is there an existing issue for this?
Steps to reproduce
Run and change to other app, and back again.
Expected results
WebViewWidget show same contents as before backgrounded.
Actual results
Show white screen. no error.
Code sample
Minimum code.
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[Paste your output here]
The text was updated successfully, but these errors were encountered: