Skip to content

Failure to download Java runtime environment results in 0 exit code #965

@rtibbles

Description

@rtibbles

Describe the bug
When the CLI does not find a version 17 JRE available, it attempts to download the JDK. This can sometimes fail, and when it does, the CLI returns a 0 exit code.

To Reproduce
Steps to reproduce the behavior:

  1. Configuration file: https://github.com/learningequality/kolibri/blob/develop/crowdin.yml
  2. Execute CLI command: crowdin download
  3. This error is not deterministic, see this Github Actions run for more details: https://github.com/learningequality/kolibri/actions/runs/20044508725/job/57486777567#step:9:26

Expected behavior
Ideally the JDK download shouldn't fail, but I doubt that's something you can control - but if it does fail, it shouldn't return a 0 exit code as if nothing had gone wrong.

Environment:

  • OS: Ubuntu
  • Version 24.04.3

Key Traceback

2025-12-08T22:14:41.8847534Z yarn exec crowdin download -- --branch release
2025-12-08T22:14:42.0053004Z yarn exec v1.22.22
2025-12-08T22:14:42.1293433Z Downloading java runtime environment for version 17
2025-12-08T22:15:12.4164285Z JRE not available for version 17, falling back to JDK...
2025-12-08T22:15:43.5977475Z Download failed:  Error: TAR_BAD_ARCHIVE: Unrecognized archive format
2025-12-08T22:15:43.5978904Z     at warnMethod (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/warn-method.js:27:42)
2025-12-08T22:15:43.5980775Z     at Unpack.warn (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:144:41)
2025-12-08T22:15:43.5982611Z     at Unpack.warn (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/unpack.js:233:22)
2025-12-08T22:15:43.5983812Z     at Unpack.<anonymous> (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:99:22)
2025-12-08T22:15:43.5984783Z     at Unpack.emit (node:events:536:35)
2025-12-08T22:15:43.5985583Z     at [emit] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:331:18)
2025-12-08T22:15:43.5986709Z     at [maybeEnd] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:512:23)
2025-12-08T22:15:43.5987862Z     at [consumeChunk] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:544:27)
2025-12-08T22:15:43.5989029Z     at Unpack.write (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:475:31)
2025-12-08T22:15:43.5990189Z     at Unpack.end (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:614:26) {
2025-12-08T22:15:43.5990935Z   recoverable: false,
2025-12-08T22:15:43.5991372Z   file: '/home/runner/.jdeploy/jre/17/jre.tar.gz',
2025-12-08T22:15:43.5991857Z   cwd: '/home/runner/.jdeploy/jre/17/jre',
2025-12-08T22:15:43.5992243Z   code: 'TAR_BAD_ARCHIVE',
2025-12-08T22:15:43.5992585Z   tarCode: 'TAR_BAD_ARCHIVE'
2025-12-08T22:15:43.5992930Z }
2025-12-08T22:15:43.5993730Z Failed to install JRE Error: TAR_BAD_ARCHIVE: Unrecognized archive format
2025-12-08T22:15:43.5995404Z     at warnMethod (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/warn-method.js:27:42)
2025-12-08T22:15:43.5996492Z     at Unpack.warn (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:144:41)
2025-12-08T22:15:43.5997497Z     at Unpack.warn (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/unpack.js:233:22)
2025-12-08T22:15:43.5998523Z     at Unpack.<anonymous> (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:99:22)
2025-12-08T22:15:43.5999237Z     at Unpack.emit (node:events:536:35)
2025-12-08T22:15:43.5999937Z     at [emit] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:331:18)
2025-12-08T22:15:43.6000941Z     at [maybeEnd] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:512:23)
2025-12-08T22:15:43.6002266Z     at [consumeChunk] (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:544:27)
2025-12-08T22:15:43.6004157Z     at Unpack.write (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:475:31)
2025-12-08T22:15:43.6005861Z     at Unpack.end (/home/runner/work/kolibri/kolibri/node_modules/@crowdin/cli/node_modules/tar/dist/commonjs/parse.js:614:26) {
2025-12-08T22:15:43.6006969Z   recoverable: false,
2025-12-08T22:15:43.6007591Z   file: '/home/runner/.jdeploy/jre/17/jre.tar.gz',
2025-12-08T22:15:43.6008299Z   cwd: '/home/runner/.jdeploy/jre/17/jre',
2025-12-08T22:15:43.6008911Z   code: 'TAR_BAD_ARCHIVE',
2025-12-08T22:15:43.6009437Z   tarCode: 'TAR_BAD_ARCHIVE'
2025-12-08T22:15:43.6009942Z }
2025-12-08T22:15:43.6026445Z Done in 61.60s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions