Skip to content

[stable] [flutter_tools] Avoid unlinking native_assets.json and handle EXDEV - #196383

Merged
auto-submit[bot] merged 108 commits into
flutter:flutter-3.50-candidate.0from
bkonyi:cherry-pick-196134-to-stable
Nov 18, 2026
Merged

auto-submit[bot] merged 108 commits into
flutter:flutter-3.50-candidate.0from
bkonyi:cherry-pick-196134-to-stable

Conversation

@bkonyi

@bkonyi bkonyi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

#196121

Impact Description:

When running flutter test on macOS with a project or build/ directory located on an external or secondary volume (/Volumes/..., where endpoint-security or recycle-bin interposers intercept unlink(2) and attempt a cross-volume rename(2)), _copyNativeCodeAssetsForOS deletes build/native_assets/<os>/native_assets.json right before _writeNativeAssetsJson truncates and overwrites that same file in place, failing with FileSystemException (OS Error: Cross-device link, errno = 18) (EXDEV). Because _handlePosixException in error_handling_io.dart does not map EXDEV (errno = 18) to a ToolExit, flutter test crashes with an unhandled FileSystemException (t: top-crasher in Flutter 3.47). This cherry-pick skips unlinking native_assets.json when it already exists as a regular file on disk and maps POSIX EXDEV (errno = 18) on Linux and macOS to an actionable ToolExit.

Conflict Resolution (stable): Resolved merge conflicts in packages/flutter_tools/lib/src/base/error_handling_io.dart, packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart, packages/flutter_tools/test/general.shard/base/error_handling_io_test.dart, and packages/flutter_tools/test/general.shard/isolated/native_assets_test.dart caused by errno constant additions (erofs) and DI parameter changes (logger and processManager on installCodeAssets and _copyNativeCodeAssetsForOS) on master, and used testUsingContext for the manifest-overwrite tests because _writeNativeAssetsJson reads globals.logger on flutter-3.47-candidate.0.

Changelog Description:

[flutter/196121] When running flutter test with a project or build directory on an external volume on macOS, flutter_tools crashes with an unhandled FileSystemException (OS Error: Cross-device link, errno = 18) while cleaning up native_assets.json.

Workaround:

Move the Flutter project and build output directory onto the primary local volume so native asset cleanup does not cross mount points or trigger external-volume unlink interposers.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

  1. Run flutter test test/general.shard/base/error_handling_io_test.dart test/general.shard/isolated/native_assets_test.dart in packages/flutter_tools and verify that the EXDEV and installCodeAssets manifest overwrite tests pass.
  2. Run flutter test twice on a Flutter project on macOS where build/native_assets/macos/native_assets.json already exists on an external volume (or in a directory where unlink(2) is blocked while in-place file truncation is permitted) and verify that native_assets.json is overwritten in place without unlinking or crashing with FileSystemException (errno = 18).

flutteractionsbot and others added 30 commits July 9, 2026 18:03
…9216)

Updates the engine.version file from `None (New File)` to `bbd15867c003dc66e678cb3c218649fa8bf914f2`.
…er#189517)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

This is the first in a set of 3 PRs (flutter#188821, flutter#189224, and flutter#188514) that will be cherry picked in order to fix a set of line-related issues when Impeller with SDF rendering is enabled.

### Issue Link:

What is the link to the issue this cherry-pick is addressing?

flutter#188329
flutter#188911
flutter#188593

### Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Thin ines (including lines rendered with `canvas.drawLine`, thin line-like rectangles rendered with `canvas.drawRect`, and paths drawn with `canvas.drawPath` that consist of a single line or thin rectangle) have various highly visible rendering issues:
- opacity is ignored
- lines with stroke width less than 1 pixel are incorrectly clamped up to be ~2 pixels wide
- lines with stroke width more than 1 pixel are overly thick, with an added thickness proportional to their intended width

This issue is present when impeller is enabled Impeller with SDF rendering. In the beta channel, Impeller with SDF rendering is the default when building apps for desktop platforms: macOS, Linux, and Windows.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/188329](flutter#188329), [flutter/188911](flutter#188911), [flutter/188593](flutter#188593): Multiple line rendering issues when Impeller with SDF rendering is enabled (default enabled on desktop platforms)

### Workaround:
Is there a workaround for this issue?

Disable Impeller, falling back to Skia rendering.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

After all 3 PRs are cherry picked, verify the sample apps in the relevant issues (flutter#188329 and flutter#188911) render with expected opacity and with expected line widths.
…on (flutter#189446)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)

### Issue Link:
flutter#189274

### Impact Description:
Fixes a regression in `flutter_tools` where `adb devices -l` output containing non-key-value attributes (e.g. `ABCDEFG device 20-30 product:mokey ...`) causes regex backtracking, incorrectly capturing `ABCDEFG device` into the device ID. This breaks device discovery and prevents running apps on affected Android devices/bots in devicelab.

### Changelog Description:
[flutter_tools] When parsing ADB device output containing non-key-value attributes on Android, flutter tool misparses the device ID.

### Workaround:
None.

### Risk:

### Test Coverage:

### Validation Steps:
Run `flutter test test/general.shard/android/android_device_discovery_test.dart` to verify device regex output parsing.
…9399)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

Part of flutter#189144

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Release builders should match the master branch configs. These builders were moved from x64 Intel Macs to ARM Macs in flutter#189377. Without this change, the beta release branch will try to run the old builder names and fail because the infra config is missing.

There will be a follow-up cherry-pick to bring it out of bringup when they pass in post-submit 
flutter#189400

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/189144] Migrate some performance benchmarks to run on Mac ARM machines in CI

### Workaround:
Is there a workaround for this issue?

No

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

They are passing in post-submit on master.
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

This is the second in a set of 3 PRs (flutter#188821, flutter#189224, and flutter#188514) that will be cherry picked in order to fix a set of line-related issues when Impeller with SDF rendering is enabled.

The first PR was cherry picked and merged with flutter#189517

### Issue Link:

What is the link to the issue this cherry-pick is addressing?

flutter#188329
flutter#188911
flutter#188593

### Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Thin ines (including lines rendered with `canvas.drawLine`, thin line-like rectangles rendered with `canvas.drawRect`, and paths drawn with `canvas.drawPath` that consist of a single line or thin rectangle) have various highly visible rendering issues:
- opacity is ignored
- lines with stroke width less than 1 pixel are incorrectly clamped up to be ~2 pixels wide
- lines with stroke width more than 1 pixel are overly thick, with an added thickness proportional to their intended width

This issue is present when impeller is enabled Impeller with SDF rendering. In the beta channel, Impeller with SDF rendering is the default when building apps for desktop platforms: macOS, Linux, and Windows.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/188329](flutter#188329), [flutter/188911](flutter#188911), [flutter/188593](flutter#188593): Multiple line rendering issues when Impeller with SDF rendering is enabled (default enabled on desktop platforms)

### Workaround:
Is there a workaround for this issue?

Disable Impeller, falling back to Skia rendering.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

After all 3 PRs are cherry picked, verify the sample apps in the relevant issues (flutter#188329 and flutter#188911) render with expected opacity and with expected line widths.
…es (flutter#189537)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

This is the third in a set of 3 PRs (flutter#188821, flutter#189224, and flutter#188514) that will be cherry picked in order to fix a set of line-related issues when Impeller with SDF rendering is enabled.

The first PR was cherry picked and merged with flutter#189517
The second PR was cherry picked and merged with flutter#189529

### Issue Link:

What is the link to the issue this cherry-pick is addressing?

flutter#188329
flutter#188911
flutter#188593

### Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Thin ines (including lines rendered with `canvas.drawLine`, thin line-like rectangles rendered with `canvas.drawRect`, and paths drawn with `canvas.drawPath` that consist of a single line or thin rectangle) have various highly visible rendering issues:
- opacity is ignored
- lines with stroke width less than 1 pixel are incorrectly clamped up to be ~2 pixels wide
- lines with stroke width more than 1 pixel are overly thick, with an added thickness proportional to their intended width

This issue is present when impeller is enabled Impeller with SDF rendering. In the beta channel, Impeller with SDF rendering is the default when building apps for desktop platforms: macOS, Linux, and Windows.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/188329](flutter#188329), [flutter/188911](flutter#188911), [flutter/188593](flutter#188593): Multiple line rendering issues when Impeller with SDF rendering is enabled (default enabled on desktop platforms)

### Workaround:
Is there a workaround for this issue?

Disable Impeller, falling back to Skia rendering.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

After all 3 PRs are cherry picked, verify the sample apps in the relevant issues (flutter#188329 and flutter#188911) render with expected opacity and with expected line widths.
This was a manual cherry pick of flutter#189109 and of flutter#189229.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#189228

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

This affects all Flutter Android apps and add-to-app integrations below the new warn and error version thresholds. Apps below the warn version will successfully build with warning logs urging an upgrade. Apps below the error version will fail to build and receive logs to upgrade.

New Warn Version
AGP: 9.0.1
Gradle: 9.1.0
KGP: 2.3.20

New Error Version
AGP: 8.11.1
Gradle: 8.14
KGP: 2.2.20

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/189383](flutter#186100): When building Flutter Android apps and add-to-app modules using AGP < 9, the tool does not prompt developers to upgrade to AGP 9+ or log Built-in Kotlin migration warnings.

### Workaround:
Is there a workaround for this issue?

This change must be made. More develoeprs should upgrade to AGP 9+ to receive Built-in Kotlin migration warnings. To urge more developers to migrate to AGP 9+, we must raise the warn version to AGP 9+ to urge a larger chunk of our developers to migrate to AGP 9+. This must be done in this release because we don't have many Flutter releases left before AGP 10 releases.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?
To validate the new warn version:
- `flutter create` a new app
- change versions to just below the warn version AGP: 9.0.1, Gradle: 9.1.0 KGP: 2.3.20 in settings.gradle.kts
- `flutter build apk` and the build is successful but you will see logs urging you to upgrade.
- change versions to the warn version GP: 9.0.1, Gradle: 9.1.0 KGP: 2.3.20 in settings.gradle.kts
-`flutter build apk` and the build is successful and you will see no logs

To validate the new error version:
- change versions to just below the error version AGP: 8.11.1, Gradle: 8.14 KGP: 2.2.20 in settings.gradle.kts
- `flutter build apk` and the build will fail and you will see logs urging you to upgrade.
- change versions to the error version  AGP: 8.11.1, Gradle: 8.14 KGP: 2.2.20 in settings.gradle.kts
-`flutter build apk` and the build is successful and you will see no logs

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
> [!NOTE]  
> This was re-created from flutter#189196, which pointed to the old beta branch (3.46).

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#172935

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

This add fix data for the design package migration. It cannot be triggered by users currently, so it is a no-op. The Dart team is adding the ability to trigger the fix manually for testing.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

This adds support for the material and cupertino migration

### Workaround:
Is there a workaround for this issue?

No

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Nothing.
…om 5 to 10 (flutter#189743)

> [!NOTE]  
> This was re-created from flutter#189299, which pointed to the old beta branch (3.46).

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#189039

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Release builders should match main. These builders were renamed in flutter#189040 to increase the number of shards. Without this change, the beta release branch will try to run the old builder names and fail because the infra config is missing.

There will be a follow-up cherry-pick to bring it out of bringup when they pass in post-submit flutter#189368

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/189039] Improve speed of Mac Flutter tool integration tests in CI

### Workaround:
Is there a workaround for this issue?

No

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

This PR correctly skips `Mac tool_integration_tests` in presubmit.
…89888)

CPs flutter@cb34620 to temporarily fix flutter#189876

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
…rectangle when no expansion is needed, and remove 1-pixel roundrect to rect simplification (flutter#189885)

This was a manual cherry pick of flutter#189808.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#189807

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Rounded rectangles are sometimes incorrectly rendered as non-rounded rectangles.

This issue is present when impeller is enabled Impeller with SDF rendering. In the beta channel, Impeller with SDF rendering is the default when building apps for desktop platforms: macOS, Linux, and Windows.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/189807](flutter#189807): Rounded rectangles are sometimes incorrectly rendered as non-rounded rectangles.

### Workaround:
Is there a workaround for this issue?

Disable Impeller, falling back to Skia rendering.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

The demo app at flutter#189807 should render two rounded rectangles, rather than one normal rectangle and one rounded rectangle.
…rade_test suite (flutter#189951)

Cherry pick of flutter#189920.

This test is failing when run with today's randomized order seed.

See flutter#189919
Bump Dart version to 40acaf1a7816d40db5263d008422697c761bb2a8 and ran tools/dart/create_updated_flutter_deps.py, no updates.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
…er#190231)

This pull request cherry-picks flutter#189608 into the beta release branch (flutter-3.47-candidate.0) so the fix ships in the next stable release.

### Issue Link:
flutter#188781

### Impact Description:
P0 regression. On iOS 27, which affects every browser since they all run WebKit, a text field in a Flutter web app can become permanently unresponsive after a common gesture. When the user long-press-drags the selection caret and
lifts, WebKit abandons the touch without delivering `pointerup` or `pointercancel`, leaving the framework holding a pointer that never lifts. This wedges the tap-and-drag gesture recognizer, so every later tap is silently dropped: the field never regains focus and the keyboard never returns, and the user can no longer type. It breaks text input in shipping production web apps. iOS 26 is unaffected.

### Changelog Description:
[flutter/188781] When dragging the text selection caret on iOS 27 web browsers, text fields could become permanently unresponsive to taps and never regain focus; they now recover.

### Workaround:
No in-app workaround. Reloading the page temporarily restores the field, but it breaks again the next time the gesture occurs.

### Risk:
The change is small and strictly gated to iOS WebKit. It only cancels touch pointers the browser has already dropped from its `touches` list, so it cannot affect other platforms or normal pointer handling.

### Test Coverage:
The fix adds 341 lines of engine unit tests in `pointer_binding_test.dart` covering the touch-cancel logic.

### Validation Steps:
1. Open a Flutter web app containing a TextField on an iOS 27 device, any browser.
2. Tap the field to focus it and type some text.
3. Long-press the selection caret, drag it, then lift your finger.
4. Tap the field again, and repeat a few times.
5. Before the fix the field becomes permanently dead: taps do nothing, no focus, no keyboard. After the fix the field keeps responding and recovers.

Demo before: https://flutter-demo-47-before.web.app
Demo after:  https://flutter-demo-47-after.web.app
…0247)

Updates the engine.version file from `26c792210cd4fcd069fd5467663b1ec2965999b1` to `effb186f3172afa211230de73d83af2788e44324`.

Part of flutter#190243
…lutter#190182)

This dep has been abandoned
https://developer.android.com/tools/releases/sdk-tools

Also bumps to include sdk 37, because the underlying script had been bumped without a corresponding bump in the ci.yaml

This is a cherry-pick of flutter#189962 to `beta` branch to ensure tests pass for builds/releases on the beta branch.

Impacted Users: Flutter releng / CI infra team. No direct end-user or app-developer impact. This affects the ability to produce beta/release builds on the arm64 Mac CI bot pool.

Impact Description: The android_sdk CIPD bundle pulls in the ancient, abandoned tools:tools package, whose emulator binary is Intel-only and requires Rosetta to run. We're removing Rosetta from the arm64 Mac CI bot pool, so any CI step that touches that binary will fail on those machines. Without this, we can't remove Rosetta from the prod/dart-internal.flutter bot pools. No impact on flutter apps.

Workaround: The only alternatives are to keep Rosetta installed on the arm64 Mac bots.

Risk: Low. The removed tools:tools package has been abandoned by Android and is not used by the build; the change swaps to the already-published android_sdk version:37v2 CIPD bundle and re-enables a test that was only skipped because of the Intel-only binary. Changes are confined to CI/dependency configuration, the lint baseline, and a single test.

Test Coverage: Yes. The change re-enables the emulator.getEmulators should respond with list daemon test on macOS (previously skipped via flutter#189876), and the existing Android/CI test shards exercise the updated SDK bundle. The commit landed and passed on master as flutter#189962.

Validation Steps:
1. Confirm CI is green on the candidate branch, in particular the Android and macOS shards that consume the android_sdk dependency.
2. Verify the emulator.getEmulators daemon test runs (no longer skipped) and passes on macOS.
3. Post Rosetta-removal: confirm builds succeed on an arm64 Mac bot with Rosetta absent, i.e. no step attempts to invoke the Intel-only tools emulator binary.

Issue: flutter#189876
Issue: flutter#103386
Fixes: flutter#190176 (cherry-pick issue)

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
…lable. (flutter#190374)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
*What is the link to the issue this cherry-pick is addressing?*

flutter#190060

### Impact Description:
*What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.*

This PR fixes anti-aliasing on some draw calls in Impeller Windows, specifically clipping and drawing paths.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/190060] When running an app on Windows with Impeller, drawing paths and clipping regions had jagged edges.

### Workaround:
*Is there a workaround for this issue?*

Yes, downgrading to Skia.

### Risk:
*What is the risk level of this cherry-pick?*

### Test Coverage:
*Are you confident that your fix is well-tested by automated tests?*

### Validation Steps:
*What are the steps to validate that this fix works?*

I ran a Flutter app that clips a rectangle into the shape of a circle on a remote vm windows instance.  I also ran it on a differ windows machine.  I also recorded it with renderdoc and saw the MSAA process working.
…UberSDF AA on Windows (flutter#190378)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#189827

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

This PR fixes anti-aliasing on some draw calls in Impeller Windows, specifically all draws using UberSDF (almost all draws except for paths and some corner case shapes).

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/189827] When running an app on Windows with Impeller, most raw shape draws had jagged edges.

### Workaround:
Is there a workaround for this issue?

Yes, downgrading to Skia.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Verified by running a Flutter app on Windows before and after this fix. See the PR description at flutter#190260.
…n UI after occlusion (flutter#190435)

### Issue Link:
flutter#155977

### Impacted Users:
All macOS desktop end-users and developers of Flutter apps on macOS. The issue reproduces reliably and frequently on macOS desktop apps launched via Finder/LaunchServices when returning to an occluded app on the same screen (e.g. via Cmd-Tab, Mission Control, or clicking away and back).

### Impact Description:
TL;DR: This issue can cause macOS desktop apps to visibly lock up.

When a Flutter macOS desktop app is occluded and then brought back to the foreground on the same screen (e.g. via Cmd-Tab or Mission Control), macOS does not reliably deliver an
`NSApplicationDidChangeOcclusionState` (visible=YES) notification.

Because `_visible` was driven solely by occlusion notifications, returning to the foreground caused `applicationWillBecomeActive` to read a stale `_visible = NO` and resend `AppLifecycleState.hidden` to the engine. Consequently, the framework stays in the `hidden` lifecycle state: animations are muted, frame scheduling is gated off, and no vsyncs are requested, leaving the UI completely frozen and unresponsive even though the window is frontmost and active.

This is a showstopper bug for shipping production macOS Flutter apps.

### Changelog Description:
[flutter/155977] When returning to an occluded macOS desktop app via Cmd-Tab or Mission Control [on macOS], the UI no longer freezes due to missed occlusion notifications.

### Workaround:
Yes. When the app is frozen after returning via Cmd-Tab or Mission Control, clicking the application's Dock icon will bring it back to life (triggering a WindowServer-driven occlusion state update that recovers rendering).

### Risk:
What is the risk level of this cherry-pick?

This patch adds an additional means of updating its `_visible` state from `NO` to `YES` during `handleWillBecomeActive:`, this then triggers frames to start pumping. This does NOT add any additional means to transition the `_visible` state from `YES` to `NO`.

It's simple, properly tested and doesn't introduce any additional bugs.

It's worth noting that this doesn't reasolve ALL bugs in the code; there's still a small bug in the code:

In the case where `_visible` is `YES` and the user minimises the window (which @bdero mentions fires no occlusion notification) and then cmd-tabs back, `handleWillBecomeActive` would result in `kResumed` even though the window is still down in the dock and not on-screen (because the loop find no visible window but leaves the stale `_visible` = `YES` untouched.

This is intentionally NOT fixed in this patch; which addresses only the high priority visual lock up. The impact of the remaining issue is much, much smaller.

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
1. Build and launch a Flutter macOS desktop app via Finder or `open` (LaunchServices GUI launch) on macOS.
2. Open another application window so that the Flutter app is occluded.
3. Switch away from the Flutter app and then return to it on the same screen multiple times using Cmd-Tab or Mission Control.
4. Verify that upon returning to the frontmost Flutter app, the UI remains responsive, animations continue to play, and new frames render without freezing.
5. Verify that activating the app via Cmd-Tab while all its windows are minimized does not improperly resume rendering.
6. Run the macOS engine unit tests (`FlutterEngineTest`) to verify all lifecycle tests in `HandleLifecycleStates` pass.

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

- [X ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
…lutter#190364)

## Impacted Users
Anybody attempting to build an Android app with a Gradle incompatible with their JDK.  This is now an issue as the RC for Android Studio is JDK 25 which does not work with Gradle 8.14.

## Impact Description
The `flutter build apk` command will crash without a good error message. 

## Workaround
Change your JDK or Gradle version.

## Risk
Low

## Test Coverage
Good

## Validation Steps
1. Set the JDK: `flutter config --jdk-dir=/opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk/Contents/Home`
2. Build the APK: `flutter build apk`
3. Verify the error message (seen below)

Before
```
❯ flutter config --jdk-dir=/opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk/Contents/Home
Setting "jdk-dir" value to "/opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk/Contents/Home".

You may need to restart any open editors for them to read new settings.
❯ flutter build apk
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/Users/boetger/.gradle/wrapper/dists/gradle-8.14-all/c2qonpi39x1mddn7hk5gh9iqj/gradle-8.14/lib/native-platform-0.22-milestone-28.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

FAILURE: Build failed with an exception.

* What went wrong:
25.0.4

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 321ms
```

After
```
❯ flutter config --jdk-dir=/opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk/Contents/Home
Setting "jdk-dir" value to "/opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk/Contents/Home".
You may need to restart any open editors for them to read new settings.
❯ flutter build apk
Gradle build failed due to Java/Gradle incompatibility.
The Java version used for the build is 25.0.4, which is incompatible with Gradle 8.14.
To fix this, you can either:
  1. Upgrade your project's Gradle version (typically in gradle-wrapper.properties to a version matching the range: compatible Gradle versions for Java 25.0.4 are 9.1.0
  to newer).
  5. Use a different Java version for Flutter by running `flutter config --jdk-dir=<path>`.
Alternatively, you can bypass this check using "--android-skip-build-dependency-validation".
```
…2698a006b1747bf78bfecbd041 (flutter#190568)

This PR updates the transitive dependencies in the engine `DEPS` file based on Dart SDK hash `171019fea4e9662698a006b1747bf78bfecbd041`.
…0585)

Updates the engine.version file from `effb186f3172afa211230de73d83af2788e44324` to `f88005a259ba379c2c1156178aa1870936be7b7f`.
…y're less than Xcode's minimum (flutter#190852)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#190676

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Flutter iOS or macOS apps may fail to build when using Xcode 27 if they have a CocoaPods dependency that supports deployment targets lower than iOS 15 or macOS 12.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

< Replace with changelog description here >
[flutter/190676] When building for iOS or macOS with Xcode 27, the build may fail due to the Pods.xcodeproj having a minimum deployment target below Xcode's supported range.

### Workaround:
Is there a workaround for this issue?

No

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Using Xcode 27:

1. flutter create my_app && cd my_app
2. flutter config --no-enable-swift-package-manager
3. flutter pub add sentry_flutter
4. flutter build ios

Build should succeed.
…c0a185d759a025e879ff06e631 (flutter#190863)

This PR updates the transitive dependencies in the engine `DEPS` file based on Dart SDK hash `da6595cd6bb5d4c0a185d759a025e879ff06e631`.

From:
https://dart.googlesource.com/sdk/+/refs/heads/lkgr-stable 
Commit: da6595cd6bb5d4c0a185d759a025e879ff06e631

see https://dart.googlesource.com/sdk/+/da6595cd6bb5d4c0a185d759a025e879ff06e631 tagged dart 3.13.0
…0943)

Updates the engine.version file from `f88005a259ba379c2c1156178aa1870936be7b7f` to `5f77625673248ee5846fbcaf5d3e1a3878386fd7`.
flutter#191123)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

N/A (Fixes cherry-pick helper script bug from flutter#189463)

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

When running the cherry-pick agent helper script (`flutter_cp.dart`) on a release branch, the script adds unspaced label arguments (`cp:stable` or `cp:beta`) instead of `cp: stable` or `cp: beta`. This results in creating unintended, duplicate repository labels.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/189463] When running the cherry-pick helper script, incorrect label argument formatting causes unintended repository label creation.

### Workaround:
Is there a workaround for this issue?

Manually add the correct channel label (`cp: stable` or `cp: beta`) with a space via GitHub UI/CLI, and remove the unspaced label.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

1. Run `dart .agents/skills/flutter-cherry-pick/scripts/flutter_cp.dart --pr <PR> --channel stable --action start`.
2. Verify that `cp: stable` (with space) is added to the PR and no duplicate unspaced label is created.
… Linux and Windows embedders (flutter#190872)

Cherry-pick of flutter#190684 (`4ff86d444fb94c39c38111f4b9be649bb716dff7`) onto `flutter-3.47-candidate.0`. It applies cleanly with no conflicts.

The 3.47.0 cherry-pick window is already closed, so this is a request to reopen the conversation rather than a routine cherry-pick. The reasoning is under "Why this is requested after the window closed" below, and I am happy to take a no.

### Issue Link:
flutter#190871

### Why this is requested after the window closed:
This is an API addition rather than a regression fix, so it does not meet the usual bar. Three things make it worth asking about anyway.

Flutter GPU already has a permanent, project-level opt-in on every other platform (`FLTEnableFlutterGPU` in `Info.plist` on iOS and macOS, the `EnableFlutterGPU` manifest key on Android). Linux and Windows are the only platforms with no equivalent, so this closes a parity gap rather than adding new capability.

Release-mode desktop builds compile out `GetSwitchesFromEnvironment` (`engine_switches.cc` guards it with `#ifndef FLUTTER_RELEASE`), so `--enable-flutter-gpu` reaches the engine only under `flutter run`. Without a project-level setter there is no way at all to ship a released Linux or Windows app that uses `package:flutter_gpu`.

It landed on master on August 7, two days after `flutter-3.48-candidate.0` branched on August 5, so it missed both this branch and the next beta branch. If it is not picked up here, the first beta carrying it is 3.49 and the first stable is roughly a quarter out.

### Impacted Users:
Developers shipping Flutter desktop apps on Linux and Windows that use `package:flutter_gpu`, either directly or through a package built on top of it. Issue flutter#167734 has been open since April 2025 with users repeatedly asking how to enable Flutter GPU on Windows, and the most recent comment describes exactly this case, that the command line flag works under `flutter run` but a packaged executable has no way to set it.

### Impact Description:
Production apps on Linux and Windows cannot ship Flutter GPU at all. A release build throws on the first Flutter GPU call with "Flutter GPU must be enabled via the Flutter GPU manifest setting", and that message names only the iOS and Android opt-ins because the desktop ones did not exist. This does not affect development, since `flutter run --enable-flutter-gpu` works, which is what makes it easy to discover the problem only at packaging time.

### Changelog Description:
[flutter/190871] Flutter GPU could not be enabled in release builds on Linux and Windows, since those embedders had no project-level opt-in and release builds ignore engine switches from the environment.

### Workaround:
No practical one. Shipping the app in debug or profile mode is the only way to get the environment switches honored, and neither is shippable. The alternative is patching the embedder and building a custom engine.

### Risk:
What is the risk level of this cherry-pick?

The change is additive and defaults to off. Both embedders append `--enable-flutter-gpu` only when the project setting is true, and skip it when an environment switch already carries it, so an app that does not opt in produces a byte-identical switch list. Nothing in the engine, Impeller, or the rendering path changes. The Linux side also hoists a repeated `GetSwitchesFromEnvironment()` call into a local, which is behavior neutral.

One caveat worth naming. A `bool enable_flutter_gpu` field is appended to `FlutterDesktopEngineProperties` in the public `flutter_windows.h`, which changes that struct's layout. The header and `flutter_windows.dll` ship together in the SDK artifact cache so they stay consistent, but it is a public C struct change, and once it ships in a stable the shape of the API is locked in.

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

Unit tests cover both embedders. On Linux, `fl_dart_project_test.cc` covers the getter, setter, and default, and `fl_engine_test.cc` covers switch forwarding and the environment switch deduplication. On Windows, `dart_project_unittests.cc`, `flutter_project_bundle_unittests.cc`, and `flutter_windows_engine_unittests.cc` cover the client wrapper, the project bundle, and the engine switch assembly.

### Validation Steps:
1. Create a Flutter app that calls into `package:flutter_gpu` and run it in release mode on Linux or Windows without the new setting. Confirm it throws "Flutter GPU must be enabled via the Flutter GPU manifest setting".
2. On Linux, add `fl_dart_project_set_enable_flutter_gpu(project, TRUE);` in `linux/runner/my_application.cc`. On Windows, add `project.set_enable_flutter_gpu(true);` in `windows/runner/main.cpp`.
3. Build in release mode and launch the packaged binary directly rather than through `flutter run`. Confirm Flutter GPU initializes and renders.
4. Confirm an app that does not set the flag behaves exactly as before.
5. Run the Linux and Windows embedder unit tests.
…ilds (flutter#191120)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#188446

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

The Flutter tool experiences a race condition when preparing the Swift Packages directory during parallel Xcode builds, leading to `FileSystemException` (OS Error: Directory not empty, errno = 66) or `PathExistsException`. This is one of the top crashers identified in the Flutter 3.44.3 stable release. It impacts development when building multi-target iOS/macOS applications in parallel.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/188446] When building multi-target applications in parallel on iOS and macOS, a race condition in SwiftPM integration causes FileSystemException.

### Workaround:
Is there a workaround for this issue?

Run Xcode builds sequentially (disable parallel target builds) or build targets one by one.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

1. Enable Swift PM in a Flutter project.
2. Add multiple targets (e.g. App and Share Extension) that use Swift PM plugins.
3. Build the project in Xcode with parallel builds enabled.
4. Verify the build succeeds without `FileSystemException` or `PathExistsException` in `ephemeral/Packages`.
flutteractionsbot and others added 8 commits October 27, 2026 15:46
…er_test (macOS 26) (flutter#195342)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#193159

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

CI test-only fix to refactor `plist_parser_test.dart` to pass on macOS 26.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

NA - CI test-only fix

### Workaround:
Is there a workaround for this issue?

No

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Run `plist_parser_test.dart` tests in CI or locally on macOS 26
### Issue Link:
flutter#195180 (PR, there was no open issue)

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Release builders should match the master branch configs. new_gallery_skia_ios__transition_perf was removed in flutter#189377. Without this change, the beta release branch will try to run the old builder names and fail because the infra config is missing.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

[flutter/195180] Remove obsolete iOS Skia performance benchmark.

### Workaround:
Is there a workaround for this issue?

N/A

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Release PRs should not complain about missing new_gallery_skia_ios__transition_perf builder.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#193833, flutter#193834

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

CI test-only change to migrate tests to macOS 26. This is a partial cherry-pick of flutter#193681, only including the parts required for macOS 26.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

N/A - CI test-only change

### Workaround:
Is there a workaround for this issue?

Rerun test

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Run in CI
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
Part of flutter#193527

### Impact Description:
Low user-facing impact on its own, as this PR is purely additive (`ContextMenuButtonKind` and `ContextMenuButtonItem.kind`) without deprecating `ContextMenuButtonType` or changing existing behavior. However, cherry-picking this into `3.47` unblocks the decoupled `cupertino_ui` and `material_ui` packages (which must support the latest stable Flutter release) from migrating to `ContextMenuButtonKind` and unblocks shipping the iOS Translate context menu work (flutter#180021) without waiting an extra stable release cycle.

### Changelog Description:
Explain this cherry pick:

- [flutter/193527](flutter#193527) When building custom text selection menus, packages can't add new actions such as Translate without breaking exhaustive switches on `ContextMenuButtonType`; adds the extensible `ContextMenuButtonKind`.

### Workaround:
Is there a workaround for this issue?

No.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:

Run the automated unit tests in `flutter test test/widgets/context_menu_button_item_test.dart`, `test/widgets/editable_text_test.dart`, `test/widgets/selectable_region_test.dart`, and `test/widgets/system_context_menu_test.dart` to verify `ContextMenuButtonKind` and `ContextMenuButtonItem.kind` behavior and backwards compatibility with `ContextMenuButtonType`.
…5504)

Updates the engine.version file from `cf636b1dfb818dd6a3ff16e390e93b1a036969c8` to `89c39edfdfae2949f6806e4a315c0c08522238b7`.
Adds CHANGELOG.md entries for the 3.47.9 stable hotfix (flutter#195073, flutter#194959, flutter#195015). CI-only cherry-picks are omitted.

Tracker: flutter#195427

### Edits to cherry-pick changelog descriptions
- flutter#195073 and flutter#195015: used verbatim from the cherry-pick PR's "Changelog Description".
- flutter#194959 (@bkonyi): **edited** to follow [Hotfix Documentation Best Practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) (describe the state prior to the fix):
  - Original: "When running `flutter test` in pub workspaces, monorepos, or symlinked directories, fix a StateError crash during native assets compilation by falling back to appName matching."
  - Changelog: "When running `flutter test` in pub workspaces, monorepos, or symlinked directories on any platform, native assets compilation crashed with a `StateError`."
  - Changes: rewrote as the pre-fix behavior, added "on any platform", dropped the implementation detail ("falling back to appName matching").

@bkonyi FYI — please let us know if the edited wording for flutter#194959 looks right.
### Issue Link:
What is the link to the issue this cherry-pick is addressing?

flutter#192576

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

CI test-only changes to allow tests to run on either macOS 15 or 26.

### Changelog Description:
Explain this cherry pick:
* In one line that is accessible to most Flutter developers.
* That describes the state prior to the fix.
* That includes which platforms are impacted.
See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples.

N/A - CI test-only change

### Workaround:
Is there a workaround for this issue?

Rerun test

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

CI passes
…lutter#196134)

Previously, `installCodeAssets` invoked `_copyNativeCodeAssetsForOS` on
every `flutter test` run, which listed `build/native_assets/<os>/` and
deleted `native_assets.json` right before `_writeNativeAssetsJson`
truncated and overwrote that same file in place. On macOS external
volumes (for example `/Volumes/...` where endpoint-security or
recycle-bin interposers intercept `unlink(2)` and attempt a cross-volume
`rename(2)`), unlinking `native_assets.json` failed with
`FileSystemException (OS Error: Cross-device link, errno = 18)`
(`EXDEV`). In addition, `_handlePosixException` did not map `EXDEV`
(`errno = 18`) to a `ToolExit`.

This change:
1. Skips deleting `native_assets.json` in `_copyNativeCodeAssetsForOS`
when it already exists on disk as a regular file, since
`_writeNativeAssetsJson` immediately truncates and overwrites it in
place (while still deleting stale bundled native asset artifacts,
directories, and symlinks).
2. Handles POSIX `EXDEV` (`errno = 18`) in `_handlePosixException` on
Linux and macOS by throwing an actionable `ToolExit` instead of crashing
with an unhandled `FileSystemException`.

Reproduction notes: Both output pairs below were captured on a Linux
host, which cannot reproduce the macOS external-volume behavior
directly. The first pair comes from a small Dart script
(`repro_exdev.dart`) calling
`ErrorHandlingFileSystem.file(...).renameSync(...)` from `/tmp`
(`tmpfs`) to an `ext4` directory to trigger a real kernel `EXDEV`
(`errno = 18`). The second pair comes from running `BOT=true flutter
test --no-pub -r expanded` on a minimal app after making
`build/native_assets/linux` read-only (`chmod 0555`) while leaving
`native_assets.json` writable (`0644`), so `unlink(2)` fails while
in-place truncation succeeds; with a writable
`build/native_assets/linux` directory, the unfixed tool passes with the
same 3-line test output. Local workspace paths inside the fenced output
blocks are preserved verbatim to match exact command output.

Previous output:
```
Unhandled exception:
FileSystemException: Cannot rename file to '/usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc4d2ca98a9/scratch/repro_196121_dst.tmp', path = '/tmp/repro_196121_src.tmp' (OS Error: Invalid cross-device link, errno = 18)
```

Current output:
```
Flutter failed to rename file at "/tmp/repro_196121_src.tmp" to "/usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc4d2ca98a9/scratch/repro_196121_dst.tmp".
A file system operation failed across different volumes or mount points.
FileSystemException: Cannot rename file to '/usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc4d2ca98a9/scratch/repro_196121_dst.tmp', path = '/tmp/repro_196121_src.tmp' (OS Error: Invalid cross-device link, errno = 18)
Ensure that the project, build output, and temporary directories are on the same writable volume, or check external volume and security software settings.
```

Previous output (flutter test overwriting existing native_assets.json):
```
Flutter failed to delete file at
"/usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc4
d2ca98a9/scratch/repro_app/build/native_assets/linux/native_assets.json".
Please ensure that the SDK and/or project is installed in a location that has
read/write permissions for the current user.
Try running:
  sudo chown -R $(whoami)
  /usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc
  4d2ca98a9/scratch/repro_app/build/native_assets/linux/native_assets.json
```

Current output (flutter test overwriting existing native_assets.json):
```
00:00 +0: loading /usr/local/google/home/bkonyi/.gemini/jetski/brain/0a669702-1e2d-46a6-9c37-fdc4d2ca98a9/scratch/repro_app/test/smoke_test.dart
00:00 +0: smoke test
00:00 +1: All tests passed!
```

Fixes flutter#196121
@bkonyi bkonyi added the CICD Run CI/CD label Nov 11, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@bkonyi bkonyi added cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels. labels Nov 11, 2026
@bkonyi
bkonyi marked this pull request as ready for review November 11, 2026 17:38

@gemini-code-assist gemini-code-assist Bot 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 adds handling for POSIX cross-device link errors (exdev) in ErrorHandlingFileSystem to provide a descriptive error message when file system operations fail across different volumes. It also updates _copyNativeCodeAssetsForOS to avoid deleting the native_assets.json manifest file before overwriting it, preventing issues on external volumes. Relevant tests are added to verify the new error handling and manifest overwrite behavior. The reviewer suggests using absolute paths when comparing the manifest file path to ensure the comparison is robust against relative path differences.

@justinmc

Copy link
Copy Markdown
Contributor

@bkonyi This cherry pick looks old, it's pointing to the old stable branch. Do you still want to cherry pick it? If so we'll need to update the branch, which could cause merge conflicts (maybe we have to recreate the PR).

@bkonyi
bkonyi marked this pull request as draft November 18, 2026 04:54
@bkonyi
bkonyi changed the base branch from flutter-3.47-candidate.0 to flutter-3.50-candidate.0 November 18, 2026 04:54
@bkonyi
bkonyi marked this pull request as ready for review November 18, 2026 04:54

@gemini-code-assist gemini-code-assist Bot 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 introduces handling for cross-device link errors (EXDEV) within the Flutter tools file system error handling. It updates the native assets installation logic to overwrite the native_assets.json manifest in place rather than deleting it first, avoiding cross-device copy issues. Corresponding tests are added to verify the new error handling and manifest overwrite behavior. There are no review comments, and I have no feedback to provide.

@bkonyi

bkonyi commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Should be good to go now!

@justinmc justinmc 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 👍

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit

auto-submit Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

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

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 18, 2026
@auto-submit
auto-submit Bot merged commit 9dcfb0a into flutter:flutter-3.50-candidate.0 Nov 18, 2026
5 checks passed
@victorsanni victorsanni mentioned this pull request Nov 18, 2026
11 tasks done
auto-submit Bot pushed a commit that referenced this pull request Nov 19, 2026
Adds `CHANGELOG.md` entries for the 3.50.1 stable hotfix (#196756, #196721, #196127, #196035, #196418, #196800, #196796, #196895, #196383, #196923). Omits the infra-only #196760 and the `engine.version` sync #196932.

Tracker: #196743

### Edits to cherry-pick changelog descriptions
- All entries use the cherry-pick PR's "Changelog Description" verbatim, except for backticks around code terms (#196756, #196418, #196895, #196923) and a comma and trailing period in the #196418 entry.
- #196923 also cherry-picks #195006, so it has two entries, as listed in its "Changelog Description".

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

**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.
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 cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.