arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.32k stars 395 forks source link

Arduino IDE, after fresh install, tries to download libraries and boards. This fails, because the mandantory proxy is not configured #2312

Open tps800 opened 11 months ago

tps800 commented 11 months ago

Describe the problem

Arduino IDE tries to download various parts like libraries, board descritions and others from internet sources. This fails if a mandatory proxy hast to be used to access the internet, because at the time arduino ide tries to download the proxy is not configured.

To reproduce

Install Arduino IDE on a clean system. Allow internet access only thru some proxy. Arduino IDE will fail to start for a very long period, because it tries to connect to the internet without using the proxy.

Expected behavior

Arduino IDE first allowing to configure it for the environment so it can use a given proxy for internet access.

Arduino IDE version

2.2.1

Operating system

Windows, Linux, macOS, N/A

Operating system version

Windows 10, 11; Linux: Debian, Ubuntu

Additional context

Arduino IDE shall use proxy autoconfiguration or given environment variables or just start, to allow for a first time configuration. After this configuration it can download the missing libraries and boards.

Issue checklist

tps800 commented 11 months ago
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Indexdatei wird geladen: loading json index file C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: Das System kann die angegebene Datei nicht finden.
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

2023-12-20T08:36:13.887Z daemon INFO time="2023-12-20T09:36:13+01:00" level=info msg="Updating libraries index"
2023-12-20T08:36:13.891Z daemon INFO time="2023-12-20T09:36:13+01:00" level=info msg="Updating index" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
2023-12-20T08:36:13.896Z daemon INFO time="2023-12-20T09:36:13+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
2023-12-20T08:36:13.902Z root INFO core-client-provider [platform-index] Index wird heruntergeladen: package_index.tar.bz2

2023-12-20T08:36:13.907Z root INFO core-client-provider [library-index] Index wird heruntergeladen: library_index.tar.bz2

2023-12-20T08:36:13.914Z daemon INFO time="2023-12-20T09:36:13+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-12-20T08:36:55.937Z root ERROR Failed to update platform, library indexes. Error: 13 INTERNAL: Some indexes could not be updated.
    at t.callErrorFromStatus (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:726940)
    at Object.onReceiveStatus (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:754480)
    at Object.onReceiveStatus (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:747504)
    at C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:833048
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
    at a.makeServerStreamRequest (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:754247)
    at a.updateIndex (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:818456)
    at C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:587141
    at C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:587489
    at new Promise (<anonymous>)
    at _.doUpdateIndex (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:587468)
    at _.updatePlatformIndex (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:587113)
    at _.updateIndex (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:586481)
    at _.initInstanceWithFallback (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:584725)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-12-20T08:36:55.947Z daemon INFO time="2023-12-20T09:36:55+01:00" level=info msg="Updating libraries index"
2023-12-20T08:36:55.957Z daemon INFO time="2023-12-20T09:36:55+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
[16992:1220/093715.684:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is disabled, ANGLE is
2023-12-20T08:37:38.019Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Error downloading index 'https://downloads.arduino.cc/libraries/library_index.tar.bz2': Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": dial tcp 104.18.32.201:443: connectex: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
2023-12-20T08:37:38.023Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Indexdatei wird geladen: loading json index file C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: Das System kann die angegebene Datei nicht finden.
2023-12-20T08:37:38.027Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:serial-discovery not found
2023-12-20T08:37:38.029Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:mdns-discovery not found
2023-12-20T08:37:38.030Z daemon INFO time="2023-12-20T09:37:38+01:00" level=info msg="Loading hardware from: C:\\Users\\sct-muc\\AppData\\Local\\Arduino15\\packages"
time="2023-12-20T09:37:38+01:00" level=info msg="Loading libraries index file" index="C:\\Users\\sct-muc\\AppData\\Local\\Arduino15\\library_index.json"
time="2023-12-20T09:37:38+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\sct-muc\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-12-20T09:37:38+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\sct-muc\\Documents\\Arduino\\libraries" location=user
2023-12-20T08:37:38.031Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.
2023-12-20T08:37:38.817Z root ERROR Uncaught Exception:  Error: The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Indexdatei wird geladen: loading json index file C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: Das System kann die angegebene Datei nicht finden.
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

2023-12-20T08:37:38.819Z root ERROR Error: The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Indexdatei wird geladen: loading json index file C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\package_index.json: Das System kann die angegebene Datei nicht finden.
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Fehler beim Laden der Hardware-Plattform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\sct-muc\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

    at C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:586285
    at _.evaluateErrorStatus (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:586301)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async s.<anonymous> (C:\PRGS\arduinoide\resources\app\lib\backend\main.js:2:585971)
Closing channel on service path '/services/electron-window'.
Closing channel on service path '/services/ide-updater'.
Stored workspaces roots:
No sketches were scheduled for deletion.
tps800 commented 11 months ago

There is a commandline option --proxy-url setting it to ``` --proxy-url=http://localhost:3128


leads to Arduino IDE not even opening a window at startup.
tps800 commented 11 months ago

Arduino IDE seems to wait forever for missing files, not trying any further downloads.

Arduino IDE may work if it was an upgrade, but it will never finish up, if it was a clean install.