cli icon indicating copy to clipboard operation
cli copied to clipboard

missing root cause of error

Open behrica opened this issue 1 year ago • 2 comments

I have devcontainer snippet like this:

"postStartCommand":  
  { 
    "poetry setup":  ["/bin/bash", "-i", "-c",  "python3 -m venv $HOME/.local && source $HOME/.local/bin/activate && poetry install"]
  }

and forgot to setup poetry, so it is not available. But the log does not show this, it does not show the root error message in this situation. (poetry: command not found) I took me while to figure this out.

2024-05-14T08:35:36.7508615Z Error: Command failed: /bin/bash -i -c mkdir -p /home/vscode/.local && python3 -m venv /home/vscode/.local && source /home/vscode/.local/bin/activate && poetry install
2024-05-14T08:35:36.7511344Z     at N7 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:235:130)
2024-05-14T08:35:36.7513197Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-14T08:35:36.7515326Z     at async Am (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:4393)
2024-05-14T08:35:36.7517736Z     at async k7 (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:3910)
2024-05-14T08:35:36.7520153Z     at async $w (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:3102)
2024-05-14T08:35:36.7522547Z     at async fa (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:2386)
2024-05-14T08:35:36.7524984Z     at async DtA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:464:1496)
2024-05-14T08:35:36.7660547Z     at async NH (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:464:964)
2024-05-14T08:35:36.7662569Z     at async KtA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:481:3692)
2024-05-14T08:35:36.7664542Z     at async AB (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:481:4807)
2024-05-14T08:35:36.7665571Z 
2024-05-14T08:35:36.7856893Z ##[error]Dev container up failed: Command failed: /bin/bash -i -c mkdir -p /home/vscode/.local && python3 -m venv /home/vscode/.local && source /home/vscode/.local/bin/activate && poetry install (exit code: undefined)

behrica avatar May 14 '24 08:05 behrica

@gauravsaini04 / @prathameshzarkar9 Can either of you help with investigating this? Thanks!

samruddhikhandale avatar Jun 04 '24 21:06 samruddhikhandale

Hi @samruddhikhandale ,

PR created for this fix: https://github.com/devcontainers/cli/pull/852 kindly review and let me know if any changes required.

prathameshzarkar9 avatar Jul 03 '24 10:07 prathameshzarkar9

Hello @chrmarti, We have updated the solution as you had recommended in a new pr for it Please refer to #933 and check for any issues that still exist Thanks for your support

gauravsaini04 avatar Nov 18 '24 12:11 gauravsaini04