Skip to content
  • Sponsor arduino/arduino-create-agent

  • Notifications You must be signed in to change notification settings
  • Fork 150

"Esptool: No such file or directory" error when uploading code to ESP8266 board #980

Closed
@FlynnMarlie

Description

@FlynnMarlie

Describe the problem

The latest release (1.6.0) of the Cloud agent causes uploading any sketch to an ESP8266 board to fail:

Used platform   Version Path                                                            
esp8266:esp8266 2.5.0   /home/builder/.arduino15/packages/esp8266/hardware/esp8266/2.5.0

Flashing with command:{runtime.tools.esptool.path}/esptool -vv -cd nodemcu -cb 115200 -cp /dev/cu.usbserial-02856F96 -ca 0x00000 -cf /var/folders/sx/07hx_hp11nz50sf4ljwylj080000gn/T/arduino-create-agent189194775/new_sketch_1722490854405.bin
Start command: fork/exec {runtime.tools.esptool.path}/esptool: no such file or directory
error 1

We navigated to the "esptool" folder in the .arduino-create directory, but found that this folder is empty. After attempting to place the files it was looking for in the directory manually, it seemed as if the files were getting deleted when the agent attempts to flash the attached device.

We were able flash to the device and upload the new code by first quitting the agent that was running, then installing the previous version of the agent (version 1.5.0) and then running it. It then allowed us to upload the new code successfully. Going back to version 1.5.0 worked as long as the device didn't restart and the browser wasn't refreshed as a restart or browser refresh caused it to download and use version 1.6.0 again and the issue would happen again.

Here is a screenshot of how the error was displayed in the console:

image

To reproduce

To reproduce the issue, simply create a new sketch in Arduino Create (https://create.arduino.cc/editor).

Next, connect an ESP8266 board to the computer and attempt to upload any code to it. The error should show then.

Expected behavior

It is possible to upload to ESP8266 boards from Arduino Cloud.

Arduino Create Agent version

1.6.0

Operating system

  • macOS
  • Linux

Operating system version

  • macOS: All operating system versions seems to be affected
  • Ubuntu 22.04

Browser

Chrome

Browser version

All browser versions seems to be affected

Additional context

Uploading code to an ESP8266 board from Arduino Cloud using a Windows computer works fine.


Uploading code to non-ESP8266 boards (including ESP32-based boards) works fine even on Linux and macOS machines.

Additional reports

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

Activity

added
topic: codeRelated to content of the project itself
os: linuxSpecific to Linux operating system
os: macosSpecific to macOS operating system
on Aug 2, 2024
changed the title [-]"Esptool: No such file or directory" error when uploading code to ESP8266 board on a Mac[/-] [+]"Esptool: No such file or directory" error when uploading code to ESP8266 board[/+] on Aug 2, 2024
umbynos

umbynos commented on Aug 5, 2024

@umbynos
Contributor

The problem has been introduced in 1.6.0 (in #953, to be specific in 887b22b):

Running the same curl request:

curl 'http://127.0.0.1:8991/v2/pkgs/tools/installed' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Content-Type: text/plain;charset=UTF-8' -H 'Origin: https://app.arduino.cc' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'Priority: u=4' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"checksum":"SHA-256:bded1dca953377838b6086a9bcd40a1dc5286ba5f69f2372c22a1d1819baad24","name":"esptool","packager":"esp8266","signature":"852b58871419ce5e5633ecfaa72c0f0fa890ceb51164b362b8133bc0e3e003a21cec48935b8cdc078f4031219cbf17fb7edd9d7c9ca8ed85492911c9ca6353c9aa4691eb91fda99563a6bd49aeca0d9981fb05ec76e45c6024f8a6822862ad1e34ddc652fbbf4fa909887a255d4f087398ec386577efcec523c21203be3d10fc9e9b0f990a7536875a77dc2bc5cbffea7734b62238e31719111b718bacccebffc9be689545540e81d23b81caa66214376f58a0d6a45cf7efc5d3af62ab932b371628162fffe403906f41d5534921e5be081c5ac2ecc9db5caec03a105cc44b00ce19a95ad079843501eb8182e0717ce327867380c0e39d2b48698547fc1d0d66","url":"https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.esptool-f80ae31.tar.gz","version":"2.5.0-3-20ed2b9"}'

with 1.6.0 ⬇️

{"name":"fault","id":"8jjT_VHw","message":"Create file /home/umberto/.arduino-create/esp8266/esptool/2.5.0-3-20ed2b9/esptool: open /home/umberto/.arduino-create/esp8266/esptool/2.5.0-3-20ed2b9/esptool: is a directory","temporary":false,"timeout":false,"fault":true}

with 1.5.0

{"status":"ok"}
added this to the 1.6.1 milestone on Aug 5, 2024
Xayton

Xayton commented on Aug 5, 2024

@Xayton
Contributor

We discovered this is a regression caused by some changes in 1.6.0 and by a peculiar structure of the esptool packages. The package has a root folder "esptool" with the same name of the file contained in it ("esptool").

self-assigned this
on Aug 5, 2024

2 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

conclusion: resolvedIssue was resolvedos: linuxSpecific to Linux operating systemos: macosSpecific to macOS operating systemtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    "Esptool: No such file or directory" error when uploading code to ESP8266 board · Issue #980 · arduino/arduino-create-agent