Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preload: cryptic error when device limit reached #2642

Open
kd496 opened this issue Jul 4, 2023 · 0 comments
Open

preload: cryptic error when device limit reached #2642

kd496 opened this issue Jul 4, 2023 · 0 comments

Comments

@kd496
Copy link

kd496 commented Jul 4, 2023


Running balena preload when the free tier device limit has been reached (10/10) results in a cryptic error message.
Similar to #2335

Building Docker preloader image. [===                     ] 12%
Step 1/7 : FROM alpine:3.12
Building Docker preloader image. [======                  ] 25%
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
Building Docker preloader image. [=========               ] 37%
Step 3/7 : RUN apk add --no-cache curl py3-pip parted btrfs-progs util-linux sfdisk file coreutils sgdisk e2fsprogs-extra docker
 ---> Using cache
Building Docker preloader image. [============            ] 50%
Step 4/7 : COPY requirements.txt ./
 ---> Using cache
Building Docker preloader image. [===============         ] 62%
Step 5/7 : RUN pip3 install --no-cache-dir -r requirements.txt
 ---> Using cache
Building Docker preloader image. [==================      ] 75%
Step 6/7 : COPY src/ ./
 ---> Using cache
Building Docker preloader image. [=====================   ] 87%
Step 7/7 : CMD ["python3", "/usr/src/app/preload.py"]
 ---> Using cache
 ---> 8e1b50e15128
Successfully built 8e1b50e15128
Building Docker preloader image. [========================] 100%
| Checking that the image is a writable file
| Finding a free tcp port
/ Creating preloader container
/ Starting preloader container
- Fetching application driifloat/driifloat-server
\ Reading image informationWaiting for Docker to start...
| Reading image informationDocker started
/ Reading image information
/ Fetching application 1945809
- Cleaning up temporary files
Cannot create property 'local' on string ''

TypeError: Cannot create property 'local' on string ''
    at Preloader._getState (/snapshot/balena-cli/node_modules/balena-preload/build/preload.js:285:25)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
From previous event:
    at Preloader.preload (/snapshot/balena-cli/node_modules/balena-preload/build/preload.js:656:25)
    at PreloadCmd.prepareAndPreload (/snapshot/balena-cli/build/commands/preload.js:318:25)
    at async PreloadCmd.run (/snapshot/balena-cli/build/commands/preload.js:127:13)
    at async PreloadCmd._run (/snapshot/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/snapshot/balena-cli/node_modules/@oclif/config/lib/config.js:175:24)
    at async CustomMain.run (/snapshot/balena-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async CustomMain._run (/snapshot/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async /snapshot/balena-cli/build/app.js:76:13
    at async Promise.all (index 2)
    at async oclifRun (/snapshot/balena-cli/build/app.js:94:5)
    at async Object.run (/snapshot/balena-cli/build/app.js:107:9)
    at async run (/snapshot/balena-cli/bin/balena:20:2)

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

My full script:

#!/bin/sh
set -e

FLEET="my-fleet/name"
OS_VERSION="v2.98.33"
IMAGE="./images/aar05.img"
CONFIG="./config/prod.json"
WIFI_SSID="example_ssid"
WIFI_PSK="example_password"

mkdir -p images config
rm -f "$IMAGE" "$CONFIG"

balena os download raspberrypi4-64 --version "$OS_VERSION" --output "$IMAGE"

balena config generate --fleet "$FLEET" --output "$CONFIG" --network wifi --wifiSsid "$WIFI_SSID" --wifiKey "$WIFI_PSK" --version "$OS_VERSION" --appUpdatePollInterval 10

balena os configure "$IMAGE" --fleet "$FLEET" --config "$CONFIG"

balena preload "$IMAGE" --fleet "$FLEET" --commit latest --debug

balena-cli version "16.6.3"
balenaCloud
Node.js version "16.16.0"
Ubuntu 18.04.3 LTS x86_64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant