Error when using Torizoncore-builder unpack on Windows WSL2

Board: Apalis iMX8 on a custom carrier board
I’m following the instructions from Device Tree Overlays on Torizon | Toradex Developer Center
and have done the the tcb-env-setup.sh and then an images unpack which generates an error:

An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 215, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/images.py", line 399, in do_images_unpack
    images_unpack(args.image_directory,
  File "/builder/tcbuilder/cli/images.py", line 393, in images_unpack
    images.import_local_image(image_dir, dir_list[0], dir_list[1], dir_list[2])
  File "/builder/tcbuilder/backend/images.py", line 295, in import_local_image
    subprocess.check_output(tarcmd, shell=True, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cat /workdir/torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar | cat | tar -xf - -C /storage/tezi.tmp' returned non-zero exit status 2.

Here’s a full trace of what I did

john@John:~/tcbworkdir$ source tcb-env-setup.sh -- -p 8080:8080
You may have an outdated version installed. Would you like to check for updates online? [y/n] y
Setting up TorizonCore Builder with version 3.

Pulling TorizonCore Builder...
3: Pulling from torizon/torizoncore-builder
Digest: sha256:3d796d6ede4dde94ccd8ada7594d569be6e2bf765465260ce1163da997993b76
Status: Image is up to date for torizon/torizoncore-builder:3
docker.io/torizon/torizoncore-builder:3
Done!

Setup complete! TorizonCore Builder is now ready to use.
TorizonCore Builder internal status and image customizations will be stored in Docker volume named 'storage'.
********************
Important: When you run TorizonCore Builder, the tool can only access the files inside the current working directory. Files and directories outside of the current working directory, or links to files and directories outside of the current working directory, won't be visible to TorizonCore Builder. So please make sure that, when running TorizonCore Builder, all files and directories passed as parameters are within the current working directory.
Your current working directory is: /home/john/tcbworkdir
********************
For more information, run 'torizoncore-builder -h' or go to https://developer.toradex.com/knowledge-base/torizoncore-builder-tool
john@John:~/tcbworkdir$ torizoncore-builder images unpack torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar
Storage not empty. Delete current image before continuing? [y/N] y
Unpacking Toradex Easy Installer image.
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 215, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/images.py", line 399, in do_images_unpack
    images_unpack(args.image_directory,
  File "/builder/tcbuilder/cli/images.py", line 393, in images_unpack
    images.import_local_image(image_dir, dir_list[0], dir_list[1], dir_list[2])
  File "/builder/tcbuilder/backend/images.py", line 295, in import_local_image
    subprocess.check_output(tarcmd, shell=True, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cat /workdir/torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar | cat | tar -xf - -C /storage/tezi.tmp' returned non-zero exit status 2.

Greetings @toebes,

This is odd, I attempted to reproduce your issue on my WSL2 setup and I could not. The only way I could get the same stack trace to appear is by passing the unpack command a file that doesn’t actually exist.

Just to double-check does torizon-core-docker-apalis-imx8-Tezi_5.5.0+build.11.tar exist and is it in the same directory where you are executing the unpack command?

Best Regards,
Jeremias

Insanity is trying the same thing over and over and expecting a different result. I did a complete wipe of the directory and started from scratch and was able to get it to build.
Thank you

Huh that is odd, but I’m glad to hear you were able to get it resolved. Please let us know if you experience a similar issue in the future.

Best Regards,
Jeremias

Alas I am on to a different issue (but in the same directory). I found someone else who previous experienced it and posted my info there (TorizonCore Builder - Docker issue - #9 by toebes)

We’ll make sure your other gets taken a look at.