IDE hangs on startup: "Unable to get Documents Folder"

I'm facing same problem can you help me?

Hi @kashafpc15. Please add a forum reply here to tell us which operating system you are using (e.g., "Windows")?

I ask because I would like to give you the appropriate instructions for your operating system.

Windows 11 and current Arduino IDE @ptillisch

I'm going to ask you to provide some additional information that might help us to identify the problem.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Close all Arduino IDE windows if the IDE is already running.
  2. Start Windows "File Explorer".
  3. Open the Arduino IDE installation folder.
    The default installation location is at one of the following paths:
    • C:\Program Files\Arduino IDE
      
    • C:\Users\<username>\AppData\Local\Programs\Arduino IDE
      
      (where <username> is your Windows username)
      :exclamation: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  4. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
    A context menu will open
  5. Select "Open PowerShell window here" from the menu.
    Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  6. Type the following command:
    & ".\Arduino IDE"
    
  7. Press the Enter key.
    Debug output should now be printed to the PowerShell window as Arduino IDE starts.
  8. Wait until you are sure the IDE startup has gone into the hang state
    (as indicated by no additional output being printed to the terminal).
  9. Switch back to the PowerShell window if the Arduino IDE window took the focus.
  10. Press the Ctrl+Shift+A keyboard shortcut.
    This will select all the text in the PowerShell window.
  11. Press the Ctrl+C keyboard shortcut.
    This will copy the contents of the PowerShell window to the clipboard.
  12. Open a forum reply here by clicking the "Reply" button.
  13. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  14. Press the Ctrl+V keyboard shortcut.
    This will paste the output into the code block.
  15. Move the cursor outside of the code block markup before you add any additional text to your reply.
  16. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

