I’ve tested your sketch and platformio.ini (though without the flash mode dout modification) on a NodeMCUv2 and I have no problems running the sketch
.............
Connected to XXXXXXXXXXX
IP address: 192.168.1.152
HTTP server started
New client
http-server loop: conn=1 avail=0 status=wait-read
request: GET / HTTP/1.1
method: GET url: / search: keepAlive=: 1
headerName: Host
headerValue: 192.168.1.152
headerName: User-Agent
headerValue: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
headerName: Accept
headerValue: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
headerName: Accept-Language
headerValue: de,en-US;q=0.7,en;q=0.3
headerName: Accept-Encoding
headerValue: gzip, deflate
headerName: Connection
headerValue: keep-alive
headerName: Upgrade-Insecure-Requests
headerValue: 1
args:
args count: 0
args:
args count: 0
Request: /
Arguments:
final list of key/value pairs:
You called root page
http-server loop: conn=1 avail=0 status=wait-close
http-server loop: conn=1 avail=0 status=wait-close
http-server loop: conn=1 avail=0 status=wait-close
...
No crash is observed and the page works as expected.
Can you open a CLI and execute pio platform update espressif8266 to make sure you have the latest platform version?
Does the same sketch crash on other ESP8266 boards too, if you have others?
