Using balena-cli : “balena app restart appName” / “balena app restart uuid”
or node-sdk :
balena.models.device.restartApplication(uuid)
I get this error :
> BalenaRequestError: Request error:
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="utf-8">
> <title>Error</title>
> </head>
> <body>
> <pre>Cannot POST /application/9/restart</pre>
> </body>
> </html>
>
> at /usr/local/lib/node_modules/balena-cli/node_modules/balena-request/build/request.js:197:17
> at tryCatcher (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/util.js:16:23)
> at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/promise.js:517:31)
> at Promise._settlePromise (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/promise.js:574:18)
> at Promise._settlePromise0 (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/promise.js:619:10)
> at Promise._settlePromises (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/promise.js:699:18)
> at _drainQueueStep (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/async.js:138:12)
> at _drainQueue (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/async.js:131:9)
> at Async._drainQueues (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/async.js:147:5)
> at Immediate.Async.drainQueues (/usr/local/lib/node_modules/balena-cli/node_modules/bluebird/js/release/async.js:17:14)
> at runCallback (timers.js:794:20)
> at tryOnImmediate (timers.js:752:5)
> at processImmediate [as _immediateCallback] (timers.js:729:5)