You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the balena preload command is used with an application that has no successful releases, an unhelpful / unhandled error is produced:
balena preload balena-fin-image.img --app fin_support --commit latest --debug
-------------------------------------------------------------------------------
[Warn] Renaming notice: The '-a', '--app' or '--application' options are now
[Warn] aliases for the '-f' or '--fleet' options. THE ALIASES WILL BE REMOVED
[Warn] in the next major version of the balena CLI (so that a different '--app'
[Warn] option can be implemented in the future). Use '-f' or '--fleet' instead.
[Warn] Find out more at: https://git.io/JRuZr
-------------------------------------------------------------------------------
Building Docker preloader image. [========================] 100%
| Checking that the image is a writable file
| Finding a free tcp port
| Checking if the image is an edison zip archive
\ Creating preloader container
\ Starting preloader container
| Fetching application g_alex_gonzalez2/fin_support
\ Cleaning up temporary files
| Reading image information
Cannot destructure property `__id` of 'undefined' or 'null'.
TypeError: Cannot destructure property `__id` of 'undefined' or 'null'.
at _fetchApplication._runWithSpinner (/snapshot/versioned-source/node_modules/balena-preload/build/preload.js:566:25)
at process._tickCallback (internal/process/next_tick.js:68:7)
From previous event:
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at Preloader.prepare (/snapshot/versioned-source/node_modules/balena-preload/build/preload.js:621:48)
at PreloadCmd.prepareAndPreload (/snapshot/versioned-source/build/commands/preload.js:296:25)
at run.Promise (/snapshot/versioned-source/build/commands/preload.js:133:30)
at new Promise (<anonymous>)
at PreloadCmd.run (/snapshot/versioned-source/build/commands/preload.js:131:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
It is not possible and/or does not make sense to attempt to preload an inexistent or unsuccessful release (a release for which services images failed to build), but this error can happen when a newly created application is selected by mistake, and it causes confusion. A nicer error message should be printed instead, e.g. "Application does not have any successful releases." This could be implemented in the _fetchApplication() function, around the following line of code: https://github.com/balena-io-modules/balena-preload/blob/v10.5.0/lib/preload.js#L767
When the
balena preload
command is used with an application that has no successful releases, an unhelpful / unhandled error is produced:It is not possible and/or does not make sense to attempt to preload an inexistent or unsuccessful release (a release for which services images failed to build), but this error can happen when a newly created application is selected by mistake, and it causes confusion. A nicer error message should be printed instead, e.g. "Application does not have any successful releases." This could be implemented in the
_fetchApplication()
function, around the following line of code:https://github.com/balena-io-modules/balena-preload/blob/v10.5.0/lib/preload.js#L767
Originally reported by @alexgg in an FD thread (restricted access), using CLI v12.48.12. cc: @klutchell
Workaround
Select a different application that has successful releases, or push a new release.
The text was updated successfully, but these errors were encountered: