OpenBalena: Cannot create Application!

Please check this video -

OpenBalena: 3.0.1
Balena CLI: 12.26.1

Error log on the openBalena container:

2020-11-02 23:59:12.343 UTC [181] ERROR:  null value in column "device type" violates not-null constraint
2020-11-02 23:59:12.343 UTC [181] DETAIL:  Failing row contains (2020-11-02 23:59:12.339564, 9, 24, 1, yokosoApp, yokosoapp, null, null, 0, 1, null, 0, 2020-11-02 23:59:12.339564, 0, 1, 404db469f27f4c0cb63989d33d49aeea).
2020-11-02 23:59:12.343 UTC [181] STATEMENT:  INSERT INTO "application" ("actor", "should track latest release", "organization", "app name", "slug", "is for-device type", "application type", "uuid")
        SELECT "application"."actor", "application"."should track latest release", "application"."organization", "application"."app name", "application"."slug", "application"."is for-device type", "application"."application type", "application"."uuid"
        FROM (
                SELECT "application"."created at", "application"."modified at", "application"."id", "application"."actor", "application"."should track latest release", "application"."organization", "application"."app name", "application"."slug", "application"."is for-device type", "application"."should be running-release", "application"."depends on-application", "application"."application type", "application"."is host", "application"."is archived", "application"."uuid"
                FROM (
                        SELECT CAST(NULL AS TIMESTAMP) AS "created at", CAST(NULL AS TIMESTAMP) AS "modified at", CAST(NULL AS INTEGER) AS "id", CAST($1 AS INTEGER) AS "actor", CAST($2 AS INTEGER) AS "should track latest release", CAST($3 AS INTEGER) AS "organization", CAST($4 AS TEXT) AS "app name", CAST($5 AS VARCHAR(255)) AS "slug", CAST($6 AS INTEGER) AS "is for-device type", CAST(NULL AS INTEGER) AS "should be running-release", CAST(NULL AS INTEGER) AS "depends on-application", CAST($7 AS INTEGER) AS "application type", CAST(NULL AS INTEGER) AS "is host", CAST(NULL AS INTEGER) AS "is archived", CAST($8 AS TEXT) AS "uuid"
                ) AS "application"
        ) AS "application" RETURNING "id";

Why device type is NULL?


I suspect something is odd going on in the database. Can you please run balena devices supported --verbose to see what device types this openBalena installation thinks it knows about?

ubuntu@ubuntu-desktop:~/balena-cli-12.26.1$ ./balena devices supported --verbose
SLUG                  ALIASES                ARCH    STATE    NAME
asus-tinker-board                            armv7hf NEW      Asus Tinker Board (NEW)
asus-tinker-board-s                          armv7hf NEW      Asus Tinker Board S (NEW)
bananapi-m1-plus                             armv7hf NEW      BananaPi-M1+ (NEW)
beagleboard-xm                               armv7hf NEW      BeagleBoard-XM (NEW)
beaglebone-black      beaglebone             armv7hf RELEASED BeagleBone Black
beaglebone-green                             armv7hf NEW      BeagleBone Green (NEW)
beaglebone-green-wifi                        armv7hf RELEASED BeagleBone Green Wireless
beaglebone-pocket                            armv7hf NEW      PocketBeagle (NEW)
blackboard-tx2                               aarch64 RELEASED Nvidia blackboard TX2
ccon-01                                      armv7hf NEW      CloudConnector 01 (NEW)
cl-som-imx8                                  aarch64 NEW      Compulab MX8M (NEW)
coral-dev                                    aarch64 NEW      Google Coral Dev Board (NEW)
etcher-pro                                   aarch64 NEW      Etcher Pro (NEW)
fincm3                                       armv7hf RELEASED Balena Fin (CM3)
generic-aarch64                              aarch64 NEW      Generic AARCH64 (ARMv8) (NEW)
genericx86-64-ext                            amd64   NEW      Generic x86_64 (NEW)
imx6ul-var-dart                              armv7hf NEW      Variscite DART-6UL (NEW)
imx7-var-som                                 armv7hf NEW      Variscite VAR-SOM-MX7 (NEW)
imx8m-var-dart                               aarch64 NEW      Variscite DART-MX8M (NEW)
intel-edison          edison                 i386    RELEASED Intel Edison
intel-nuc             nuc                    amd64   RELEASED Intel NUC
jetson-nano                                  aarch64 NEW      Nvidia Jetson Nano (NEW)
jetson-tx1                                   aarch64 NEW      Nvidia Jetson TX1 (NEW)
jetson-tx2                                   aarch64 RELEASED Nvidia Jetson TX2
jetson-tx2-skycatch                          aarch64 NEW      Nvidia Jetson TX2 Skycatch (NEW)
jetson-xavier                                aarch64 NEW      Nvidia Jetson Xavier (NEW)
jn30b-nano                                   aarch64 NEW      Auvidea JN30B Nano (NEW)
n510-tx2                                     aarch64 NEW      Aetina N510 TX2 (NEW)
nanopc-t4                                    aarch64 NEW      NanoPC-T4 (NEW)
nitrogen8mm                                  aarch64 NEW      Nitrogen8M Mini SBC (NEW)
npe-x500-m3                                  armv7hf RELEASED NPE X500 M3
odroid-c1                                    armv7hf RELEASED ODROID-C1+
odroid-xu4            odroid-ux3, odroid-u3+ armv7hf RELEASED ODROID-XU4
orange-pi-one                                armv7hf NEW      Orange Pi One (NEW)
orange-pi-zero                               armv7hf NEW      Orange Pi Zero (NEW)
orangepi-plus2                               armv7hf NEW      Orange Pi Plus2 (NEW)
orbitty-tx2                                  aarch64 RELEASED CTI Orbitty TX2
photon-nano                                  aarch64 RELEASED CTI Photon Nano
qemux86                                      i386    NEW      QEMU X86 32bit (NEW)
qemux86-64                                   amd64   NEW      QEMU X86 64bit (NEW)
raspberry-pi          raspberrypi            rpi     RELEASED Raspberry Pi (v1 / Zero / Zero W)
raspberry-pi2         raspberrypi2           armv7hf RELEASED Raspberry Pi 2
raspberrypi3                                 armv7hf RELEASED Raspberry Pi 3
raspberrypi3-64                              aarch64 RELEASED Raspberry Pi 3 (using 64bit OS)
raspberrypi4-64                              aarch64 RELEASED Raspberry Pi 4
revpi-core-3                                 armv7hf RELEASED Revolution Pi Core 3
skx2                                         aarch64 RELEASED SKX2
spacely-tx2                                  aarch64 RELEASED CTI Spacely TX2
srd3-tx2                                     aarch64 RELEASED Nvidia D3 TX2
surface-go                                   amd64   NEW      Microsoft Surface Go (NEW)
surface-pro-6                                amd64   NEW      Microsoft Surface 6 (NEW)
ts4900                                       armv7hf RELEASED Technologic TS-4900
up-board                                     amd64   RELEASED UP Board
var-som-mx6                                  armv7hf NEW      Variscite VAR-SOM-MX6 (NEW)

Thank you, I’ll raise this internally as well to see if we can reproduce and advise…

OpenBalena: 3.0.1 Balena CLI: 12.26.1

Just to add a related issue, this also happens when provisioning a device (as mentioned here).

1 Like

Quick question @bversluijs – You also receive the ERROR: null value in column "device type" issue? I dont see mention of that over in your linked thread…but could certainly be missing something.

Hi David,

It’s not really mentioned separately in the thread, but I linked to the GitHub issue. There you can see it also errors on the null value in column device type.

Aha, got it. Thanks Bart!

@Wester Once we have more information on this Issue, we will be sure to ping you to let you know. In the meantime, you can also follow along in the GitHub Issue that Bart has linked to. :slight_smile:


Hey @westerweerdt @bversluijs and whoever is following this topic: we just merged a fix for this issue on v.3.1.1 as seen here:

Please let us know how it goes on this version.

1 Like