toradex / vscode-torizon-templates

VS Code Torizon Integrated Development Environment Templates
MIT License
14 stars 20 forks source link

Improve error with CI credentials that mislead user to think it's a binfmt error #188

Closed leograba closed 4 days ago

leograba commented 5 months ago

Here is the log of the CI error:

Run ./.vscode/tasks.ps1 run run-torizon-binfmt
> Executing task: run-torizon-binfmt <
Container Runtime: docker
Run Arguments: --rm --privileged torizon/binfmt
Container Name: binfmt
Error response from daemon: No such container: binfmt
Container does not exist. Starting ...
Unable to find image 'torizon/binfmt:latest' locally
latest: Pulling from torizon/binfmt
8aabc323a91f: Pulling fs layer
26b478ce1ac7: Pulling fs layer
06f8d3fb0cee: Pulling fs layer
26b478ce1ac7: Verifying Checksum
26b478ce1ac7: Download complete
8aabc323a91f: Verifying Checksum
8aabc323a91f: Download complete
8aabc323a91f: Pull complete
26b478ce1ac7: Pull complete
06f8d3fb0cee: Pull complete
Digest: sha256:4341763f8efc917a9ca02dfb9f6f0fdf53116a6358dcab0b363a03c6a0f69788
Status: Downloaded newer image for torizon/binfmt:latest
Response status code does not indicate success: 401 (Unauthorized).
    at _getJonOsterToken, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.conf/torizonIO.ps1: line 55
    at <ScriptBlock>, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.conf/torizonIO.ps1: line 68
    at checkTCBInputs, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.vscode/tasks.ps1: line 264
    at _parseEnvs, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.vscode/tasks.ps1: line 475
    at runTask, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.vscode/tasks.ps1: line 550
    at taskArgumentExecute, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.vscode/tasks.ps1: line 448
    at <ScriptBlock>, /home/runner/work/videoTFLiteTorizon/videoTFLiteTorizon/.vscode/tasks.ps1: line 672
    at <ScriptBlock>, /home/runner/work/_temp/1b745540-d8b6-4c98-8821-f622e7af2e00.ps1: line 3
    at <ScriptBlock>, <No file>: line 1
Error: Process completed with exit code 1.

It looks like something went wrong with binfmt, but it was just wrong credentials.

microhobby commented 4 days ago

Thanks for the report @leograba Was added the call of docker-login before all the container operations, so it will fail fast in case of wrong credentials.