balena cli commands stopped working when upgraded to the latest version

I am getting this error when I run any other command than balena login:

BalenaRequestError: Request error: The request was unsuccessful
1 Like

@siddhi47 Hello! First of all welcome to the balena community!

Could you please share more details (or logs)?

  • What’s your OS?
  • What’s your balenaCLI version?
  • What are you trying to do when you get this error?

Thanks!

1 Like

The above post exactly describes my situation.

  • Ubuntu 22 (tried on standalone and WSL)
  • Balena CLI 22.1.1 (18.2.2 works).
  • Trying to run any command that lists records from an Open Balena instance (upgraded to latest 4.1.458, previously older, both work the same). Basic help and version-checking work and balena login succeeded, but communication with the server fails for commands like balena device list, balena fleet list. Debug output from those is:
BalenaRequestError: Request error: The request was unsuccessful
    at /path/to/balena-cli/node_modules/balena-request/build/request.js:186:23
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async PinejsClient._request (/path/to/balena-cli/node_modules/balena-sdk/es2018/pine.js:48:30)
    at async PinejsClient.callWithRetry (/path/to/balena-cli/node_modules/pinejs-client-core/es2018/index.js:811:20)
    at async PinejsClient.get (/path/to/balena-cli/node_modules/pinejs-client-core/es2018/index.js:887:24)
    at async /path/to/balena-cli/build/commands/device/list.js:39:20
    at async DeviceListCmd.run (/path/to/balena-cli/build/commands/device/list.js:28:26)
    at async DeviceListCmd._run (/path/to/balena-cli/node_modules/@oclif/core/lib/command.js:312:22)
    at async Config.runCommand (/path/to/balena-cli/node_modules/@oclif/core/lib/config/config.js:435:25)
    at async run (/path/to/balena-cli/node_modules/@oclif/core/lib/main.js:95:16)
BalenaRequestError: Request error: The request was unsuccessful
    at /path/to/balena-cli/node_modules/balena-request/build/request.js:186:23
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async PinejsClient._request (/path/to/balena-cli/node_modules/balena-sdk/es2018/pine.js:48:30)
    at async PinejsClient.callWithRetry (/path/to/balena-cli/node_modules/pinejs-client-core/es2018/index.js:811:20)
    at async PinejsClient.get (/path/to/balena-cli/node_modules/pinejs-client-core/es2018/index.js:887:24)
    at async Object.getAll (/path/to/balena-cli/node_modules/balena-sdk/es2018/models/application.js:159:26)
    at async Object.getAllDirectlyAccessible (/path/to/balena-cli/node_modules/balena-sdk/es2018/models/application.js:187:20)
    at async FleetListCmd.run (/path/to/balena-cli/build/commands/fleet/list.js:17:31)
    at async FleetListCmd._run (/path/to/balena-cli/node_modules/@oclif/core/lib/command.js:312:22)
    at async Config.runCommand (/path/to/balena-cli/node_modules/@oclif/core/lib/config/config.js:435:25)

I get the same message when trying to start balena deploy too.

Update: balena-cli 19.16.0 is able to list and start deployment. 20.2.10 has the error.