Description
Describe the problem
On startup, Arduino Create Agent downloads a package index file from Arduino's download server.
This download might fail for a variety of reasons. If this happens, Arduino Create Agent simply fails to start without giving any indication to the user of the failure or why:
arduino-create-agent/index/index.go
Lines 73 to 74 in d4c4537
🐛 It is difficult for the user to determine why Arduino Create Agent won't start.
To reproduce
- Quit Arduino Create Agent if it is already running.
- Disconnect your computer from the Internet.
- Start Arduino Create Agent.
🐛 Arduino Create Agent fails to start.
🐛 Unless you started Arduino Create Agent from the terminal (which a normal user will never do), there is no indication of why it failed to start.
Expected behavior
Arduino Create Agent clearly communicates the failure to start and the reason to the user.
Arduino Create Agent version
Operating system
- Windows
- macOS
Operating system version
- Windows 11
- macOS Sonoma
Browser
N/A
Additional context
A basic lack of Internet access was used in the demo above for the sake of simplicity. Admittedly, since Arduino Create Agent is inherently linked to the Arduino Cloud online service, this specific scenario is probably unlikely to occur in the real world. However, there are a variety of other reasons why the download might fail such as:
- Arduino Create Agent's access to the Internet is blocked by a firewall or proxy server
- Transient network outage on Arduino's download server
A log file is not generated even when the crashreport
key is set to true
in the configuration file.
The only logs printed to the terminal are something like this, which isn't identified as an error message (as opposed to a non-critical warning):
2023/11/24 03:28:48 cannot download index: Get "https://downloads.arduino.cc/packages/package_staging_index.json": dial tcp: lookup downloads.arduino.cc: no such host
Because the Windows build of Arduino Create Agent is built as a "GUI binary", complex PowerShell acrobatics are required for Windows users to even see these logs.
Originally reported at https://forum.arduino.cc/t/create-agent-crashes-trying-to-use/1192619
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest version
- My report contains all necessary details