Skip to content

[webview_flutter_wkwebview] Updates plugin for iOS 26 - #11415

Merged
auto-submit[bot] merged 7 commits into
flutter:mainfrom
bparrishMines:wkwebview_frame
Apr 9, 2026
Merged

[webview_flutter_wkwebview] Updates plugin for iOS 26#11415
auto-submit[bot] merged 7 commits into
flutter:mainfrom
bparrishMines:wkwebview_frame

Conversation

@bparrishMines

@bparrishMinesbparrishMines commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
  1. Prevents test WKFrameInfo from deallocating during tests to prevent crash
  2. Retrieves failing url from DNS failures from NSURLErrorFailingURLErrorKey.

Fixesflutter/flutter#182846

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@bparrishMinesbparrishMines changed the title Wkwebview frame[webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crashApr 1, 2026
@bparrishMinesbparrishMines added the CICD Run CI/CD label Apr 1, 2026
@bparrishMines
bparrishMines marked this pull request as ready for review April 1, 2026 21:07

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

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 refactors unit tests in the WKWebView package to use static instances of TestFrameInfo and TestFrameInfoWithNilRequest to prevent crashes during deallocation on newer iOS versions. The review feedback identifies a recurring typo in the code comments where 'iOS 26+' is cited instead of the correct iOS version.

@bparrishMines

Copy link
Copy Markdown
ContributorAuthor

@okorohelijah@vashworth I believe this fixes flutter/flutter#182846, so feel free to try or use this when upgrading CI to iOS 26. The tests pass when I run it locally on iOS 26 with Xcode 26.4 with this change.

@stuartmorgan-gstuartmorgan-g added the triage-ios Should be looked at in iOS triage label Apr 7, 2026
@okorohelijah

okorohelijah commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@bparrishMines Thanks for taking a look! I was able to test these changes on CI PR #10635 and can confirm they resolve the crash.

However a separate integration test failure appeared in NavigationDelegate onWebResourceError. It looks like on iOS 26+, NSError.userInfo no longer includes the NSURLErrorFailingURLStringKey for DNS failures, causing error.url to be null and failing the current assertion:
expect(error.url?.startsWith('https://www.notawebsite..com'), isTrue)

Since the fix is just a small adjustment (checking the URL only if it's non-null), I thought it might be worth including here

Would you be open to including that fix in this PR, or would you prefer I keep it separate? wdyt?

Build: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_5%20master/28011/overview

log: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8685256132893502657/+/u/Run_package_tests/drive_examples/stdout?format=raw

@bparrishMinesbparrishMines added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 9, 2026
@bparrishMinesbparrishMines changed the title [webview_flutter_wkwebview] Prevents test WKFrameInfo from deallocating during tests to prevent crash[webview_flutter_wkwebview] Updates plugin for iOS 26Apr 9, 2026
@bparrishMines

bparrishMines commented Apr 9, 2026

Copy link
Copy Markdown
ContributorAuthor

However a separate integration test failure appeared in NavigationDelegate onWebResourceError. It looks like on iOS 26+, NSError.userInfo no longer includes the NSURLErrorFailingURLStringKey for DNS failures, causing error.url to be null and failing the current assertion:
expect(error.url?.startsWith('https://www.notawebsite..com'), isTrue)

@okorohelijah I was able to reproduce the integration test failure locally, so I did some investigation and found the failing url is now in a new key for iOS 26. So I just updated the PR to handle using the new key if the old one doesn't work.

@github-actionsgithub-actionsBot removed the CICD Run CI/CD label Apr 9, 2026

@okorohelijahokorohelijah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM✅

@okorohelijahokorohelijah added the CICD Run CI/CD label Apr 9, 2026
@vashworthvashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 9, 2026
@auto-submit
auto-submitBot merged commit 62949f4 into flutter:mainApr 9, 2026
82 checks passed
@bparrishMines
bparrishMines deleted the wkwebview_frame branch April 9, 2026 18:19
github-merge-queueBot pushed a commit to flutter/flutter that referenced this pull request Apr 10, 2026
flutter/packages@1aa892c...c2e3d1f
2026-04-10 okorohelijah@google.com [google_maps_flutter_ios] Exclude
from Xcode analysis until upstream warning is fixed
(flutter/packages#11480)
2026-04-09 engine-flutter-autoroll@skia.org Roll Flutter from
05e0ae0 to 81c87ea (27 revisions) (flutter/packages#11477)
2026-04-09 me@davidmiguel.com [go_router] Fix chained top-level
redirects not being fully resolved (flutter/packages#11108)
2026-04-09 stuartmorgan@google.com [google_maps_flutter] Remove .static
from Package.swift (flutter/packages#11392)
2026-04-09 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_wkwebview] Updates plugin for iOS 26
(flutter/packages#11415)
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
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
…r#184886)
flutter/packages@1aa892c...c2e3d1f
2026-04-10 okorohelijah@google.com [google_maps_flutter_ios] Exclude
from Xcode analysis until upstream warning is fixed
(flutter/packages#11480)
2026-04-09 engine-flutter-autoroll@skia.org Roll Flutter from
05e0ae0 to 81c87ea (27 revisions) (flutter/packages#11477)
2026-04-09 me@davidmiguel.com [go_router] Fix chained top-level
redirects not being fully resolved (flutter/packages#11108)
2026-04-09 stuartmorgan@google.com [google_maps_flutter] Remove .static
from Package.swift (flutter/packages#11392)
2026-04-09 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_wkwebview] Updates plugin for iOS 26
(flutter/packages#11415)
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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
1. Prevents test `WKFrameInfo` from deallocating during tests to prevent crash
2. Retrieves failing url from DNS failures from `NSURLErrorFailingURLErrorKey`.
Fixesflutter/flutter#182846
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppCICDRun CI/CDp: webview_flutterplatform-iosplatform-macostriage-iosShould be looked at in iOS triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[webview_flutter_wkwebview] native tests crashing/restarting on ios 26

4 participants

@bparrishMines@okorohelijah@stuartmorgan-g@vashworth