Setting up local development environment

Hi there

I’m planning on learning how to write a super simple integration to dip my toes in to the world of developing for HA. Unfortunately falling at the first hurdle though. Following the documentation here - https://developers.home-assistant.io/docs/development_environment, I am attempting to spin up a devcontainer environment in vscode on my machine (Linux Mint 19.3) but getting the following error mid way through the build. Have tried a few times and always fails at the same point:

[2021-06-07T21:23:11.594Z] [PID 16654] [263315 ms] 
[2021-06-07T21:23:11.594Z] [PID 16654] [263315 ms] 
[2021-06-07T21:23:11.594Z] [PID 16654] [263315 ms] Start: Run in container: # Copy /home/paul/.gnupg/trustdb.gpg to /root/.gnupg/trustdb.gpg
[2021-06-07T21:23:11.601Z] [PID 16654] [263322 ms] 
[2021-06-07T21:23:11.602Z] [PID 16654] [263323 ms] 
[2021-06-07T21:23:11.602Z] [PID 16654] [263323 ms] Start: Run in container: set -o noclobber ; mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[2021-06-07T21:23:11.602Z] [PID 16654] [263323 ms] Start: Run: gpg-connect-agent updatestartuptty /bye
[2021-06-07T21:23:11.614Z] [PID 16654] [263335 ms] 
[2021-06-07T21:23:11.614Z] [PID 16654] [263335 ms] 
[2021-06-07T21:23:11.614Z] [PID 16654] [263335 ms] Start: Run in container: test -f /root/.vscode-server/.postCreateCommandMarker
[2021-06-07T21:23:11.621Z] [PID 16654] [263342 ms] 
[2021-06-07T21:23:11.621Z] [PID 16654] [263342 ms] 
[2021-06-07T21:23:11.621Z] [PID 16654] [263342 ms] Exit code 1
[2021-06-07T21:23:11.804Z] [PID 16654] [263525 ms] Start: Run: docker exec -i -u root -e SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-0b86a1b0b0d07bf20ddcef6eb12d3bc67f2ca626.sock -e REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-0b86a1b0b0d07bf20ddcef6eb12d3bc67f2ca626.sock -e REMOTE_CONTAINERS=true -w /workspaces/core 258f44ea65169fee1e65905db29e8a9306f8d36597fef7814a49bccba4008e6f /bin/sh -c script/setup
[2021-06-07T21:23:11.918Z] [PID 16654] [263639 ms] Installing development dependencies...
[2021-06-07T21:23:12.176Z] [PID 16654] [263897 ms] Command failed: /bin/sh -c script/setup

Any ideas?

I assume you’re just doing this?

Getting started:

  1. Fork the Home Assistant core repository.
  2. Clone the repository to your computer. Windows users need to place their files within WSL file system to prevent performance degradation.
  3. Open the repository using Visual Studio code.

When you open this repository with Visual Studio code you are asked to “Reopen in Container”, this will start the build of the container.

Are you seeing that while it’s building the container after the last step? It’s been a while since I’ve done it, and it was on a Mac, but lots of folks are using Linux.

exactly that yes, so when I click on “reopen in container” it begins building, and fails after a while, the log excerpt above is the info it gives me when it fails.

Weird. If you don’t get useful responses here, you may want to ask in Discord: https://discord.gg/3jvveT62. I don’t see anything useful in the logs to even point you in the right direction.

1 Like

With my all respect, I cannot call this info a “good tutorial”. It does not provide a step-by-step instructions, does not cover errors which occur during execution some step.
Just started to create a local dev env on Windows - now I am about to give it up.

Guys, if you really need more people to help you with tested PRs - check your tutorials please.

2 Likes