Skip to content

Conversation

stuartmorgan-g
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g commented Jun 9, 2025

Rolls the Flutter master pin to 8b22f67c85114def3f090286c386627efdf59614

flutter/flutter@d8baa77...8b22f67

Makes the following changes:

  • Updates the Pigeon example app's iOS channel registration for the breaking change caused by UISceneDelegate automigration in the flutter tool
  • Updates the video_player_avfoundation XCTests to use mock registrars instead of real registrars created by the real registry. This was tech debt, since unit tests shouldn't be coupled to real app state, and it broke because of the registry no longer being available when the unit tests run (due to the same migration).
  • Updates video_player_avfoundation to take a view provider, so that tests can inject a fake provider, decoupling unit test behavior from the actual app's root view controller, fixing a potential race after the UISceneDelegate migration.
  • Skips quick_actions_ios XCUITests until the plugin can be fixed. Tracked in [iOS] Quick Actions Not Triggered When App is in Background flutter#169928

Rolls the Flutter master pin to 8b22f67c85114def3f090286c386627efdf59614

flutter/flutter@d8baa77...8b22f67
@stuartmorgan-g
Copy link
Collaborator Author

This is a subset of #9402 to narrow down the range where the various failures there started.

@stuartmorgan-g
Copy link
Collaborator Author

It looks like this narrow range has the iOS quick actions failure, as expected, and also a Pigeon integration test failure that's also in the larger-range roll PR:

00:21 +0 -1: loading /Volumes/Work/s/w/ir/x/w/packages/packages/pigeon/example/app/integration_test/example_app_test.dart [E]                                                                          
  Failed to load "/Volumes/Work/s/w/ir/x/w/packages/packages/pigeon/example/app/integration_test/example_app_test.dart": WebSocketChannelException: SocketException: Connection refused (OS Error: Connection refused, errno = 61), address = 127.0.0.1, port = 55185

I'm not sure what would be causing that.

@stuartmorgan-g
Copy link
Collaborator Author

stuartmorgan-g commented Jun 9, 2025

From local testing, flutter/flutter#169365 broke the Pigeon example, although the error message is slightly different if I check out that hash (maybe the follow-up to do a runtime warning changed the behavior slightly). That suggests that the automigration is not always safe. /cc @gaaclarke

@stuartmorgan-g
Copy link
Collaborator Author

Oh, I see. The example is doing

let controller = window?.rootViewController as! FlutterViewController

so it's crashing. This is flagged by the runtime warning if I flutter run.

@stuartmorgan-g
Copy link
Collaborator Author

This is going to be a problem. Fixing this within the context of our CI, which runs against both stable and master, is non-trivial, because the symbols I need (FlutterPluginRegistrant and friends) don't existing on stable. I'm trying to figure out if there's a solution that doesn't involve re-adding the pre-compilation file rewriting system we had briefly several years ago (IIRC) for a somewhat similar situation on the Android side.

@gaaclarke
Copy link
Member

Fixing this within the context of our CI, which runs against both stable and master

You can mimic the behavior of the FlutterPluginRegistrant for now by subclassing the view controller and putting your setup code in the awakeFromNib method.

@stuartmorgan-g
Copy link
Collaborator Author

Thanks, I was trying to figure out what the least disruptive way to get a call at the right time was. A custom view controller makes sense!

@stuartmorgan-g
Copy link
Collaborator Author

Now investigating the video_player_avfoundation failures, which I can repro locally.

@stuartmorgan-g
Copy link
Collaborator Author

// TODO(stuartmorgan): Convert to using mock registrars instead.
NSObject<FlutterPluginRegistry> *GetPluginRegistry(void) {
#if TARGET_OS_IOS
  return (NSObject<FlutterPluginRegistry> *)[[UIApplication sharedApplication] delegate];
#else
  return (FlutterViewController *)NSApplication.sharedApplication.windows[0].contentViewController;
#endif
}

🤦🏻

@stuartmorgan-g
Copy link
Collaborator Author

@bparrishMines I believe this will be landable now (modulo flake) as another incremental to continue working toward getting the roller caught up and healthy again.

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2025
Copy link
Contributor

auto-submit bot commented Jun 9, 2025

autosubmit label was removed for flutter/packages/9407, because - The status or check suite Linux_web web_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@stuartmorgan-g stuartmorgan-g added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Jun 9, 2025
@stuartmorgan-g
Copy link
Collaborator Author

Overrides: the changes to the example app aren't relevant to clients.

@stuartmorgan-g stuartmorgan-g force-pushed the manual-roll-8b22f67c8511 branch from fbd3bc2 to 60ce03a Compare June 9, 2025 22:23
@stuartmorgan-g
Copy link
Collaborator Author

