Skip to content

Misleading error message when save fails due to blocked write access to file system #2880

@farhadsadeghipour

Description

@farhadsadeghipour

Describe the problem

When attempting to use "Save As" inside the default Sketchbook location (Documents\Arduino), the IDE shows the following error:

File Not Found

However, the actual cause is that Windows Controlled Folder Access is blocking write access to the Documents folder.

Evidence:

  • The IDE appears in Windows Security → Protection History as blocked multiple times.
  • After adding arduino-ide.exe to the "Allowed apps" list, the problem is immediately resolved.
  • Saving to another drive (e.g., D:) works without issue.

Current behavior is misleading and may cause confusion, since the folder and file do exist.

This is primarily a UX issue, but improving error handling here would significantly help Windows users.

To reproduce

  1. Enable the Windows "Controlled Folder Access" feature.
  2. Attempt to save a sketch to a location under the controlled folder.

🐛 A misleading message is shown when saving fails:

File Not Found

Expected behavior

Show an appropriate error message when sketch save fails due to blocked write access to the parent folder.

Instead of showing "File Not Found", the IDE should:

  • Detect and differentiate permission-related errors (EACCES / EPERM)
  • Display a clearer message such as:
    "Permission denied. Windows Controlled Folder Access may be blocking access to this folder."
  • Optionally suggest checking Windows Security → Ransomware Protection.

Arduino IDE version

2.3.8

Operating system

Windows

Operating system version

  • 10
  • 11

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions