Bug arduino ide2 macOS 10.15.7

Hello,
Unable to start arduino ide2 on mac.
I get these errors when I try to run it from terminal :

Arduino IDE 2.0.2
Starting backend process. PID: 24008
Using browser-only version of superagent in non-browser environment
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
root INFO Configuration directory URI: 'file:///Volumes/Stock/jojo/.theia'
root INFO Backend Object.initialize: 9.0 ms [Finished 1.954 s after backend start]
root INFO Backend Object.configure: 7.3 ms [Finished 1.954 s after backend start]
root INFO Backend MessagingContribution.onStart: 3.3 ms [Finished 1.954 s after backend start]
root INFO Backend OSBackendApplicationContribution.configure: 0.8 ms [Finished 2.036 s after backend start]
root INFO Backend DefaultWorkspaceServer.onStart: 0.6 ms [Finished 2.036 s after backend start]
root INFO Backend LocalizationBackendContribution.configure: 0.3 ms [Finished 2.036 s after backend start]
root WARN Backend LocalizationBackendContribution.initialize took longer than the expected maximum 50 milliseconds: 82.5 ms [Finished 2.037 s after backend start]
root INFO Backend TaskBackendApplicationContribution.onStart: 0.5 ms [Finished 2.037 s after backend start]
root INFO Backend ElectronTokenBackendContribution.configure: 2.1 ms [Finished 2.039 s after backend start]
root INFO Backend PluginDeployerContribution.initialize: 0.7 ms [Finished 2.040 s after backend start]
root INFO Backend ConfigServiceImpl.onStart: 1.4 ms [Finished 2.041 s after backend start]
root INFO Backend WebviewBackendSecurityWarnings.initialize: 0.8 ms [Finished 2.043 s after backend start]
root INFO Backend ArduinoDaemonImpl.onStart: 1.9 ms [Finished 2.044 s after backend start]
root INFO Backend NodeFileUploadService.configure: 3.6 ms [Finished 2.044 s after backend start]
daemon INFO Starting daemon from /Applications/Arduino IDE.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli...
discovery-log INFO start
discovery-log INFO start new deferred
root INFO Backend BoardDiscovery.onStart: 1.6 ms [Finished 2.047 s after backend start]
root INFO Backend FileDownloadEndpoint.configure: 0.9 ms [Finished 2.047 s after backend start]
root INFO Backend AuthenticationServiceImpl.onStart: 0.7 ms [Finished 2.049 s after backend start]
root INFO Backend PluginApiContribution.configure: 0.8 ms [Finished 2.050 s after backend start]
root INFO Backend HostedPluginReader.configure: 0.5 ms [Finished 2.051 s after backend start]
root INFO Backend HostedPluginReader.configure: 0.1 ms [Finished 2.051 s after backend start]
root INFO Backend PlotterBackendContribution.configure: 1.9 ms [Finished 2.054 s after backend start]
root ERROR Failed to start the backend application:
root ERROR Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
root ERROR Uncaught Exception: 
root ERROR Error: getaddrinfo ENOTFOUND localhost
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
root WARN The local plugin referenced by local-dir:/Volumes/Stock/jojo/.arduinoIDE/plugins does not exist.
root WARN The local plugin referenced by local-dir:/Volumes/Stock/jojo/.arduinoIDE/extensions does not exist.
root WARN The local plugin referenced by local-dir:/Volumes/Stock/jojo/.arduinoProIDE/plugins does not exist.

How to solve this problem ?
Thanks

Hi @jojo_monk. Thanks for sharing the logs! This is the relevant part:

Arduino IDE communicates with some of its helper tools via an internal TCP/IP port in your computer on "localhost". It seems that this communication is not working for some reason.

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.

indeed my /etc/hosts was empty, I added 127.0.0.1 localhost in the hosts.
Now arduino ide starts.

I'm glad to hear it is working now.

Regards,
Per