flutter / flutter/flutter

flutter update-packages fails after Device Lab tests create pubspecs under build/ios/SourcePackages

Open
#191,417 1 comment 0 reactions 1 assignee Claimed by @bkonyi View on GitHub
from: manual-qa has reproducible steps P2 team-tool tool triaged-tool workaround available
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

#### Description

While running Device Lab tests from the Flutter repository, `build` folders are created under some test projects. These generated build folders contain third-party package sources under `build/ios/SourcePackages`.

After running the tests, `flutter update-packages` fails during pubspec verification because it discovers a generated third-party `pubspec.yaml` that does not contain a checksum.

#### Steps to reproduce

1. From the Flutter repository, run a Device Lab test. For example:

```bash
cd dev/devicelab
dart bin/test_runner.dart test -t android_defines_test
```

The test completes successfully.

2. After the test completes, the following generated files are present:

dev/integration_tests/ui/build/ios/SourcePackages/google_mobile_ads-8.0.0/pubspec.yaml
dev/integration_tests/ui/build/ios/SourcePackages/google_mobile_ads-8.0.0/example/pubspec.yaml

3. Run the following from the Flutter repository root:

```bash
flutter update-packages
```

### Expected results

Running an Android Device Lab test should not create iOS `build/ios/SourcePackages` directories containing third-party package sources.

After the Device Lab test completes, `flutter update-packages` should complete successfully without encountering generated third-party `pubspec.yaml` files.

### Actual results

After running Android Device Lab tests, unexpected iOS build directories are created under the test projects, for example:

```text
dev/integration_tests/ui/build/ios/SourcePackages/google_mobile_ads-8.0.0/
```

This directory contains third-party pubspec.yaml files, including:

dev/integration_tests/ui/build/ios/SourcePackages/google_mobile_ads-8.0.0/pubspec.yaml
dev/integration_tests/ui/build/ios/SourcePackages/google_mobile_ads-8.0.0/example/pubspec.yaml

These generated directories should not be created as part of running the Android Device Lab test. Their presence causes flutter update-packages to scan the generated third-party pubspec and fail with:

Pubspec in .../build/ios/SourcePackages/google_mobile_ads-8.0.0/example does not contain a checksum.

##### Notes :

I observed the same generated structure in multiple projects after running Device Lab tests, including:

- dev/integration_tests/display_cutout_rotation/build/ios/SourcePackages/google_mobile_ads-8.0.0/
- dev/integration_tests/hybrid_android_views/build/ios/SourcePackages/google_mobile_ads-8.0.0/
- dev/integration_tests/android_verified_input/build/ios/SourcePackages/google_mobile_ads-8.0.0/
- dev/benchmarks/complex_layout/build/ios/SourcePackages/google_mobile_ads-8.0.0/

### Code sample

Code sample

```dart
[Paste your code here]
```

### Screenshots or Video

Screenshots / Video demonstration

https://github.com/user-attachments/assets/87250f3c-b90d-46b6-a756-c5a18d04154b

### Logs

Logs

```console

[update-packages-failure.log](https://github.com/user-attachments/files/31267036/update-packages-failure.log)

[android-defines-update-packages-failure.log](https://github.com/user-attachments/files/31267291/android-defines-update-packages-failure.log)

```

### Flutter Doctor output

Doctor output

```console
Flutter (Channel stable, 3.47.1, on macOS 27.0 26A5416b darwin-arm64, locale en-US) [474ms]
• Flutter version 3.47.1 on channel stable at /Users/preethikandukuri/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6655482ec0 (20 hours ago), 2026-08-19 10:07:23 -0700
• Engine revision 5d53178869
• Dart version 3.13.1
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop,
enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use,
enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [10.6s]
• Android SDK at /Users/preethikandukuri/Library/Android/sdk
• Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
• Platform android-37.0, build-tools 37.0.0
• ANDROID_HOME = /Users/preethikandukuri/Library/Android/sdk
• Java binary at: /Applications/Android Studio RC.app/Contents/jbr/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 25.0.3+-15898627-b508.16)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 27.0) [1,002ms]
• Xcode at /Applications/Xcodebeta275.app/Contents/Developer
• Build 27A5237l
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (4 available) [6.4s]
• Pixel 10 (mobile) • 5A311FDCR0001H • android-arm64 • Android 17 (API 37)
• iPad (wireless) (mobile) • 00008122-001A08DC22B9801C • ios • iOS 27.0 24A5418b
• macOS (desktop) • macos • darwin-arm64 • macOS 27.0 26A5416b darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 151.0.7922.138

[✓] Network resources [508ms]
• All expected network resources are available.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.