Skip to content

Consistent Client.Timeout or context cancellation while reading body error when installing a core with 1.2.2 #2899

@kittaakos

Description

@kittaakos

Describe the problem

I suspect a regression with 1.2.2, whenever I install a core, I randomly get a Client.Timeout. I do not have the best Internet connection but it was always like that, and I could not reproduce the issue with 1.2.0, for example, or earlier versions.

I did some local testing and switched between 1.2.0 and 1.2.2 CLI versions and tried to install the ESP32 core after wiping ~/Users/kittaakos/Library/Arduino15/staging and ~/Users/kittaakos/Library/Arduino15/packages/esp32. It always failed for me with 1.2.2. There were no issues with 1.2.0. I tried it several times, switching back and forth between the CLI versions. This could be a temporary connection issue on my side. If so, please close this issue, but it could also be a 3rd party dependency update side effect.

To reproduce

./arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
./arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json

With 1.2.2:

./arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
Tool esp32:xtensa-esp-elf-gdb@14.2_20240403 already installed
Tool esp32:riscv32-esp-elf-gdb@14.2_20240403 already installed
Tool esp32:openocd-esp32@v0.12.0-esp32-20241016 already installed
Tool esp32:esptool_py@4.9.dev3 already installed
Tool esp32:mkspiffs@0.2.3 already installed
Tool esp32:mklittlefs@3.0.0-gnu12-dc7f933 already installed
Tool arduino:dfu-util@0.11.0-arduino5 already installed
Downloading packages...
esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 already downloaded
esp32:esp-x32@2411 esp32:esp-x32@2411 already downloaded
esp32:esp-rv32@2411 net/http: request canceled (Client.Timeout or context cancellation while reading body)
Error during install: net/http: request canceled (Client.Timeout or context cancellation while reading body)
kittaakos@Akoss-MacBook-Pro-2 esp32-coredump-guide % ./arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
Tool esp32:xtensa-esp-elf-gdb@14.2_20240403 already installed
Tool esp32:riscv32-esp-elf-gdb@14.2_20240403 already installed
Tool esp32:openocd-esp32@v0.12.0-esp32-20241016 already installed
Tool esp32:esptool_py@4.9.dev3 already installed
Tool esp32:mkspiffs@0.2.3 already installed
Tool esp32:mklittlefs@3.0.0-gnu12-dc7f933 already installed
Tool arduino:dfu-util@0.11.0-arduino5 already installed
Downloading packages...
esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 already downloaded
esp32:esp-x32@2411 esp32:esp-x32@2411 already downloaded
esp32:esp-rv32@2411 context deadline exceeded (Client.Timeout or context cancellation while reading body)
Error during install: context deadline exceeded (Client.Timeout or context cancellation while reading body

OR

./arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
Tool arduino:dfu-util@0.11.0-arduino5 already installed
Downloading packages...
esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 net/http: request canceled (Client.Timeout or context cancellation while reading body)
Error during install: net/http: request canceled (Client.Timeout or context cancellation while reading body)

I could not reproduce it with 1.2.0:

./arduino-cli version
arduino-cli  Version: 1.2.0 Commit: 9c495211 Date: 2025-02-24T15:57:28Z
kittaakos@Akoss-MacBook-Pro-2 esp32-coredump-guide % ./arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
Tool arduino:dfu-util@0.11.0-arduino5 already installed
Downloading packages...
esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 downloaded                                         
esp32:esp-x32@2411 downloaded                                                                            
esp32:xtensa-esp-elf-gdb@14.2_20240403 downloaded                                                        
esp32:esp-rv32@2411 downloaded                                                                           
esp32:riscv32-esp-elf-gdb@14.2_20240403 downloaded                                                       
esp32:openocd-esp32@v0.12.0-esp32-20241016 downloaded                                                    
esp32:esptool_py@4.9.dev3 downloaded                                                                     
esp32:mkspiffs@0.2.3 downloaded                                                                          
esp32:mklittlefs@3.0.0-gnu12-dc7f933 downloaded                                                          
esp32:esp32@3.2.0 downloaded                                                                             
Installing esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1...
Configuring tool....
esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 installed
Installing esp32:esp-x32@2411...
Configuring tool....
esp32:esp-x32@2411 installed
Installing esp32:xtensa-esp-elf-gdb@14.2_20240403...
Configuring tool....
esp32:xtensa-esp-elf-gdb@14.2_20240403 installed
Installing esp32:esp-rv32@2411...
Configuring tool....
esp32:esp-rv32@2411 installed
Installing esp32:riscv32-esp-elf-gdb@14.2_20240403...
Configuring tool....
esp32:riscv32-esp-elf-gdb@14.2_20240403 installed
Installing esp32:openocd-esp32@v0.12.0-esp32-20241016...
Configuring tool....
esp32:openocd-esp32@v0.12.0-esp32-20241016 installed
Installing esp32:esptool_py@4.9.dev3...
Configuring tool....
esp32:esptool_py@4.9.dev3 installed
Installing esp32:mkspiffs@0.2.3...
Configuring tool....
esp32:mkspiffs@0.2.3 installed
Installing esp32:mklittlefs@3.0.0-gnu12-dc7f933...
Configuring tool....
esp32:mklittlefs@3.0.0-gnu12-dc7f933 installed
Installing platform esp32:esp32@3.2.0...
Configuring platform....
Platform esp32:esp32@3.2.0 installed

Expected behavior

The 1.2.0 behavior

Arduino CLI version

1.2.2

Operating system

macOS

Operating system version

15.4.1

Additional context

I have not tried the nightly because the release tag is the HEAD of the master (c11b9dd), therefore, it must be the same as the nightly:

./arduino-cli version
arduino-cli  Version: 1.2.2 Commit: c11b9dd5 Date: 2025-04-22T13:51:07Z

I have tested the CLI only with the ESP32 core installation. I did not try to install any other cores. (Related #2899 (comment))

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftopic: package-managementRelated to the packaging and managing of the platform/librariestype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy