Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE Hangs On Start: "Error: invalid path creating config dir...Access is denied" when home directory name different from username #2525

Open
3 tasks done
0x0303BE opened this issue Oct 5, 2024 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@0x0303BE
Copy link

0x0303BE commented Oct 5, 2024

Describe the problem

IDE hangs on start due to app trying to create files to a path based on username, not home directory name. My username and home directory name are not the same e.g. username: skywalker, homedir name: Skywa. App can not write to a path with my username in it since the path does not exist in the "Users" directory (could be done with admin privileges, but app shouldn't need admin privileges to run).

To reproduce

Start the app from the command line: & '.\Arduino IDE.exe'
Same result starting the app from GUI.

Expected behavior

App to start without path error issue.

Arduino IDE version

2.3.3

Operating system

Windows

Operating system version

11

Additional context

Error output:

PS C:\arduino-ide_2.3.3_Windows_64bit> & '.\Arduino IDE.exe'
PS C:\arduino-ide_2.3.3_Windows_64bit>
Arduino IDE 2.3.3
Checking for frontend application configuration customizations. Module path: C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\arduino-ide_2.3.3_Windows_64bit\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.3" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "1.0.4" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-09-25T09:41:18.242Z" (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.3","cliVersion":"1.0.4","buildDate":"2024-09-25T09:41:18.242Z"}
Starting backend process. PID: 52920
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/homedir/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2024-10-05T06:28:54.378Z root INFO Backend Object.initialize: 4.0 ms [Finished 0.502 s after backend start]
2024-10-05T06:28:54.380Z root INFO Backend Object.configure: 3.3 ms [Finished 0.502 s after backend start]
2024-10-05T06:28:54.380Z root INFO Backend a.onStart: 1.8 ms [Finished 0.502 s after backend start]
2024-10-05T06:28:54.381Z root INFO Backend a.configure: 0.4 ms [Finished 0.524 s after backend start]
2024-10-05T06:28:54.381Z root INFO Backend d.onStart: 0.2 ms [Finished 0.524 s after backend start]
2024-10-05T06:28:54.382Z root INFO Backend d.configure: 0.1 ms [Finished 0.524 s after backend start]
2024-10-05T06:28:54.383Z root INFO Backend d.initialize: 21.7 ms [Finished 0.524 s after backend start]
2024-10-05T06:28:54.383Z root INFO Backend c.onStart: 0.3 ms [Finished 0.524 s after backend start]
2024-10-05T06:28:54.383Z root INFO Backend s.configure: 2.2 ms [Finished 0.527 s after backend start]
2024-10-05T06:28:54.385Z config INFO >>> Initializing CLI configuration...
2024-10-05T06:28:54.385Z root INFO Backend c.initialize: 0.6 ms [Finished 0.527 s after backend start]
2024-10-05T06:28:54.385Z root INFO Backend x.onStart: 0.7 ms [Finished 0.527 s after backend start]
2024-10-05T06:28:54.386Z config INFO Loading CLI configuration from c:\Users\homedir\.arduinoIDE\arduino-cli.yaml...
2024-10-05T06:28:54.386Z daemon INFO Starting daemon from C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\resources\arduino-cli.exe...
2024-10-05T06:28:54.386Z root INFO Backend s.initialize: 0.3 ms [Finished 0.528 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend w.onStart: 1.0 ms [Finished 0.529 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend r.configure: 1.6 ms [Finished 0.529 s after backend start]
2024-10-05T06:28:54.386Z discovery-log INFO start
2024-10-05T06:28:54.386Z discovery-log INFO start new deferred
2024-10-05T06:28:54.386Z root INFO Backend d.initialize: 0.4 ms [Finished 0.529 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend y.onStart: 1.7 ms [Finished 0.531 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend r.configure: 1.5 ms [Finished 0.531 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend s.onStart: 0.4 ms [Finished 0.532 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend h.configure: 0.3 ms [Finished 0.532 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend a.configure: 0.1 ms [Finished 0.532 s after backend start]
2024-10-05T06:28:54.386Z root INFO Backend l.configure: 0.1 ms [Finished 0.532 s after backend start]
2024-10-05T06:28:54.389Z root INFO Theia app listening on http://127.0.0.1:52749.
2024-10-05T06:28:54.389Z root INFO Finished starting backend application: 2.9 ms [Finished 0.535 s after backend start]
2024-10-05T06:28:54.390Z root WARN The local plugin referenced by local-dir:/c%3A/Users/homedir/.arduinoIDE/plugins does not exist.
2024-10-05T06:28:54.390Z root WARN The local plugin referenced by local-dir:/c%3A/Users/homedir/.arduinoIDE/extensions does not exist.
2024-10-05T06:28:54.390Z root WARN The local plugin referenced by local-dir:C:\Users\homedir\.arduinoIDE\plugins does not exist.
2024-10-05T06:28:54.410Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":["https://dan.drown.org/stm32duino/package_STM32duino_index.json","https://dl.espressif.com/dl/package_esp32_index.json","https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json"]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"builtin":{"libraries":"C:\\Users\\username\\AppData\\Local\\Arduino15\\libraries"},"data":"c:\\Users\\username\\AppData\\Local\\Arduino15","downloads":"C:\\Users\\username\\AppData\\Local\\Arduino15\\staging","user":"c:\\Users\\username\\Documents\\Arduino"},"ide":{"bundled":false,"portable":false},"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-10-05T06:28:54.410Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2024-10-05T06:28:54.410Z config INFO Loaded the CLI configuration.
2024-10-05T06:28:54.415Z config WARN Could not ensure user directory existence: c:\Users\username\Documents\Arduino Error: EPERM: operation not permitted, mkdir 'c:\Users\username'
2024-10-05T06:28:54.415Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/username/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/username/Documents/Arduino","additionalUrls":["https://dan.drown.org/stm32duino/package_STM32duino_index.json","https://dl.espressif.com/dl/package_esp32_index.json","https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json"],"network":"none","locale":"en"}
2024-10-05T06:28:54.415Z config INFO Validating the CLI configuration...
2024-10-05T06:28:54.415Z root ERROR Check accessible failed for input: c:\Users\username\Documents\Arduino Error: ENOENT: no such file or directory, scandir 'c:\Users\username\Documents\Arduino'
2024-10-05T06:28:54.415Z config ERROR Failed to initialize the CLI configuration. Error: InvalidConfigError:
 - Could not access the sketchbook location at 'c:\Users\username\Documents\Arduino': Error: ENOENT: no such file or directory, scandir 'c:\Users\username\Documents\Arduino'
    at x.validateCliConfig (C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\main.js:2:764024)
    at async x.initConfig (C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\main.js:2:761590)
2024-10-05T06:28:54.431Z root INFO Resolve plugins list: 45.8 ms [Finished 0.577 s after backend start]
2024-10-05T06:28:54.510Z daemon INFO time="2024-10-05T02:28:54-04:00" level=info msg="arduino-cli version 1.0.4"
2024-10-05T06:28:54.511Z daemon INFO Error: invalid path creating config dir: c:\Users\username\AppData\Local\Arduino15 error: mkdir c:\Users\username: Access is denied.
2024-10-05T06:28:54.511Z daemon ERROR Error: Error: invalid path creating config dir: c:\Users\username\AppData\Local\Arduino15 error: mkdir c:\Users\username: Access is denied.
    at Socket.<anonymous> (C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\main.js:2:44411)
    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-10-05T06:28:54.511Z daemon INFO Starting daemon from C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\resources\arduino-cli.exe...
2024-10-05T06:28:54.520Z daemon INFO Daemon exited with exit code: 10.
2024-10-05T06:28:54.647Z daemon INFO time="2024-10-05T02:28:54-04:00" level=info msg="arduino-cli version 1.0.4"
2024-10-05T06:28:54.647Z daemon INFO Error: invalid path creating config dir: c:\Users\username\AppData\Local\Arduino15 error: mkdir c:\Users\username: Access is denied.
2024-10-05T06:28:54.647Z daemon ERROR Error: Error: invalid path creating config dir: c:\Users\username\AppData\Local\Arduino15 error: mkdir c:\Users\username: Access is denied.
    at Socket.<anonymous> (C:\arduino-ide_2.3.3_Windows_64bit\resources\app\lib\backend\main.js:2:44411)
    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)

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
@0x0303BE 0x0303BE added the type: imperfection Perceived defect in any part of project label Oct 5, 2024
@per1234 per1234 changed the title IDE Hangs On Start Win 11 - Path Error - Error: invalid path creating config dir...Access is denied IDE Hangs On Start: "Error: invalid path creating config dir...Access is denied" when home directory name different from username Oct 5, 2024
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants