Errors in OTA update on mDash


I’m experiencing an issue trying to perform an OTA update from mDash.
trying through the portal (following this I get an error -11 Write error.
if I try using the REST API by typing:
curl -F<token>

the result is {"message":"Internal Server Error"}

the build works fine if I flash the device via serial uart (it is MongooseOS build, 997 kb size with 2M internal memory for the device).

How can I troubleshoot the issue?

It looks like you built the firmware with the default 4MB layout.
You need to build it for 2MB. Add in your mos.yml

  FLASH_SIZE: 2097152

Build, flash and afterwards you’ll be able to do OTA update.

actually I built it with 1MB flash size.

  FLASH_SIZE: 1024000

OTA is not supported on 1MB of flash.
Have a look here for the different predefined layouts.

  FLASH_SIZE: 2097152

solved the issue, thanks