-
Notifications
You must be signed in to change notification settings - Fork 27.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
[Android] App crashes after upgrading to 2.10.x using webview + video_player plugin #98155
Comments
This could be related #97904 but plugins are not the same. Probably something about platform views? PS mentioned issue is using example with 3th party library and this issue is using 1th party library and there is same crash Also this issue #97283 could be related but as you can see I am not using whats mentioned inside #97283 (comment) |
I have video_player plugin:2.2.16 I get similar crash when i move to next screen to pause and come back to resume playing. logs
|
Hi @d3xt3r2909, Thanks for filing the issue. I was able to reproduce the crash with the latest plugins on stable and the master channel. video_player: ^2.2.18
webview_flutter: ^3.0.0 steps to reproduce
Screen.Recording.2022-02-10.at.2.35.43.PM.mov
complete logs can be found here logs.zip flutter doctor -v
I tried using the old version of Webview where the crash doesn't happen.
|
i have this crash when using google_maps_flutter + webview |
Hi, @maheshmnj thanks for the quick response. I would like just to mention that this is blocker (crasher) for upgrading the flutter version in our team. Scenario:
Follow up: Same is happening with 3th party library youtube_player_iframe which is using different webview plugin - flutter_inappwebview. There is already opened issue in their repository which is very similar to this one and it also started to happen after upgrading to Flutter 2.10.x. So I'm pretty sure that's connected more with upgrading the Flutter framework than webview plugin itself. (Just my observation) |
In case this is a blocker for anyone you may try downgrading the webview plugin to |
Ok, seems that issue is resolved based on your hint @maheshmnj So
And based on this #97283 (comment) you cannot have
Solution So, based on this, if you are using webview plugin, you should enable virtual displays and disable hybrid composition, as That means that actually by adding this part of code if (Platform.isAndroid) {
WebView.platform = AndroidWebView();
} into the body of Concern
Other plugins
|
@d3xt3r2909 your solution works with gmaps, thanks. |
/cc @blasten |
This will be fixed by flutter/engine#31390. I think we should cherry pick the fix into Flutter 2.10. |
In my case I have two pages one with the video player, other with a native ad. |
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 |
Seems like whenever there is another PlatformView active (tested with WebView plugin) and that view is disposed app is crashing.
Steps to reproduce:
webview
andvideoplayer
widgetwebview
is not visible anymoreTested on physical devices: Samsung S9 (Android 11), Pixel 3 (Android 12)
On iOS devices crash is not happening.
Screen recording:
Screen_Recording_20220209-230842_One.UI.Home.mp4
Min code to reproduce
Crash log
Flutter doctor
Please let me know if you need more details. This was not happening while running flutter
2.8.x
(didn't test with beta2.9.x
)The text was updated successfully, but these errors were encountered: