Closed nyanpasu64 closed 1 year ago
It seems strange, Im using an arch system configured similarly to you but i do have localhost in /etc/hosts. Would you be able to try adding localhost to /etc/hosts. A few searches seem to agree with the idea about /etc/hosts: https://stackoverflow.com/questions/44009848/error-getaddrinfo-enotfound https://medium.com/swlh/node-js-error-message-getaddrinfo-enotfound-localhost-solution-9b2fa4f61a9c
The app does start with 127.0.0.1 localhost
added to /etc/hosts. But https://bugs.archlinux.org/task/56684 indicates that apps should be able to launch (using myhostname
to resolve localhost) even without that entry present.
The app does start with
127.0.0.1 localhost
added to /etc/hosts. But https://bugs.archlinux.org/task/56684 indicates that apps should be able to launch (usingmyhostname
to resolve localhost) even without that entry present.
you are correct. In theory it should not be necessary to make this change. I suspect this is an issue related to the way flatpak works and is implemented and not necessarily an issue with the package (the IDE package on flathub) its self. Like you said it could be https://wiki.archlinux.org/title/Network_configuration#localhost_is_resolved_over_the_network in action but thats not something i am able to fix here. Maybe reach out with a flatpak issue?
When I run
flatpak run cc.arduino.IDE2
, I see some terminal print messages, but no window appears:When I run
paru -S arduino-ide-bin
and install Arduino IDE v2 as an Arch AUR package rather than Flatpak, then runarduino-ide
, the window appears normally.Diffing the failed and successful startup, the biggest change is that with Flatpak Arduino, I see a message
2023-03-24T07:30:32.437Z root ERROR Failed to start the backend application:
etc., while with native Arduino v2, I see:Full logs of IDE startup at https://gist.github.com/nyanpasu64/19025687f55daf485f8f78473eb208e6.
Debugging
https://forum.arduino.cc/t/arduino-ide-2-0-1-not-starting-error-failed-to-start-the-backend-application/1049953 indicates that "Failed to start the backend application" indicates that the IDE and CLI need to communicate over a localhost network port, but this is failing over Flatpak. Looking at the logs more closely,
Error: getaddrinfo ENOTFOUND localhost
seems to indicate that DNS resolution is failing in Flatpak?My /etc/hosts does not contain a localhost entry. Perhaps this is https://wiki.archlinux.org/title/Network_configuration#localhost_is_resolved_over_the_network in action?
https://bugs.archlinux.org/task/56684 links to https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1415, which says that the Flatpak
/etc/nsswitch.conf
needsmyhostname
to properly resolve localhost without a /etc/hosts entry. Strangely, when I runflatpak run --command=sh cc.arduino.IDE2
,cat /etc/nsswitch.conf
already contains "myhostname", butgetent hosts localhost
(or ahosts) fails. So I'm not sure what's going wrong.System info
Operating System: Arch Linux KDE Plasma Version: 5.27.3 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8 Kernel Version: 6.2.6-zen1-1-zen (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: AMD Radeon RX 570 Series Manufacturer: Gigabyte Technology Co., Ltd. Product Name: B550M DS3H