PS C:\Users\kashaf\AppData\Local\Programs\Arduino IDE> & ".\Arduino IDE"
PS C:\Users\kashaf\AppData\Local\Programs\Arduino IDE>
Arduino IDE 2.3.2
Checking for frontend application configuration customizations. Module path: C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.2" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "0.35.3" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-02-20T10:04:35.814Z" (type of string)
Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{}},"defaultLocale":"","validatePreferencesSchema":false,"preferences":{"window.title":"${rootName}${activeEditorShort}${appName}","files.autoSave":"afterDelay","editor.minimap.enabled":false,"editor.tabSize":2,"editor.scrollBeyondLastLine":false,"editor.quickSuggestions":{"other":false,"comments":false,"strings":false},"editor.maxTokenizationLineLength":500,"editor.bracketPairColorization.enabled":false,"breadcrumbs.enabled":false,"workbench.tree.renderIndentGuides":"none","explorer.compactFolders":false},"appVersion":"2.3.2","cliVersion":"0.35.3","buildDate":"2024-02-20T10:04:35.814Z"}
Starting backend process. PID: 37284
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/kashaf/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2024-09-07T12:36:15.144Z root INFO Backend Object.initialize: 7.0 ms [Finished 0.847 s after backend start]
2024-09-07T12:36:15.145Z root INFO Backend Object.configure: 5.5 ms [Finished 0.847 s after backend start]
2024-09-07T12:36:15.145Z root INFO Backend s.onStart: 2.6 ms [Finished 0.847 s after backend start]
2024-09-07T12:36:15.146Z root INFO Backend s.configure: 0.5 ms [Finished 0.883 s after backend start]
2024-09-07T12:36:15.148Z root INFO Backend d.onStart: 0.4 ms [Finished 0.883 s after backend start]
2024-09-07T12:36:15.150Z root INFO Backend d.configure: 0.1 ms [Finished 0.883 s after backend start]
2024-09-07T12:36:15.152Z root INFO Backend d.initialize: 36.0 ms [Finished 0.884 s after backend start]
2024-09-07T12:36:15.152Z root INFO Backend c.onStart: 0.3 ms [Finished 0.884 s after backend start]
2024-09-07T12:36:15.153Z root INFO Backend a.configure: 1.9 ms [Finished 0.886 s after backend start]
2024-09-07T12:36:15.155Z config INFO >>> Initializing CLI configuration...
2024-09-07T12:36:15.155Z root INFO Backend c.initialize: 0.8 ms [Finished 0.886 s after backend start]
2024-09-07T12:36:15.155Z root INFO Backend R.onStart: 1.8 ms [Finished 0.887 s after backend start]
2024-09-07T12:36:15.156Z config INFO Loading CLI configuration from c:\Users\kashaf\.arduinoIDE\arduino-cli.yaml...
2024-09-07T12:36:15.156Z daemon INFO Starting daemon from C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-09-07T12:36:15.157Z root INFO Backend a.initialize: 0.9 ms [Finished 0.890 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend w.onStart: 2.0 ms [Finished 0.891 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend r.configure: 4.1 ms [Finished 0.892 s after backend start]
2024-09-07T12:36:15.157Z discovery-log INFO start
2024-09-07T12:36:15.157Z discovery-log INFO start new deferred
2024-09-07T12:36:15.157Z root INFO Backend d.initialize: 0.7 ms [Finished 0.892 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend y.onStart: 3.0 ms [Finished 0.895 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend r.configure: 2.3 ms [Finished 0.895 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend a.onStart: 0.6 ms [Finished 0.896 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend h.configure: 0.5 ms [Finished 0.896 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend s.configure: 0.2 ms [Finished 0.897 s after backend start]
2024-09-07T12:36:15.157Z root INFO Backend l.configure: 0.1 ms [Finished 0.897 s after backend start]
2024-09-07T12:36:15.160Z root INFO Theia app listening on http://127.0.0.1:53238.
2024-09-07T12:36:15.160Z root INFO Finished starting backend application: 3.3 ms [Finished 0.900 s after backend start]
2024-09-07T12:36:15.161Z root WARN The local plugin referenced by local-dir:/c%3A/Users/kashaf/.arduinoIDE/plugins does not exist.
2024-09-07T12:36:15.161Z root WARN The local plugin referenced by local-dir:/c%3A/Users/kashaf/.arduinoIDE/extensions does not exist.
2024-09-07T12:36:15.161Z root WARN The local plugin referenced by local-dir:C:\Users\kashaf\.arduinoIDE\plugins does not exist.
2024-09-07T12:36:15.172Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":["https://arduino.esp8266.com/stable/package_esp8266com_index.json"]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"builtin":{"libraries":"C:\\Users\\kashaf\\AppData\\Local\\Arduino15\\libraries"},"data":"c:\\Users\\kashaf\\AppData\\Local\\Arduino15","downloads":"C:\\Users\\kashaf\\AppData\\Local\\Arduino15\\staging","user":"c:\\Users\\kashaf\\Documents\\Arduino"},"library":{"enable_unsafe_install":false},"locale":"en","logging":{"file":"","format":"text","level":"info"},"metrics":{"addr":":9090","enabled":true},"output":{"no_color":false},"sketch":{"always_export_binaries":false},"updater":{"enable_notification":true}}
2024-09-07T12:36:15.172Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2024-09-07T12:36:15.172Z config INFO Loaded the CLI configuration.
2024-09-07T12:36:15.206Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/kashaf/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/kashaf/Documents/Arduino","additionalUrls":["https://arduino.esp8266.com/stable/package_esp8266com_index.json"],"network":"none","locale":"en"}
2024-09-07T12:36:15.206Z config INFO Validating the CLI configuration...
2024-09-07T12:36:15.206Z config INFO The CLI config is valid.
2024-09-07T12:36:15.207Z config INFO <<< Initialized the CLI configuration.
2024-09-07T12:36:15.242Z root INFO Resolve plugins list: 86.1 ms [Finished 0.981 s after backend start]
2024-09-07T12:36:15.267Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
2024-09-07T12:36:15.267Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
    at Socket.<anonymous> (C:\Users\kashaf\AppData\Local\Programs\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-09-07T12:36:15.267Z daemon INFO Starting daemon from C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-09-07T12:36:15.268Z daemon INFO time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-09-07T12:36:15.310Z daemon INFO time="2024-09-07T18:06:15+05:30" level=info msg="Using config file: c:\\Users\\kashaf\\.arduinoIDE\\arduino-cli.yaml"
time="2024-09-07T18:06:15+05:30" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-09-07T18:06:15+05:30" level=info msg="Executing `arduino-cli daemon`"
2024-09-07T12:36:15.323Z daemon INFO Daemon is now listening on 127.0.0.1:53239
{"IP":"127.0.0.1","Port":"53239"}
2024-09-07T12:36:15.375Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-09-07T12:36:15.375Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
    at Socket.<anonymous> (C:\Users\kashaf\AppData\Local\Programs\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-09-07T12:36:15.375Z daemon INFO Starting daemon from C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-09-07T12:36:15.402Z daemon INFO time="2024-09-07T18:06:15+05:30" level=info msg="Using config file: c:\\Users\\kashaf\\.arduinoIDE\\arduino-cli.yaml"
time="2024-09-07T18:06:15+05:30" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-09-07T18:06:15+05:30" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:53240
{"IP":"127.0.0.1","Port":"53240"}
2024-09-07T12:36:15.484Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-09-07T12:36:15.484Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
    at Socket.<anonymous> (C:\Users\kashaf\AppData\Local\Programs\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-09-07T12:36:15.484Z daemon INFO Starting daemon from C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-09-07T12:36:15.484Z daemon INFO time="2024-09-07T18:06:15+05:30" level=info msg="Using config file: c:\\Users\\kashaf\\.arduinoIDE\\arduino-cli.yaml"
time="2024-09-07T18:06:15+05:30" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-09-07T18:06:15+05:30" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:53241
{"IP":"127.0.0.1","Port":"53241"}
2024-09-07T12:36:15.587Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-09-07T12:36:15.587Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
    at Socket.<anonymous> (C:\Users\kashaf\AppData\Local\Programs\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-09-07T12:36:15.587Z daemon INFO Starting daemon from C:\Users\kashaf\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-09-07T12:36:15.600Z daemon INFO time="2024-09-07T18:06:15+05:30" level=info msg="Using config file: c:\\Users\\kashaf\\.arduinoIDE\\arduino-cli.yaml"
time="2024-09-07T18:06:15+05:30" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-09-07T18:06:15+05:30" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:53242
{"IP":"127.0.0.1","Port":"53242"}
2024-09-07T12:36:15.669Z daemon INFO Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
2024-09-07T12:36:15.669Z daemon ERROR Error: Unable to get Documents Folder: The system cannot find the file specified.
time="2024-09-07T18:06:15+05:30" level=warning msg="Unable to get Documents Folder: The system cannot find the file specified."
    at Socket.<anonymous> (C:\Users\kashaf\AppData\Local\Programs\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)

OK, great. I see the problem here:

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 recently disabled the OneDrive and delete oneDrive folder

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.

Thanx a lot​,I solved the issues that were caused because of microsoft onedrive.It is working now.Thanku for your service

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

Regards, Per

2 posts were split to a new topic: IDE hangs on startup: "Failed to initialize the CLI configuration"

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