An unexpected Exception occurred. Please provide the following stack trace to
the Toradex TorizonCore support team:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 230, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/platform.py", line 584, in do_platform_push
platform.push_ref(
File "/builder/tcbuilder/backend/platform.py", line 1035, in push_ref
commit = repo.read_commit(ref).out_commit
gi.repository.GLib.GError: g-io-error-quark: Invalid refspec ./my-firmware.bin (0)
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
Thank you for reaching out with your question. It seems you’re encountering an issue with the “Invalid refspec ./my-firmware.bin” error while trying to push your firmware to Torizon Cloud using the Torizon IDE Extension.
Here are some steps to help you resolve this issue:
File Type Verification: Ensure that ./my-firmware.bin is indeed the correct file you wish to push. The TorizonCore Builder tool expects specific file types, and your binary file might not be recognized as a valid reference.
Command Configuration: The platform push command is typically used for Docker Compose files or OSTree references. Since you’re pushing a binary file, ensure that your command is correctly formatted to handle this type of package. You may need to specify that this is a generic package.
Correct Argument Usage: Double-check that you are using the correct arguments for pushing a generic package:
Use --package-name to define the name under which the package will appear in Torizon Cloud.
Use --package-version to specify the version string.
Use --hardwareid to indicate compatible hardware IDs.
Environment Setup: Verify that your environment is set up correctly, with all necessary paths and environment variables configured. Ensure that the VSCODE_CMD environment variable is properly formatted and includes all required options.
By following these steps, you should be able to address the “Invalid refspec” error and successfully push your firmware to Torizon Cloud. If you have any further questions, feel free to ask.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Sounds like an issue with what TorizonCore Builder sees. Keep in mind the Builder tool runs in a container and can only see the current directory and below with respect to where it’s being executed.
To explain the error, the builder tool tried to treat ./my-firmware.bin as an OSTree, which means it couldn’t find this file via the provided path, so the tool assumed you were describing an OSTree reference instead.
So yeah it’s just a matter of what the Builder container sees in respect to the actual path of the file.