-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise) TypeError: Cannot read property 'BOOTLOADER_FLASH_OFFSET' of null (ESPTOOL-285) #5
Comments
@seeya is this with the latest deployed version that you observed this issue? |
@adwait-esp yes, I cloned the latest version and tested again it's the same. It seems like the board didn't connect properly causing the variable |
@seeya , are you able to perform other operations - like erase flash or get to the console with the same attached chip? |
@adwait-esp yes, using the flasher tool from Espressif Systems (https://www.espressif.com/en/support/download/other-tools), I'm able to flash the Also with PlatformIO there's no issue. |
Same issue for me. Going to the live demo code at: https://espressif.github.io/esptool-js/. Plugin an ESP32, connect, select a firmware binary, and click program and nothing happens and in the Chrome developer tools console I see: ESPLoader.js:1288 Uncaught (in promise) TypeError: Cannot read property 'BOOTLOADER_FLASH_OFFSET' of null |
Its a timing thing. If i put a breakpoint here and just click continue when it stops there then it doesn't get that "Cannot read property" error any more. Still doesn't flash the ESP32 though, when I click program nothing happens and no errors in the Javascript console. |
Same issue here, on latest Chrome |
What is the state of this project in general? Is There's no way to ever break out of this loop unless there's a timeout: while (1) {
try {
const res = await this.transport.read({timeout: 1000});
i += res.length;
//console.log("Len = " + res.length);
//var str = new TextDecoder().decode(res);
//this.log(str);
} catch (e) {
if (e === "timeout") {
break;
}
}
await this._sleep(50);
} unless I'm missing something entirely obvious/subtle, the loop above should read: while (1) {
// loop until we read something from the device successfully
try {
const res = await this.transport.read({timeout: 1000});
break; // successful read
} catch (e) {
if (e === "timeout") {
// caught and (expected) error, will continue to attempt connecting.
continue;
}
// caught a real error
throw e
}
await this._sleep(50);
} |
This project is being maintained and the branch "gh_pages" which serves the https://espressif.github.io/esptool-js/ has the latest updated code. |
It seems to me that the tool might be able to use some polishing, especially concerning handling of error cases and reporting on progress. My main intention of writing here is to check whether it would make sense to contribute here, or if there are already people working on these (tbh rather obvious) deficits. The boards I'm using are about as plain vanilla as it gets, e.g. in front of me is a WROOM Devkit, with a Silicon Labs CP210x Bridge:
but also on a variety of known good devices and different bridges (at least FTDI), all of which work fine even at high baud rates with the same cable and Out of curiosity, which chipsets/devkits are you using that work? The connect/sync works sometimes if run at the lowest baud rate. Even when it works, it takes a long time and provides no feedback during connection / sync. And not indication when an error occured. Typically, it's necessary to press Connect twice, because the connect procedure is stuck in the loop described above. Even in the cases where the connect works, the upload fails. Again with no error indication. |
Above issues have been addressed. It now correctly raises if an unsupported chip is passed in ( |
After selecting a
.bin
file to flash and clickingProgram
, the console display this error.Any ideas how to fix this?
The text was updated successfully, but these errors were encountered: