Arduino does not open on Macbook M2

aryhenriquedaluzsanchez@MacBook-Air-de-Ary ~ % "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"

Arduino IDE 2.2.1
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
2023-11-28 16:31:46.009 Arduino IDE[1611:36939] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
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-31T13:53:43.373Z" (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-31T13:53:43.373Z"}
Starting backend process. PID: 1626
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///Users/aryhenriquedaluzsanchez/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-11-28T19:31:46.296Z root INFO Backend Object.initialize: 2.3 ms [Finished 0.244 s after backend start]
2023-11-28T19:31:46.296Z root INFO Backend Object.configure: 2.0 ms [Finished 0.244 s after backend start]
2023-11-28T19:31:46.296Z root INFO Backend a.onStart: 0.6 ms [Finished 0.244 s after backend start]
2023-11-28T19:31:46.297Z root INFO Backend a.configure: 0.1 ms [Finished 0.257 s after backend start]
2023-11-28T19:31:46.297Z root INFO Backend u.onStart: 0.1 ms [Finished 0.257 s after backend start]
2023-11-28T19:31:46.297Z root INFO Backend d.configure: 0.0 ms [Finished 0.257 s after backend start]
2023-11-28T19:31:46.298Z root INFO Backend d.initialize: 12.8 ms [Finished 0.257 s after backend start]
2023-11-28T19:31:46.298Z root INFO Backend c.onStart: 0.1 ms [Finished 0.257 s after backend start]
2023-11-28T19:31:46.298Z root INFO Backend s.configure: 0.7 ms [Finished 0.258 s after backend start]
2023-11-28T19:31:46.299Z config INFO >>> Initializing CLI configuration...
2023-11-28T19:31:46.299Z root INFO Backend c.initialize: 0.2 ms [Finished 0.258 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend P.onStart: 0.3 ms [Finished 0.258 s after backend start]
2023-11-28T19:31:46.299Z config INFO Loading CLI configuration from /Users/aryhenriquedaluzsanchez/.arduinoIDE/arduino-cli.yaml...
2023-11-28T19:31:46.299Z daemon INFO Starting daemon from /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/resources/arduino-cli...
2023-11-28T19:31:46.299Z root INFO Backend s.initialize: 0.2 ms [Finished 0.259 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend w.onStart: 0.4 ms [Finished 0.259 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend r.configure: 0.7 ms [Finished 0.259 s after backend start]
2023-11-28T19:31:46.299Z discovery-log INFO start
2023-11-28T19:31:46.299Z discovery-log INFO start new deferred
2023-11-28T19:31:46.299Z root INFO Backend d.initialize: 0.2 ms [Finished 0.259 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend y.onStart: 0.8 ms [Finished 0.260 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend r.configure: 0.7 ms [Finished 0.260 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend s.onStart: 0.2 ms [Finished 0.260 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend h.configure: 0.2 ms [Finished 0.260 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend a.configure: 0.1 ms [Finished 0.261 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend s.configure: 0.0 ms [Finished 0.261 s after backend start]
2023-11-28T19:31:46.299Z root INFO Backend l.configure: 0.0 ms [Finished 0.261 s after backend start]
2023-11-28T19:31:46.300Z root WARN The local plugin referenced by local-dir:/Users/aryhenriquedaluzsanchez/.arduinoIDE/plugins does not exist.
2023-11-28T19:31:46.300Z root WARN The local plugin referenced by local-dir:/Users/aryhenriquedaluzsanchez/.arduinoIDE/extensions does not exist.
2023-11-28T19:31:46.308Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":["https://dl.espressif.com/dl/package_esp32_index.json"]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"builtin":{"libraries":"/Users/aryhenriquedaluzsanchez/Library/Arduino15/libraries"},"data":"/Users/aryhenriquedaluzsanchez/Library/Arduino15","downloads":"/Users/aryhenriquedaluzsanchez/Library/Arduino15/staging","user":"/Users/aryhenriquedaluzsanchez/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}}
2023-11-28T19:31:46.309Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2023-11-28T19:31:46.309Z config INFO Loaded the CLI configuration.
2023-11-28T19:31:46.310Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///Users/aryhenriquedaluzsanchez/Library/Arduino15","sketchDirUri":"file:///Users/aryhenriquedaluzsanchez/Documents/Arduino","additionalUrls":["https://dl.espressif.com/dl/package_esp32_index.json"],"network":"none","locale":"en"}
2023-11-28T19:31:46.311Z config INFO Validating the CLI configuration...
2023-11-28T19:31:46.314Z root INFO Resolve plugins list: 14.7 ms [Finished 0.275 s after backend start]
2023-11-28T19:31:46.362Z config INFO The CLI config is valid.
2023-11-28T19:31:46.362Z config INFO <<< Initialized the CLI configuration.
2023-11-28T19:31:46.397Z root ERROR Failed to start the backend application:
2023-11-28T19:31:46.397Z root ERROR Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
2023-11-28T19:31:46.399Z root ERROR Uncaught Exception:  Error: getaddrinfo ENOTFOUND localhost
2023-11-28T19:31:46.400Z root ERROR Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
2023-11-28T19:31:46.400Z daemon INFO time="2023-11-28T16:31:46-03:00" level=info msg="Using config file: /Users/aryhenriquedaluzsanchez/.arduinoIDE/arduino-cli.yaml"
time="2023-11-28T16:31:46-03:00" level=info msg="arduino-cli version 0.34.0"
time="2023-11-28T16:31:46-03:00" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:50447
{"IP":"127.0.0.1","Port":"50447"}
2023-11-28T19:31:46.400Z daemon INFO Daemon is running.

Currently having the same problem here. When I open the Arduino IDE on the Macbook M2 the app does appear on the Dock session, but it's not showed on the screen.

"/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE" - Code that I used to run the app

I moved your topic to an appropriate forum category @henriquedaluz.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Hi @henriquedaluz

Arduino IDE communicates with some of its components via an internal TCP/IP port in your computer on "localhost". These components are required for the basic functionality of Arduino IDE so if it can't establish that communication then the IDE won't start up.

The error shown in the log indicates something is wrong with the localhost configuration on your computer.

Have you made any modifications, or is there anything notable about your "hosts file", especially in regards to the definition of localhost?

The "hosts file" is located at /etc/hosts (AKA /private/etc/hosts).