Skip to content

[tool_crash] _YamlAssertionError: (#0 YamlEditor._performEdit (package:yaml_edit/src/editor.dart:576:7)) #191060

Closed

Description

@hanskokx

Command

dart fix --apply --code=migrate_design_widgets

Steps to Reproduce

YAML before edit:

include: package:arcane_analysis/analysis_options.yaml

analyzer:
exclude:
[
build/,
lib/
/.mapper.dart,
lib/
/.g.dart,
packages/
/.mapper.dart,
packages/
/**.g.dart,
packages/icons/lib/icons.dart,
]

YAML after edit:

include: package:arcane_analysis/analysis_options.yaml

analyzer:
exclude:
[
build/,
lib/
/.mapper.dart,
lib/
/.g.dart,
packages/
/.mapper.dart,
packages/
/.g.dart,
packages/icons/lib/icons.dart,
, android/
]

Logs

_YamlAssertionError: (#0 YamlEditor._performEdit (package:yaml_edit/src/editor.dart:576:7))

#0      YamlEditor._performEdit (package:yaml_edit/src/editor.dart:576:7)
#1      YamlEditor.insertIntoList (package:yaml_edit/src/editor.dart:339:5)
#2      YamlEditor.appendToList (package:yaml_edit/src/editor.dart:295:5)
#3      AnalysisOptionsMigration.migrate (package:flutter_tools/src/migrations/analysis_options_migration.dart:87:22)
#4      ProjectMigration.run (package:flutter_tools/src/base/project_migrator.dart:96:22)
#5      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:431:21)
#6      FlutterProject.regeneratePlatformSpecificTooling (package:flutter_tools/src/project.dart:388:12)
#7      PackagesGetCommand.runCommand.<anonymous closure> (package:flutter_tools/src/commands/packages.dart:400:23)
<asynchronous suspension>
#8      Pool.forEach.run (package:pool/pool.dart:183:19)
<asynchronous suspension>
#9      Pool.withResource (package:pool/pool.dart:127:14)
<asynchronous suspension>
#10     Future.wait.<anonymous closure> (dart:async/future.dart:567:21)
<asynchronous suspension>
#11     Pool.forEach.onListen.<anonymous closure> (package:pool/pool.dart:203:23)
<asynchronous suspension>
#12     _StreamController.close (dart:async/stream_controller.dart:640:3)
<asynchronous suspension>
#13     _nullDataHandler (dart:async/stream_impl.dart:549:1)
<asynchronous suspension>
[✓] Flutter (Channel stable, 3.47.0, on macOS 26.5.2 25F84 darwin-arm64, locale en-US) [258ms]
    • Flutter version 3.47.0 on channel stable at /Users/hans/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cf2416426 (2 days ago), 2026-08-11 11:53:49 -0700
    • Engine revision 5f77625673
    • Dart version 3.13.0
    • 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) [974ms]
    • Android SDK at /Users/hans/Library/Android/sdk
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
    • Platform android-37.1, build-tools 37.0.0
    • ANDROID_SDK_ROOT = /Users/hans/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 25.0.2+-15348964-b329.117)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.6) [566ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17F113
    • CocoaPods version 1.16.2

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

[✓] Connected device (2 available) [5.7s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 26.5.2 25F84 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 151.0.7922.137
    ! Error: Browsing on the local area network for Hackberry Hans iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

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

• No issues found!

Flutter Application Metadata

Type: app
Version: 0.1.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: stable
Creation framework version: 924134a

Plugins

file_selector_ios-0.5.3+5
flutter_secure_storage_darwin-0.3.2
media_kit_libs_ios_video-1.1.4
media_kit_video-2.0.1
package_info_plus-10.2.1
path_provider_foundation-2.6.0
share_plus-13.3.0
sqflite_darwin-2.4.3+1
url_launcher_ios-6.4.1
video_player_avfoundation-2.11.0
wakelock_plus-1.7.0
file_selector_android-0.5.2+9
flutter_secure_storage-10.3.1
jni-1.0.3
jni_flutter-1.0.2
media_kit_libs_android_video-1.3.8
path_provider_android-2.3.1
sqflite_android-2.4.3
url_launcher_android-6.3.32
video_player_android-2.12.0
file_selector_macos-0.9.5
media_kit_libs_macos_video-1.1.4
screen_retriever_macos-0.2.2
url_launcher_macos-3.2.5
window_manager-0.5.2
file_selector_linux-0.9.4
flutter_secure_storage_linux-3.0.2
media_kit_libs_linux-1.2.1
path_provider_linux-2.2.2
screen_retriever_linux-0.2.2
url_launcher_linux-3.2.2
file_selector_windows-0.9.3+5
flutter_secure_storage_windows-4.2.2
media_kit_libs_windows_video-1.0.11
path_provider_windows-2.3.0
screen_retriever_windows-0.2.2
url_launcher_windows-3.1.5
file_selector_web-0.9.5
flutter_secure_storage_web-2.1.1
url_launcher_web-2.4.3
video_player_web-2.4.0

Activity

  1. suryaKommana2662 commented on Aug 13, 2026

    @suryaKommana2662
    Contributor

    @hanskokx Thanks for the detailed stack trace and YAML before/after examples. The issue appears to be in the Flutter tooling's AnalysisOptionsMigration, but the report doesn't currently include a minimal reproducible code/project or complete steps to reproduce the crash. Could you please provide a minimal reproduction project, including the relevant analysis_options.yaml, along with the exact steps/commands required to trigger the _YamlAssertionError? and also confirm whether the issue is reproducible on the latest stable Flutter release.

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    and removed
    in triagePresently being triaged by the triage team
    on Aug 13, 2026
  3. hanskokx commented on Aug 16, 2026

    @hanskokx
    Author

    I narrowed down the issue to this:

    When the exclude block is in a list (e.g, [...]), an error is thrown:

    include: package:arcane_analysis/analysis_options.yaml
    
    analyzer:
      exclude:
        [
          build/**,
          lib/**/**.mapper.dart,
          lib/**/**.g.dart,
          packages/**/**.mapper.dart,
          packages/**/**.g.dart,
        ]

    However, if I break each item into its own list item, it works fine:

    include: package:arcane_analysis/analysis_options.yaml
    
    analyzer:
      exclude:
        - build/**
        - lib/**/**.mapper.dart
        - lib/**/**.g.dart
        - packages/**/**.mapper.dart
        - packages/**/**.g.dart

    Both are technically valid syntax, I believe?

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 16, 2026
  5. suryaKommana2662 commented on Aug 17, 2026

    @suryaKommana2662
    Contributor

    @hanskokx Thanks for the additional details and for narrowing down the YAML syntax that triggers the issue. This is helpful for further investigation. Routing this issue to team-tool for the Flutter tooling team to investigate.

  6. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Aug 17, 2026
  7. added
    triaged-toolTriaged by Flutter Tool team
    P2Important issues not at the top of the work list
    on Aug 18, 2026
  8. self-assigned this
    on Aug 18, 2026
  9. hanskokx commented on Aug 21, 2026

    @hanskokx
    Author

    As an aside, what the tool is trying to add is excludes for android/**, ios/**, etc. These excludes already exist in my custom analyzer ruleset. Therefore, I believe there's a secondary bug wherein these rules should not be added. Should I open a second bug for this behavior?

  10. github-actions commented on Sep 4, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: crashStack traces logged to the consoleteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions