D1 Mini Pro - ESP has been flashed with wrong flash size

Hi !

I’m facing a similar issue like this post:

Any time I want to flash the esp wireless I get this error message:

ERROR Error binary size: Error: ESP has been flashed with wrong flash size. Please choose the correct ‘board’ option (esp01_1m always works) and then flash over USB.

I have this D1 Mini Pro:
https://www.makershop.de/plattformen/d1-mini/d1-mini-pro/

I already tried using board „esp01_1m“ and configured corresponding gpio ports instead friendly names.
Unfortunately I get the same error message so that l‘m not able to flash wirelessly…

If I flash the binary manually via usb the firmware is running.
Also I can observe that the device is available in a browser with it’s ip adress.
ESP is available in Homeassistant dashboard aswell.

So the only issue is that flashing wirelessly doesn’t work !
Any suggestions in this case ?

ESp Home 2024.3.0

This ---->

I have bought D1 mini pros that weren’t, and didn’t have as much memory as they said.

Bastard dodgy suppliers.

But also after I flash over usb next time still does not work wireless

How I can find out how much memory is available ?

esptool has query abilities.

After compile I get this in log window:

RAM:   [=====     ]  45.6% (used 37392 bytes from 81920 bytes)
Flash: [======    ]  56.9% (used 594461 bytes from 1044464 bytes)

So I it should be 1Mb (1044464 bytes = 1.04Mb)…

But if I configure “esp01_1m” (which sets hardware to: HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash) flashing wireless also doesn’t work…

This was the solution !
Sometimes it is simple… So my failure was that I gave up at the point where changing the board and compile leads to the same error.
Obviously I didn’t compile with board „esp01_1m“, flash over usb and tried flashing wireless afterwards again…