Hello!
Running into an issue provisioning a new device. Everything was flashed to the device the same as previous except this time the supervisor is not able to start. The error being the supervisor failing to load the config json due to deviceId
being an empty string
The system was only booted a single time after flashing it. I have not attempted to reboot it yet in order to work out what went wrong.
May main questions with all of this is:
- How did it get into this state?
- What is the expected process of assigning that
deviceId
in config.json - What is the recommended process for fixing such an issue?
Things of note:
- Img used to flash device was downloaded through the dashboard for the application in question
- The device shows up in the dashboard as online (VPN only)
- The Supervisor is unable to start due to an error (Logs below)
Jul 24 07:25:58 f257f4c 9f8b72ad2a3a[1222]: [info] Supervisor v11.4.10 starting up...
Jul 24 07:25:58 f257f4c 9f8b72ad2a3a[1222]: [debug] Starting event tracker
Jul 24 07:25:58 f257f4c 9f8b72ad2a3a[1222]: [debug] Starting logging infrastructure
Jul 24 07:25:58 f257f4c 9f8b72ad2a3a[1222]: [debug] Starting api binder
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: [event] Event: Supervisor start {}
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: (node:1) UnhandledPromiseRejectionWarning: ConfigurationValidationError: There was an error validating configuration input for key: deviceId, with value:
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: at Config.checkValueDecode (/usr/src/app/dist/app.js:2:2804102)
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: at /usr/src/app/dist/app.js:2:2800137
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a ca>
Jul 24 07:25:59 f257f4c 9f8b72ad2a3a[1222]: (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate>
- The config file in
/mnt/boot/config.json
is missing adeviceId
value (empty string)
{
"apiEndpoint": "https://api.balena-cloud.com",
"appUpdatePollInterval": "600000",
"applicationId": "1707820",
"deltaEndpoint": "https://delta.balena-cloud.com",
"deviceApiKey": "xxxxx",
"deviceApiKeys": {
"api.balena-cloud.com": "xxxxx"
},
"deviceId": "", <------ Unedited value
"deviceType": "genericx86-64-ext",
"listenPort": "48484",
"mixpanelToken": "xxxxxxx",
"registered_at": "1595609590",
"registryEndpoint": "registry2.balena-cloud.com",
"userId": "xxxxxx",
"uuid": "xxxxxxx", <---- Exists and matches dashboard
"vpnEndpoint": "vpn.balena-cloud.com",
"vpnPort": "443"
}
- first line of the
journctl
output was:
Jul 24 16:55:28 localhost bash[1112]: [INFO] balena-unique-key : Device already has uuid assigned.
I hope someone can help!
Cheers,
Tom