IDE hangs on startup: "invalid path creating config dir: ... error: mkdir ...: permission denied"

Did you change your macOS username from tejas.kulthe to tejaskulthe? Arduino IDE stores/reads data from several folders outside the installation folder. The paths to these folders are configured in a configuration file. The paths are under your user folder, so if you change your username, the IDE can no longer access the configured paths and this causes the startup to fail with the "permission denied" errors:

Please try this:

  1. Close all Arduino IDE windows if it is running.
  2. Open the folder at the following path in macOS Finder:
    /Users/tejaskulthe/.arduinoIDE
    
    :exclamation: The .arduinoIDE folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.
  3. Hold the Ctrl key on your keyboard and click on the arduino-cli.yaml file.
    A context menu will open.
  4. Select "Move to Trash" from the context menu.

Now try starting Arduino IDE again. Hopefully it will start up without any problems this time.

Some of your Arduino IDE preferences were stored in the arduino-cli.yaml file that is deleted by following the instructions I provided above. So if you have made any customizations to the preferences (e.g., adding URLs to the "Additional Boards Manager URLs" preference), you will need to select Arduino IDE > Settings from the Arduino IDE menus and then make your preferences in the "Preferences" dialog once again.

1 Like