Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@mdnht
Copy link

@mdnht mdnht commented Apr 25, 2024

…narios (flutter#50947)

Consider this scenario: In an add-to-app context, where multiple Flutter activities share the same engine, a situation occurs. When navigating from FlutterActivity1 to FlutterActivity2, the Flutter view associated with FlutterActivity1 is detached from the engine. Then, the Flutter view of FlutterActivity2 is attached. Upon navigating back to FlutterActivity1, its Flutter view is re-attached to the shared engine.

The expected behavior is: When a Flutter view detaches from the shared engine, the associated surface should be released. When the Flutter view re-attaches, a new surface should be created.

After flutter#47358, no new surface is created when the Flutter view is attached again. This results in the Flutter view having no underlying surface, which causes the page to appear blank or freeze without responding.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@google-cla
Copy link

google-cla bot commented Apr 25, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mdnht
Copy link
Author

mdnht commented May 1, 2024

I have fixed CI check failure.
It was because of importing io.flutter.Build.API_LEVELS that is not yet implemented in flutter 3.19.
#52387.

Could you give a review now? @johnmccutchan @reidbaker

@reidbaker
Copy link
Contributor

It might be too late to CP into 3.19. I am double checking with the release manager now.
Also this will need a CP bug. https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process

@reidbaker reidbaker requested a review from itsjustkevin May 2, 2024 18:57
@mdnht
Copy link
Author

mdnht commented May 8, 2024

@reidbaker @itsjustkevin
If it's too late for 3.19, do I need to wait next release for this bug to be fixed? (3.20?)

We have a product using add2App app using shared engine for both android and ios, and because of Apple Privacy Manifest requirement Flutter needs to be 3.19 and above.
But when we upgrade Flutter to 3.19, android users will face this issue.
As Apple's requirement is already effective, we would like to resolve this issue as soon as possible.

@reidbaker
Copy link
Contributor

reidbaker commented May 8, 2024

I talked to the release manager and it is too late to accepts 3.19 cherry picks but I do appreciate you trying to land this.
Your options are to build your app with the beta branch of flutter (available now), or a custom engine that contains this cherry pick or to wait for the 3.22 release which is the next stable and is scheduled to be released next week.

@reidbaker reidbaker closed this May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants