balena-io / open-balena-api

The core API of openBalena
https://balena.io/open
GNU Affero General Public License v3.0
58 stars 29 forks source link

API returns "Device is too old to satisfy required version range" #696

Open cmfcruz opened 3 years ago

cmfcruz commented 3 years ago

The supervisor of some new devices using the latest OS version are encountering the following error:

"error":{
  "message":"Device <device name> is too old to satisfy required version range: &gt;=2.11.0",
  "stack":"ApiError: Device  <device name> is too old to satisfy required version range: &gt;=2.11.0
      at Object.<anonymous> (/usr/src/app/dist/app.js:10:452890)
      at Generator.next (<anonymous>)\n    at fulfilled (/usr/src/app/dist/app.js:10:1915792)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)"
}

Here are some findings courtesy of @cywang117,

Origin of 2.11 looks to be here: https://github.com/balena-io/open-balena-api/blob/3d07c43b84eb935d810143680bb9161163526516/src/features/application-types/application-types.ts#L29 So it looks like the device's os_version property isn't being picked up: https://github.com/balena-io/open-balena-api/blob/3d07c43b84eb935d810143680bb9161163526516/src/features/application-types/application-types.ts#L160

dfunckt commented 3 years ago

This is related: https://github.com/balena-io/open-balena/issues/120