Photon: Update Failed - File was Too Big!

I’ve been successfully updating Photons, downgrading from 0.8.0-rc11 to 0.7.0.

One unit happens to be failing, giving me the message:

{“ok”:false,“code”:500,“errors”:[{“error”:{“id”:“34002f000351353530373132”,“status”:“Update failed - File was too big!”,“code”:200}}]}

Any ideas? We are doing part 2, then part 1. We are doing this OTA to a device that is not easily accessible.

Here’s the command (with the important stuff blanked out):

curl -X PUT “https://api.particle.io/v1/products/7733/devices/XXXXXX000351353530XXXXXX?access_token=XXXXXXXX” -F file=@system-part2-0.7.0-photon.bin -F file_type=binary

I think that’s a bug. It really is failing because the file is too large, the maximum is apparently 131072. This is obviously specific to the product device endpoint, because it definitely works for developer devices. And it’s not a problem for Electrons, because the maximum system part size is 128K. And for upgrades, safe mode healer is used so probably no one noticed before.

The workaround is to use the device endpoint (omitting the /products/7733 part) and use the owner’s token or a customer impersonation token. That probably will work.

1 Like