IDE hangs on startup: "getaddrinfo ENOTFOUND localhost"

Hey, I downloaded Arduino for Mac Silicon version (since I use Apple M2 Pro chip), but for some reason, it doesn't operate properly. When I open the application, it opens a blank white tab, and it just doesn't do anything after that (shown in the image below).

I checked the "Arduino15" folder, and it only has an 'inventory.yaml' folder, not like a bulk amount of folders normally. When I initiated the terminal folder, it showed this following message:

Last login: Wed Apr 23 16:57:32 on ttys000

/Applications/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE ; exit;

hyunwoo@10-18-140-181 ~ % /Applications/Arduino\ IDE.app/Contents/MacOS/Arduino\ IDE ; exit;

Arduino IDE 2.3.6

Checking for frontend application configuration customizations. Module path: /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/electron-main.js, destination 'package.json': /Applications/Arduino IDE.app/Contents/Resources/app/package.json

Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.6" (type of string)

Setting 'theia.frontend.config.cliVersion' application configuration value to: "1.2.0" (type of string)

Setting 'theia.frontend.config.buildDate' application configuration value to: "2025-04-09T11:22:51.016Z" (type of string)

Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{},"showWindowEarly":true,"splashScreenOptions":{},"uriScheme":"arduino-ide"},"defaultLocale":"","validatePreferencesSchema":false,"reloadOnReconnect":true,"uriScheme":"theia","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.6","cliVersion":"1.2.0","buildDate":"2025-04-09T11:22:51.016Z"}

Starting backend process. PID: 78002

Showing main window early

Using browser-only version of superagent in non-browser environment

Configuration directory URI: 'file:///Users/hyunwoo/.arduinoIDE'

Configuring to accept webviews on '^.+\.webview\..+$' hostname.

2025-04-27T20:55:29.661Z root INFO Backend u.initialize: 19.2 ms [Finished 0.327 s after backend start]

2025-04-27T20:55:29.663Z root INFO Backend Object.initialize: 18.5 ms [Finished 0.327 s after backend start]

2025-04-27T20:55:29.663Z root INFO Backend a.initialize: 0.4 ms [Finished 0.327 s after backend start]

2025-04-27T20:55:29.663Z root INFO Backend a.initialize: 0.2 ms [Finished 0.327 s after backend start]

2025-04-27T20:55:29.663Z root INFO Backend u.initialize: 0.4 ms [Finished 0.328 s after backend start]

2025-04-27T20:55:29.665Z root INFO Backend l.initialize: 19.2 ms [Finished 0.328 s after backend start]

2025-04-27T20:55:29.668Z root INFO configured all backend app contributions

2025-04-27T20:55:29.668Z root INFO Backend l.onStart: 0.5 ms [Finished 0.335 s after backend start]

2025-04-27T20:55:29.669Z root INFO Backend d.onStart: 0.0 ms [Finished 0.335 s after backend start]

2025-04-27T20:55:29.669Z root INFO Backend a.onStart: 0.1 ms [Finished 0.335 s after backend start]

2025-04-27T20:55:29.669Z config INFO >>> Initializing CLI configuration...

2025-04-27T20:55:29.669Z root INFO Backend x.onStart: 0.2 ms [Finished 0.335 s after backend start]

2025-04-27T20:55:29.669Z config INFO Loading CLI configuration from /Users/hyunwoo/.arduinoIDE/arduino-cli.yaml...

2025-04-27T20:55:29.669Z daemon INFO Starting daemon from /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-cli...

2025-04-27T20:55:29.669Z root INFO Backend w.onStart: 0.1 ms [Finished 0.336 s after backend start]

2025-04-27T20:55:29.669Z discovery-log INFO start

2025-04-27T20:55:29.669Z discovery-log INFO start new deferred

2025-04-27T20:55:29.669Z root INFO Backend v.onStart: 0.1 ms [Finished 0.336 s after backend start]

2025-04-27T20:55:29.669Z root INFO Backend a.onStart: 0.0 ms [Finished 0.336 s after backend start]

2025-04-27T20:55:29.676Z root WARN The local plugin referenced by local-dir:/Users/hyunwoo/.arduinoIDE/plugins does not exist.

2025-04-27T20:55:29.676Z root WARN The local plugin referenced by local-dir:/Users/hyunwoo/.arduinoIDE/deployedPlugins does not exist.

2025-04-27T20:55:29.685Z root ERROR Failed to start the backend application:

2025-04-27T20:55:29.685Z root ERROR Error: getaddrinfo ENOTFOUND localhost

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)

2025-04-27T20:55:29.685Z root ERROR Uncaught Exception: Error: getaddrinfo ENOTFOUND localhost

2025-04-27T20:55:29.685Z root ERROR Error: getaddrinfo ENOTFOUND localhost

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)

Can anyone help?

From the terminal, what does

cat /etc/hosts

say?

It doesn't really do anything, it just enters a new line on terminal

Try

sudo cat /etc/hosts

or

sudo cat /private/etc/hosts

then.

still nothing, put the password in and both commands just enters a new line

Hmm, why's that now. A couple of simple tests:

dir
sudo dir /private/etc/

Will the first one show your home dir, and the second one a lot of 'technical' names?

when I type dir command it says "zsh: command not found: dir"
and for the second command, it says "sudo: dir: command not found"

I'm sorry. I forgot it's Unix, replace dir with ls please.

Please use the button <code> whenever you post code, logs and output from the Terminal. Press the button first, then paste.

I gotta say, I do have two different Applications folder. One literally in my Macintosh HD and one in my separate User folder.

The error message does say that the backend command got terminated(?) for some reason, but I haven't really downloaded a single malware deleting software from the internet that might terminate the action.

That's 100% ok.

As far as i can tell, that's not the case here. This is:

2025-04-27T20:55:29.685Z root ERROR Error: getaddrinfo ENOTFOUND localhost

localhost is a very fundamental thing in computers (internal) network. You might think that network is only about your home / company network and internet, but a lot of your computers internal communication takes place over localhost or 127.0.0.1 that it resolves to thanks to /etc/hosts (in Apples infinite wisdom, they had to put it in /private/etc/hosts, but /etc/hosts should work anyway). So when you say 'cat /etc/hosts' yields nothing, that could be a part of the problem.

Lets see what this say:

sudo ls /private/etc/hosts

Oh yea, I did fix the problem. Basically, the "hosts" file was empty so Arduino didn't really find where to find the localhost.