Skip to content

Revert "[webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in applicationWillTerminate"#11564

Merged
auto-submit[bot] merged 2 commits intomainfrom
revert-11484-wkwebview_terminate
Apr 22, 2026
Merged

Revert "[webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in applicationWillTerminate"#11564
auto-submit[bot] merged 2 commits intomainfrom
revert-11484-wkwebview_terminate

Conversation

@bparrishMines
Copy link
Copy Markdown
Contributor

@bparrishMines bparrishMines commented Apr 22, 2026

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reverts the changes from version 3.24.4, downgrading the package to 3.24.3. The changes include removing application and scene lifecycle delegates, deleting unit tests, and reverting Xcode project settings. Review feedback identifies a potential orphaned file (PlatformViewImplTests.swift) and recommends using optional chaining instead of force unwrapping for proxyApiRegistrar to avoid runtime crashes.

8F1488FF2D2DE27000191744 /* NavigationActionProxyAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F1488CB2D2DE27000191744 /* NavigationActionProxyAPITests.swift */; };
8F1489012D2DE91C00191744 /* AuthenticationChallengeResponseProxyAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F1489002D2DE91C00191744 /* AuthenticationChallengeResponseProxyAPITests.swift */; };
8F63D06B2F8812E400EC5076 /* WebViewFlutterPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F63D06A2F8812E400EC5076 /* WebViewFlutterPluginTests.swift */; };
8F63D06C2F8812E400EC5076 /* PlatformViewImplTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F63D0692F8812E400EC5076 /* PlatformViewImplTests.swift */; };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The reference to PlatformViewImplTests.swift is being removed from the Xcode project, but the file itself is not included in the deletion list of this pull request. This will result in an orphaned file in the repository. Please ensure that all files associated with the reverted change are physically deleted.

Comment on lines +36 to +37
proxyApiRegistrar!.ignoreCallsToDart = true
proxyApiRegistrar!.tearDown()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of force unwrapping (!) on proxyApiRegistrar is unsafe. If detachFromEngine is called when proxyApiRegistrar is already nil, the application will crash. It is safer to use optional chaining (?), which was the pattern used in the code being reverted.

Suggested change
proxyApiRegistrar!.ignoreCallsToDart = true
proxyApiRegistrar!.tearDown()
proxyApiRegistrar?.ignoreCallsToDart = true
proxyApiRegistrar?.tearDown()

@bparrishMines
Copy link
Copy Markdown
Contributor Author

@stuartmorgan-g I was confused by flutter/flutter#185407 (comment). Should this PR publish a new version of 3.24.5 and then reland it as 3.24.6 with the SDK bump?

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Should this PR publish a new version of 3.24.5 and then reland it as 3.24.6 with the SDK bump?

Yes, that's the cleanest way to give people who were broken by 3.24.4 a path to being fixed, since then they don't need to downgrade, just upgrade.

@bparrishMines bparrishMines added the CICD Run CI/CD label Apr 22, 2026
Copy link
Copy Markdown
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 22, 2026
@auto-submit auto-submit Bot merged commit 6351fa4 into main Apr 22, 2026
83 checks passed
@auto-submit auto-submit Bot deleted the revert-11484-wkwebview_terminate branch April 22, 2026 18:29
kjlubick pushed a commit to kjlubick/flutter that referenced this pull request Apr 24, 2026
…r#185536)

flutter/packages@4a2091d...8400f71

2026-04-23 14008334+moepanda@users.noreply.github.com [Animations] Add
support for custom shadows to OpenContainer (flutter#62475)
(flutter/packages#11401)
2026-04-23 engine-flutter-autoroll@skia.org Roll Flutter from
3d0e822 to 5e4f169 (24 revisions) (flutter/packages#11565)
2026-04-22 10687576+bparrishMines@users.noreply.github.com Revert
"[webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in
`applicationWillTerminate`" (flutter/packages#11564)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: webview_flutter platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The version 3.24.4 is breaking on webview_flutter

2 participants