Skip to content

Handle --output directory passed to assemble with no write access gracefully #83053

Closed

Description

@zanderso

Currently this will crash the tool with:

Thread 0 main threadFileSystemException: FileSystemException: Creation failed, path = '/.dart_tool' (OS Error: Read-only file system, errno = 30)
at _Directory.createSync(directory_impl.dart:133)
at _Directory.createSync(directory_impl.dart:128)
at _Directory.createSync(directory_impl.dart:128)
at ForwardingDirectory.createSync(forwarding_directory.dart:20)
at ErrorHandlingDirectory.createSync.<anonymous closure>(error_handling_io.dart:419)
at _runSync(error_handling_io.dart:573)
at ErrorHandlingDirectory.createSync(error_handling_io.dart:418)
at FlutterBuildSystem.build(build_system.dart:571)
at AssembleCommand.runCommand(assemble.dart:318)
at FlutterCommand.verifyThenRunCommand(flutter_command.dart:1192)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1043)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:196)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:284)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:232)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:62)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at main(executable.dart:91)
at <asynchronous gap>(async)

/cc @jonahwilliams

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: fatal crashCrashes that terminate the process
    on May 20, 2021
  2. jonahwilliams commented on May 20, 2021

    @jonahwilliams
    Contributor
  3. added
    t: xcode"xcodebuild" on iOS and general Xcode project management
    on May 20, 2021
  4. jmagman commented on May 20, 2021

    @jmagman
    Member
    assemble --no-version-check --output=/ -dTargetPlatform=ios -dTargetFile=lib/main.dart -dBuildMode=debug -dIosArchs= -dSdkRoot= -dSplitDebugInfo= -dTreeShakeIcons= -dTrackWidgetCreation= -dDartObfuscation= -dEnableBitcode=  --ExtraGenSnapshotOptions= --DartDefines= --ExtraFrontEndOptions= debug_ios_bundle_flutter_assets
    
  5. jonahwilliams commented on May 20, 2021

    @jonahwilliams
    Contributor

    Not sure why we're creating the .dart_tool directory, need to check if we're assuming that this is the project directory for some reason

  6. added
    P2Important issues not at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    on Sep 26, 2023
  7. matanlurey commented on Jul 10, 2025

    @matanlurey
    Contributor

    @bkonyi 👁️

  8. bkonyi commented on Jul 10, 2025

    @bkonyi
    Contributor

    I don't think this can happen anymore, at least not from xcode_backend.sh as described in #83053 (comment).

    However, I think we can handle this better in the future by handling EROFS in error_handling_io.dart.

  9. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 10, 2025
  10. self-assigned this
    on Jul 10, 2025
  11. removed
    P2Important issues not at the top of the work list
    on Jul 10, 2025
  12. 7 remaining items

  13. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Jan 29, 2026
  14. self-assigned this
    on Feb 3, 2026
  15. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jun 9, 2026
  16. flutter-triage-bot commented on Jun 9, 2026

    @flutter-triage-bot

    This issue is assigned to @bkonyi but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  17. flutter-triage-bot commented on Aug 25, 2026

    @flutter-triage-bot

    This issue was assigned to @bkonyi but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

  18. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Aug 25, 2026
  19. self-assigned this
    on Sep 8, 2026
  20. github-actions commented on Sep 23, 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.

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

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: fatal crashCrashes that terminate the processfound in release: 1.22Found to occur in 1.22t: xcode"xcodebuild" on iOS and general Xcode project managementteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.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