Skip to content

Error while run for macOS #5784

Closed
Closed

Description

@ElRochito

Describe the bug
When I run on macOS, I've got this error :

_createDevFS: (-32603) Internal error
_createDevFS: Unexpected exception:PathAccessException: Creation of temporary directory failed, path = '/tmp' (OS Error: Operation not permitted, errno = 1)

To Reproduce
Steps to reproduce the behavior:

  1. Run Flutter: New Project
  2. Choose the path and the project name
  3. Open lib/main.dart
  4. Select macOS device
  5. Click run
Image

Expected behavior
App should be run

Screenshots

Image

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version: macOS 13
  • VS Code version: 1.105.1
  • Dart extension version: 3.122.0
  • Dart/Flutter SDK version: Flutter 3.35.7 / Dart 3.9.2
  • Target device: macOS

Activity

  1. added
    in flutter
    on Nov 6, 2025
  2. DanTup commented on Nov 6, 2025

    @DanTup
    Member

    Does the same happen if you use flutter run from the terminal? If so, this may need filing at https://github.com/flutter/flutter/ since it won't be fixable by the VS Code extension.

    I would first check whether you have a folder /tmp and if so, whether your user has access to it, since the error seems to indicate it can't access that path.

  3. added
    awaiting info
    on Nov 6, 2025
  4. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    @DanTup
    When I create a flutter app via command-line with flutter create my-projectand I run always with command-line via flutter run -d macos it's works

    It fails only when I run over VSCode

    My path is correct : it's exists and I have right acces

  5. DanTup commented on Nov 6, 2025

    @DanTup
    Member

    When I create a flutter app via command-line with flutter create my-project and I run always with command-line via flutter run -d macos it's works

    Did you try both with the same project, rather than create a new one? I'm trying to understand if the difference is VS Code vs Terminal, or it might be something in the original project you created causing this.

    If all projects fail in VS Code but work in the terminal, could you try:

    1. Using the built-in terminal from VS Code to run flutter run -d macos to see if that works or fails (this will help understand if the issue is VS Code in general, or only when the extension launches the debug session)
    2. If it works from the VS Code built-in terminal, can you try try running flutter run -d macos --start-paused and see whether that works or fails? (note: if it works, the app will start paused and may just appear as a white screen - you can just terminate it - we're mostly trying to see whether it's crashing with the same error as above)

    Thanks!

  6. DanTup commented on Nov 6, 2025

    @DanTup
    Member

    There is also a similar report at flutter/flutter#173450 that might be worth reading through. In particular some comments about what some users tried and may have fixed it:

  7. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    @DanTup

    From the VS Code build-in terminal, this command flutter run -d macos works but this command flutter run -d macos --start-paused with the same error _createDevFS: Unexpected exception:PathAccessException: Creation of temporary directory failed, path = '/tmp' (OS Error: Operation not permitted, errno= 1) and a black screen

  8. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    @DanTup

    1. I reboot my mac
    2. I launch VSCode
    3. I run to macOS with Flutter extension => it's works !
    4. I kill app
    5. I relaunch
    6. I've got again the error
  9. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    I try all solutions posted on your links but always got error

  10. DanTup commented on Nov 6, 2025

    @DanTup
    Member

    Thanks - so things work the first time after a reboot, but fail for subsequent attempts? And the issue only occurs when you use --start-paused?

    Does it fail from an external terminal when using --start-paused too?

  11. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    Yes works once after reboot and after got error.

    The issue occurs using flutter run -d macos --start-paused or flutter run -d macos on build-in vscode terminal or macos terminal

  12. ElRochito commented on Nov 6, 2025

    @ElRochito
    Author

    After many researches, it seems an Apple restriction, wrote on DevFS is possible once per reboot ...

    So either we restart the computer each time, or we run with --release or --profile not an ideal approach for developing or debugging correctly

  13. DanTup commented on Nov 7, 2025

    @DanTup
    Member

    Thanks for the additional testing. I've added some notes on flutter/flutter#173450 with a link back here (feel free to add anything you think is relevant that I've missed).

    Based on the title of that issue and that you're also on MacOS 13, the issue could be specific to that OS version. Unfortunately I couldn't find much online about this issue, although these two StackOverflow questions have some ideas about changing permissions that may or may not help:

    I don't think there's anything we can do from the VS Code extension here since this seems to be affecting Flutter outside of VS Code too (when launched with a debugger), so I'll close this in favour of flutter/flutter#173450 to keep further troubleshooting all in one place.

    Thanks!

  14. added
    upstream in dart / flutter
    and removed
    in flutter
    awaiting info
    on Nov 7, 2025
  15. ElRochito commented on Nov 7, 2025

    @ElRochito
    Author

    @DanTup Yes sorry, I thought the problem was related to the VS Code extension, but it wasn’t.
    Thanks for your responsiveness.

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

    upstream in dart / flutter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions