Yes I logged into the open balena by selecting Credentials. Added password and email. I was successfully logged in.
Then use this command to create a APP balena app create myApp
Then I tried balena apps
and got the error
Yes I logged into the open balena by selecting Credentials. Added password and email. I was successfully logged in.
Then use this command to create a APP balena app create myApp
Then I tried balena apps
and got the error
@Sharvin26 OK… this looks like a CLI bug.
So I have done a small test on my machine, where I have manually queried the API to get a list of applications. This is the machine I am running the balena apps
command from.
$ export BALENA_API_KEY="$(cat ~/.balena/token)"
{
"d": [
{
"created_at": "2019-05-20T14:24:11.282Z",
"id": 1,
"actor": 3,
"should_track_latest_release": true,
"app_name": "TestApp",
"slug": "testapp",
"device_type": "raspberrypi3",
"VPN_host": "vpn.whale.vm",
"VPN_port": 443,
"commit": null,
"depends_on__application": null,
"application_type": {
"__deferred": {
"uri": "/resin/application_type(0)"
},
"__id": 0
},
"__metadata": {
"uri": "/resin/application(1)",
"type": ""
}
}
]
}
What this is doing it taking the token
which balena-cli acquired during the login, and using it in the cURL
tool to make a HTTP request to the API I setup earlier. I am looking for all applications on my instance.
Okay So this would be fixed in next update of cli right?
@Sharvin26, thanks for reporting this issue. Our investigation suggests that the error you were getting when running balena apps
should not happen with a more recent / latest version of openBalena. CLI version 10.13.4 or later additionally avoids the error stack trace, but prints a device count of zero (instead of the correct device count) unless/until a newer version of openBalena is used.
I cloned the openbalena project from this Github URL 2 days ago.
Do I need to update my openbalena?
Also, I had a doubt now suppose I have devices configured on my current open balena server and then How can I update the Open Balena without losing any previous data related to the openBalena?
Checked with our team for more details:
If you cloned 2 days ago, then you are likely running the latest version (v1.1.1) and the answer is no (do not need to update again). Looks like the previous advice is not yet in effect, because the latest open-balena (v1.1.1) still uses an old version of open-balena-api that does not contain “the fix” (a fix to the information printed by balena apps). So:
v10.13.4
avoids the TypeError stack trace when running balena apps, but will still print an incorrect device count of zero.>= 0.16.1
), and then the you will need to update your open-balena installation as well.Regarding the update: your changes are in docker volumes, and just changing the service versions (as it is with an update), the volumes should stick around. As long as the volumes are not dropped, your updated will be fine, and your installation is preserved.
Thanks for the detailed Answer.
Also, if you are blocked by this issue you can manually update the service yourself;
To do this, you should do the following:
compose/versions
for the OPENBALENA_API_VERSION_TAG
variable./scripts/compose up -d
to restart the API service with this new versiondocker-compose
complain about Duplicate mount points
when doing this, if so you should ./scripts/compose stop
firstThanks for the Response. This seems to me easy way to update. I am already on 1.1.1
version for openbalena