(Force pushed due to flutter/flutter#170300)

@stuartmorgan-g
Copy link
Collaborator Author

stuartmorgan-g commented Jun 9, 2025

This testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSomeVideoStream failure may be real? It's at least a frequent flake since it showed up in the last run too. It didn't repro locally for me though.

Test Case '-[VideoPlayerTests testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSomeVideoStream]' started.
2025-06-09 15:55:24.753451-0700 video_player_avfoundation_example[53023:1014858] [aqme]        LoudnessManager.mm:413   PlatformUtilities::CopyHardwareModelFullName() returns unknown value: Macmini9,1, defaulting hw platform key
/Volumes/Work/s/w/ir/x/w/packages/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m:216: error: -[VideoPlayerTests testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSomeVideoStream] : ((player.playerLayer.superlayer) != nil) failed - AVPlayerLayer should be added on screen.
Test Case '-[VideoPlayerTests testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSomeVideoStream]' failed (0.061 seconds).

@stuartmorgan-g
Copy link
Collaborator Author

Maybe a race condition. We are getting what should end up being the superlayer via UIApplication.sharedApplication.keyWindow.rootViewController, and with the delegate migration maybe that's not reliably available when the test runs.

@stuartmorgan-g
Copy link
Collaborator Author

video_player_avfoundation should get a re-review; I changed the production code to allow an injectable view provider rather than iOS hard-coding getting it from the app's root view controller.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2025
@auto-submit auto-submit bot merged commit e8dcbd9 into flutter:main Jun 10, 2025
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 10, 2025
@stuartmorgan-g stuartmorgan-g deleted the manual-roll-8b22f67c8511 branch June 10, 2025 17:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 10, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 11, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 11, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jun 11, 2025
flutter/packages@974f152...0b322a2

2025-06-11 [email protected] Roll Flutter master to 2d9977c
(flutter/packages#9402)
2025-06-11 [email protected] [google_maps_flutter] Fix iOS
analysis for newer Xcode (flutter/packages#9415)
2025-06-10 [email protected] [in_app_purchase] Return
jwsRepresentation and jsonRepresentation for StoreKit2
(flutter/packages#9280)
2025-06-10 [email protected] Roll Flutter master to 7e30df2
(flutter/packages#9413)
2025-06-10 [email protected] [vector_graphics]Add
Null Check for Image Retrieval in listener.dart's onDrawImage Function
(flutter/packages#9211)
2025-06-10 [email protected] Roll Flutter master to 8b22f67
(flutter/packages#9407)
2025-06-06 [email protected] Roll Flutter master to d8baa77
(flutter/packages#9379)
2025-06-06 [email protected] Fix the `zIndex`-related issue in the
`copyWith` method. (flutter/packages#9396)
2025-06-06 [email protected] [multi] Remove @tool from docs that
does not work (flutter/packages#9394)

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 [email protected] 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
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
Rolls the Flutter master pin to 8b22f67c85114def3f090286c386627efdf59614

flutter/flutter@d8baa77...8b22f67

Makes the following changes:
- Updates the Pigeon example app's iOS channel registration for the breaking change caused by UISceneDelegate automigration in the `flutter` tool
- Updates the video_player_avfoundation XCTests to use mock registrars instead of real registrars created by the real registry. This was tech debt, since unit tests shouldn't be coupled to real app state, and it broke because of the registry no longer being available when the unit tests run (due to the same migration).
- Updates video_player_avfoundation to take a view provider, so that tests can inject a fake provider, decoupling unit test behavior from the actual app's root view controller, fixing a potential race after the UISceneDelegate migration.
- Skips quick_actions_ios XCUITests until the plugin can be fixed. Tracked in flutter/flutter#169928
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
…r#170462)

flutter/packages@974f152...0b322a2

2025-06-11 [email protected] Roll Flutter master to 2d9977c
(flutter/packages#9402)
2025-06-11 [email protected] [google_maps_flutter] Fix iOS
analysis for newer Xcode (flutter/packages#9415)
2025-06-10 [email protected] [in_app_purchase] Return
jwsRepresentation and jsonRepresentation for StoreKit2
(flutter/packages#9280)
2025-06-10 [email protected] Roll Flutter master to 7e30df2
(flutter/packages#9413)
2025-06-10 [email protected] [vector_graphics]Add
Null Check for Image Retrieval in listener.dart's onDrawImage Function
(flutter/packages#9211)
2025-06-10 [email protected] Roll Flutter master to 8b22f67
(flutter/packages#9407)
2025-06-06 [email protected] Roll Flutter master to d8baa77
(flutter/packages#9379)
2025-06-06 [email protected] Fix the `zIndex`-related issue in the
`copyWith` method. (flutter/packages#9396)
2025-06-06 [email protected] [multi] Remove @tool from docs that
does not work (flutter/packages#9394)

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 [email protected] 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 override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: pigeon p: quick_actions p: video_player platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants