IDE hangs on startup: "Unable to get Documents Folder: The system cannot find the file specified."

I have clean installed arduino IDE many times using revo uninstall, and using portable version but this doesnt seem to go away, ive tried to read through the stuff it gives me in powershell but it doesnt make much sense to me i was hoping someone would be able to guide me in the right direction and let me know how to fix this error Ill post the output from powershell in the code below.

2024-08-13T07:46:20.776Z daemon INFO time="2024-08-13T09:46:20+02:00" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-08-13T07:46:20.782Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Using config file: c:\\Users\\steph\\.arduinoIDE\\arduino-cli.yaml"
time="2024-08-13T09:46:20+02:00" level=info msg="arduino-cli.exe version 0.35.3"
2024-08-13T07:46:20.782Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Executing `arduino-cli daemon`"
2024-08-13T07:46:20.782Z daemon INFO Daemon is now listening on 127.0.0.1:52356
{"IP":"127.0.0.1","Port":"52356"}
2024-08-13T07:46:20.797Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
2024-08-13T07:46:20.797Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
    at Socket.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:43051)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
2024-08-13T07:46:20.797Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-08-13T07:46:20.802Z daemon INFO time="2024-08-13T09:46:20+02:00" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-08-13T07:46:20.806Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Using config file: c:\\Users\\steph\\.arduinoIDE\\arduino-cli.yaml"
time="2024-08-13T09:46:20+02:00" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-08-13T09:46:20+02:00" level=info msg="Executing `arduino-cli daemon`"
2024-08-13T07:46:20.807Z daemon INFO Daemon is now listening on 127.0.0.1:52357
{"IP":"127.0.0.1","Port":"52357"}
2024-08-13T07:46:20.823Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
2024-08-13T07:46:20.823Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
    at Socket.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:43051)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
2024-08-13T07:46:20.823Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-08-13T07:46:20.828Z daemon INFO time="2024-08-13T09:46:20+02:00" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-08-13T07:46:20.832Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Using config file: c:\\Users\\steph\\.arduinoIDE\\arduino-cli.yaml"
time="2024-08-13T09:46:20+02:00" level=info msg="arduino-cli.exe version 0.35.3"
2024-08-13T07:46:20.832Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Executing `arduino-cli daemon`"
2024-08-13T07:46:20.833Z daemon INFO Daemon is now listening on 127.0.0.1:52358
{"IP":"127.0.0.1","Port":"52358"}
2024-08-13T07:46:20.849Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
2024-08-13T07:46:20.849Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
    at Socket.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:43051)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
2024-08-13T07:46:20.849Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-08-13T07:46:20.854Z daemon INFO time="2024-08-13T09:46:20+02:00" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-08-13T07:46:20.858Z daemon INFO time="2024-08-13T09:46:20+02:00" level=info msg="Using config file: c:\\Users\\steph\\.arduinoIDE\\arduino-cli.yaml"
time="2024-08-13T09:46:20+02:00" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-08-13T09:46:20+02:00" level=info msg="Executing `arduino-cli daemon`"
2024-08-13T07:46:20.859Z daemon INFO Daemon is now listening on 127.0.0.1:52359
{"IP":"127.0.0.1","Port":"52359"}
2024-08-13T07:46:20.875Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
2024-08-13T07:46:20.875Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
    at Socket.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:43051)

Hi @stephnot.

On startup, Arduino IDE queries the Windows operating system for the location of your user "Documents" folder. The reason Arduino IDE is not starting is because when it makes this query Windows responds that the "Documents" folder doesn't exist. Since that folder should always exist, the IDE fails to start with this "Unable to get Documents Folder: ..." error.

Traditionally, the default location of the "Documents" folder was a path with this format:

C:\Users\<username>\Documents

(where <username> is your Windows username)

Although that is the default, it is possible to customize the location of this folder. If the location was changed to a drive that is not accessible (e.g., a USB drive that is unplugged), that could cause the "Unable to get Documents Folder: ..." error.

If you have the Windows "OneDrive folder syncing" feature enabled, the "Documents" folder is located under the OneDrive storage by default, at a path with this format:

C:\Users\<username>\OneDrive\Documents

(where the name of the Documents folder might actually be the localized equivalent)

It is also possible the folder could be located on alternative cloud storage providers (e.g., Dropbox.

When other users reported encountering this "Unable to get Documents Folder: ..." error, we often found that the problem was caused by them having disabled OneDrive in some manner, or else by them not having a connection to the OneDrive service.

Can you think of anything unusual about your system that might cause Arduino IDE to not be able to access your "Documents" folder?

I dont see there being any reason to why arduino IDE cannot view documents, ive removed all cloud storage on my device and my documents folder is in: C:\Users\steph\Documents so that is why i was confused about the output wasnt really sure where to go from here

You can try the following procedure to correct the configuration of the "Documents" folder:

  1. Start Windows "File Explorer".
  2. Right click on the "Documents" folder.
    A context menu will open.
  3. Select "Properties" from the menu.
    The "Documents Properties" dialog will open.
  4. Select the "Location" tab in the "Documents Properties" dialog.
  5. Click the "Restore Default" button.
  6. Verify that the path shown in the field now has the following format:
    C:\Users\<username>\Documents
    
    (where <username> is your Windows username)
  7. Click the "OK" button.
    The "Documents Properties" dialog will close.

Oh it looks like in the properties tab of the documents folder it was redirecting to onedrive when that is not an actual file anymore since i removed it.


This is the first message I get when i try to apply,
This is the message i get if i press either Yes or No

oh it looks like it worked thanks so much for the help

You are welcome. I'm glad it is working now.

Regards, Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.