OTA works, but Wemos does not boot

I am running (latest rev) Platformio on a Mac. Trying to upload BasicOTA.ino to a Wemos D1 mini. I’ve added the latest OTA libraries to the project directory and added the path to the platformio.ini file. Added the wifi name and password to the file.

Now, if I build and upload the project via USB the Wemos boots. I’ve put the reported IP address to the platformio.ini file like this: upload_port =
Next, upload again, now via the network which works fine. Trouble starts when the Wemos boots again. It produces garbage via the serial monitor.

Exception (0):
epc1=0x40226820 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffff8b0 end: 3fffffb0 offset: 01a0

3ffffa50:  0019c06a 00100000 4022a1c7 3ffee36c
3ffffa60:  401056f2 60000e00 00000024 3fffff10
3ffffa70:  4022a7e6 3ffffa80 00000008 4020fb42
3ffffa80:  00000000 00000000 00000023 daa020a6

Severity  Provider  Description Line
PIO Uploadplatformio.ini0005:22
LFUTF-8INI0 files

Does anyone know how to fix this?

I have nothing for you now (D1 ordered), but whenever that dogsled arrives from china I may be able to help you.