Errors in OTA update on mDash

Hello,

I’m experiencing an issue trying to perform an OTA update from mDash.
trying through the portal (following this https://mdash.net/docs/#ota-updates) I get an error -11 Write error.
if I try using the REST API by typing:
curl -F file=fw.zip https://mdash.net/api/v2/devices/device2/ota?access_token=<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

build_vars:
  FLASH_SIZE: 2097152

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

actually I built it with 1MB flash size.

build_vars:
  FLASH_SIZE: 1024000

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

build_vars:
  FLASH_SIZE: 2097152

solved the issue, thanks