Skip to content

[tool_crash] FileSystemException: Creation failed, OS Error: A file cannot be created if it already exists., errno = 183 #90028

Closed

Description

@jimbo-jones1313

Activity

  1. changed the title [-][tool_crash] FileSystemException: Creation failed, OS Error: Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist., errno = 183[/-] [+][tool_crash] FileSystemException: Creation failed, OS Error: A file cannot be created if it already exists., errno = 183[/+] on Sep 14, 2021
  2. darshankawar commented on Sep 14, 2021

    @darshankawar
    Member

    A similar / related issue is: #74227

  3. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: crashStack traces logged to the console
    and removed
    in triagePresently being triaged by the triage team
    on Sep 14, 2021
  4. jimbo-jones1313 commented on Sep 17, 2021

    @jimbo-jones1313
    Author

    Update: after playing around with the Visual Studio packages, the dependencies were finally cleared up (thank you!), but now I'm back to the previous error (just some of the details have changed):

    Flutter could not download and/or extract https://storage.googleapis.com/flutter_infra_release/flutter/d5adde01dd672ba4f6819d85218beb01142dca27/flutter-web-sdk-windows-x64.zip. Ensure you have network connectivity and all of the required dependencies listed at flutter.dev/setup.
    The original exception was: FileSystemException: Creation failed, path = 'H:\flutter\bin\cache\flutter_web_sdk\flutter_web_sdk/lib/ui/src/ui' (OS Error: Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist.
    , errno = 183).

    I have tried deleting the 'flutter\bin\cache\flutter_web_sdk\flutter_web_sdk' folder (the last one in the hierarchy), and get various error messages.
    Repeating the "run" without any deletions just got me this:

    Flutter failed to check for directory existence at "H:\flutter\bin\cache\flutter_web_sdk". The flutter tool cannot access the file or directory.
    Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user
    flutter_06.log
    flutter_05.log

    It looks like each error refers to a different file that supposedly already exists; I will try running this over and over again; maybe it will eventually run out of existing files it will try to create.

  5. DavidOrakpo commented on May 18, 2023

    @DavidOrakpo
  6. huycozy commented on Aug 7, 2023

    @huycozy
    Member

    Leaving information from duplicate issue #131978 on new Flutter version for better tracking (the stack trace from OP is on a file, so it's not convenient to quickly capture information)

    On stable/3.10.6 with command: flutter build windows

    FileSystemException: Cannot create link, OS Error: No se puede crear un archivo que ya existe.
    , errno = 183
    
    #0      _Link.throwIfError (dart:io/link.dart:254:7)
    #1      _Link.createSync (dart:io/link.dart:182:5)
    #2      ForwardingLink.createSync (package:file/src/forwarding/forwarding_link.dart:20:16)
    #3      ForwardingLink.createSync (package:file/src/forwarding/forwarding_link.dart:20:16)
    #4      _createPlatformPluginSymlinks (package:flutter_tools/src/flutter_plugins.dart:1055:12)
    #5      createPluginSymlinks (package:flutter_tools/src/flutter_plugins.dart:985:5)
    #6      buildWindows (package:flutter_tools/src/windows/build_windows.dart:64:3)
    #7      BuildWindowsCommand.runCommand (package:flutter_tools/src/commands/build_windows.dart:56:11)
    <asynchronous suspension>
    #8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
    <asynchronous suspension>
    #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    #10     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
    <asynchronous suspension>
    #11     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
    <asynchronous suspension>
    #12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    #13     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
    <asynchronous suspension>
    #14     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
    <asynchronous suspension>
    #15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    <asynchronous suspension>
    
  7. milindgoel15 commented on Oct 14, 2023

    @milindgoel15

    Any temporary workaround for this issue?

  8. robinmonsere commented on Feb 12, 2024

    @robinmonsere

    Any updates on this? Getting the same exact error with flutter run -d windows -v

  9. 20 remaining items

  10. loic-sharma commented on Jul 29, 2025

    @loic-sharma
    Member

    Redirecting this back to the tool team. One comment indicates this problem can happen when downloading artifacts (link), another comment indicates this problem can happen when using Android Studio (here), which is rarely used to build Windows app. I suspect this problem affects all Flutter targets if the host machine is on Windows.

    For folks hitting this issue, please upvote 👍 the issue itself. This will help us prioritize. Thanks!

  11. anders-au commented on Aug 24, 2025

    @anders-au

    I had a variant of this error occur in Windows VS Code due to a downloaded asset file that was marked as Read Only by Windows. This meant it was able to be copied to the build once, but flutter subsequently was not able to delete and replace it when rebuilding. Unchecking the Read Only property on any problem files in Windows Explorer fixed my issue.

    Target debug_android_application failed: PathExistsException: Cannot copy file to 'C:build/dir/path.ext', path = 'C:\path\to\problem\asset.ext' (OS Error: Cannot create a file when that file already exists.

    Image
  12. github-actions commented on Sep 15, 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.

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

Metadata

Metadata

Assignees

No one assigned

    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