IDE hangs on startup: "Cannot create config file directory: mkdir ...: Access is denied"

Windows 10 Pro

Stuck On Loading screen

Hi @agyky. I'm going to ask you to post 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.
  5. From the context menu, click "Open PowerShell window here".
    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 Ctrl+Shift+A.
    This will select all the text in the PowerShell window.
  11. Press Ctrl+C.
    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 tags icon on toolbar
  14. Press Ctrl+V.
    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.

Arduino IDE 2.2.1
Checking for frontend application configuration customizations. Module path: C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.2.1" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "0.34.0" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2023-08-31T14:35:44.802Z" (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.2.1","cliVersion":"0.34.0","buildDate":"2023-08-31T14:35:44.802Z"}
Starting backend process. PID: 15572
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/donet/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-12-09T11:06:50.161Z root INFO Backend Object.initialize: 4.6 ms [Finished 0.468 s after backend start]
2023-12-09T11:06:50.161Z root INFO Backend Object.configure: 3.9 ms [Finished 0.468 s after backend start]
2023-12-09T11:06:50.162Z root INFO Backend a.onStart: 1.6 ms [Finished 0.468 s after backend start]
2023-12-09T11:06:50.162Z root INFO Backend a.configure: 0.3 ms [Finished 0.493 s after backend start]
2023-12-09T11:06:50.163Z root INFO Backend u.onStart: 0.2 ms [Finished 0.493 s after backend start]
2023-12-09T11:06:50.164Z root INFO Backend d.configure: 0.1 ms [Finished 0.493 s after backend start]
2023-12-09T11:06:50.165Z root INFO Backend d.initialize: 25.3 ms [Finished 0.494 s after backend start]
2023-12-09T11:06:50.165Z root INFO Backend c.onStart: 0.2 ms [Finished 0.494 s after backend start]
2023-12-09T11:06:50.165Z root INFO Backend s.configure: 1.0 ms [Finished 0.495 s after backend start]
2023-12-09T11:06:50.167Z config INFO >>> Initializing CLI configuration...
2023-12-09T11:06:50.167Z root INFO Backend c.initialize: 0.4 ms [Finished 0.495 s after backend start]
2023-12-09T11:06:50.167Z root INFO Backend P.onStart: 1.0 ms [Finished 0.496 s after backend start]
2023-12-09T11:06:50.168Z config INFO Loading CLI configuration from c:\Users\donet\.arduinoIDE\arduino-cli.yaml...
2023-12-09T11:06:50.169Z daemon INFO Starting daemon from C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe...
2023-12-09T11:06:50.169Z root INFO Backend s.initialize: 0.3 ms [Finished 0.497 s after backend start]
2023-12-09T11:06:50.169Z root INFO Backend w.onStart: 1.0 ms [Finished 0.497 s after backend start]
2023-12-09T11:06:50.169Z root INFO Backend r.configure: 1.9 ms [Finished 0.498 s after backend start]
2023-12-09T11:06:50.169Z discovery-log INFO start
2023-12-09T11:06:50.169Z discovery-log INFO start new deferred
2023-12-09T11:06:50.170Z root INFO Backend d.initialize: 0.3 ms [Finished 0.498 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend y.onStart: 1.9 ms [Finished 0.500 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend r.configure: 1.8 ms [Finished 0.500 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend s.onStart: 0.8 ms [Finished 0.502 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend h.configure: 0.8 ms [Finished 0.502 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend a.configure: 0.4 ms [Finished 0.502 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend s.configure: 0.1 ms [Finished 0.503 s after backend start]
2023-12-09T11:06:50.170Z root INFO Backend l.configure: 0.1 ms [Finished 0.503 s after backend start]
2023-12-09T11:06:50.174Z root INFO Theia app listening on http://localhost:49771.
2023-12-09T11:06:50.175Z root INFO Finished starting backend application: 4.7 ms [Finished 0.507 s after backend start]
2023-12-09T11:06:50.187Z root WARN The local plugin referenced by local-dir:/c%3A/Users/donet/.arduinoIDE/plugins does not exist.
2023-12-09T11:06:50.187Z root WARN The local plugin referenced by local-dir:/c%3A/Users/donet/.arduinoIDE/extensions does not exist.
2023-12-09T11:06:50.188Z root WARN The local plugin referenced by local-dir:C:\Users\donet\.arduinoIDE\plugins does not exist.
2023-12-09T11:06:50.211Z root ERROR Uncaught Exception:  Error: EPERM: operation not permitted, mkdir 'C:\Users\donet\.arduinoIDE'
2023-12-09T11:06:50.212Z root ERROR Error: EPERM: operation not permitted, mkdir 'C:\Users\donet\.arduinoIDE'
2023-12-09T11:06:50.222Z root INFO Resolve plugins list: 54.5 ms [Finished 0.555 s after backend start]
2023-12-09T11:06:50.313Z daemon INFO time="2023-12-09T20:06:50+09:00" level=info msg="Config file not found, using default values"
time="2023-12-09T20:06:50+09:00" level=info msg="arduino-cli.exe version 0.34.0"
time="2023-12-09T20:06:50+09:00" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:49772
{"IP":"127.0.0.1","Port":"49772"}
2023-12-09T11:06:50.313Z daemon INFO Daemon is running.
2023-12-09T11:06:50.315Z root INFO Error: Error executing C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe config init --dest-dir c:\Users\donet\.arduinoIDE: Cannot create config file directory: mkdir c:\Users\donet\.arduinoIDE: Access is denied.
    at ChildProcess.<anonymous> (C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\main.js:2:603212)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2023-12-09T11:06:50.315Z config ERROR Failed to initialize the CLI configuration. Error: Error executing C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe config init --dest-dir c:\Users\donet\.arduinoIDE: Cannot create config file directory: mkdir c:\Users\donet\.arduinoIDE: Access is denied.
    at ChildProcess.<anonymous> (C:\Users\donet\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\main.js:2:603212)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2023-12-09T11:06:50.406Z daemon INFO time="2023-12-09T20:06:50+09:00" level=info msg="Checking signature" index="C:\\Users\\donet\\AppData\\Local\\Arduino15\\package_index.json" signatureFile="C:\\Users\\donet\\AppData\\Local\\Arduino15\\package_index.json.sig" trusted=true
time="2023-12-09T20:06:50+09:00" level=info msg="Loading hardware from: C:\\Users\\donet\\AppData\\Local\\Arduino15\\packages"
time="2023-12-09T20:06:50+09:00" level=info msg="Loading package builtin from: C:\\Users\\donet\\AppData\\Local\\Arduino15\\packages\\builtin"
time="2023-12-09T20:06:50+09:00" level=info msg="Checking existence of 'tools' path: C:\\Users\\donet\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2023-12-09T20:06:50+09:00" level=info msg="Loading tools from dir: C:\\Users\\donet\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2023-12-09T20:06:50+09:00" level=info msg="Loaded tool" tool="builtin:ctags@5.8-arduino11"
time="2023-12-09T20:06:50+09:00" level=info msg="Loaded tool" tool="builtin:dfu-discovery@0.1.2"
time="2023-12-09T20:06:50+09:00" level=info msg="Loaded tool" tool="builtin:mdns-discovery@1.0.9"
time="2023-12-09T20:06:50+09:00" level=info msg="Loaded tool" tool="builtin:serial-discovery@1.4.0"
time="2023-12-09T20:06:50+09:00" level=info msg="Loaded tool" tool="builtin:serial-monitor@0.13.0"
time="2023-12-09T20:06:50+09:00" level=info msg="Loading libraries index file" index="C:\\Users\\donet\\AppData\\Local\\Arduino15\\library_index.json"
2023-12-09T11:06:50.584Z daemon INFO time="2023-12-09T20:06:50+09:00" level=info msg="Adding libraries dir" dir="C:\\Users\\donet\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-12-09T20:06:50+09:00" level=info msg="Adding libraries dir" dir="C:\\Users\\donet\\OneDrive\\臾몄꽌\\Arduino\\libraries" location=user
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2023-12-09T11:06:51.709Z root ERROR Failed to initialize global state path: Error: EPERM: operation not permitted, mkdir 'c:\Users\donet\.arduinoIDE'
2023-12-09T11:06:51.729Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 217.1 ms [Finished 1.470 s after frontend start]
2023-12-09T11:06:51.734Z root WARN A command editor.action.toggleStickyScroll is already registered.

I see the relevant part of the logs here:

Is there anything special about your system that would block Arduino IDE from being able to create a folder at that path?

Is your Windows username "donet" (I ask because there is some vague possibility the problem could be related to you having changed your username at some point).

Is there free space on your C:\ hard drive?

I saw that a user who had a similar problem found it was caused by something in their Windows Defender configuration:

https://forum.arduino.cc/t/arduino-2-0-will-not-start-past-the-loading-screen/1049023/85

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