Unable to compile configuration

I’m trying to flash a device (first time ESPHome user), using Chrome. I have set up SSL certs on my HA.

I’ve tried two devices, and different USB cables, and have also rebooted. But each time, it picks it up:

But then says it has failed to compile. I know there are other ways of doing it, but really hoping to get this method working as I want to do lots of these!

Logs:

[18:48:59] INFO: Waiting for dashboard to come up...
[18:49:00] INFO: Starting ESPHome dashboard...
2023-01-05 18:49:02,387 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome...
[18:49:02] INFO: Starting NGINX...
2023-01-05 18:53:52,914 INFO 304 GET / (0.0.0.0) 35.69ms
2023-01-05 18:53:52,981 INFO 304 GET /devices (0.0.0.0) 2.03ms
2023-01-05 18:53:54,155 WARNING 404 GET /secret_keys (0.0.0.0) 3.07ms
2023-01-05 18:53:54,309 INFO 304 GET /boards (0.0.0.0) 143.66ms
2023-01-05 18:53:57,985 INFO 304 GET /devices (0.0.0.0) 1.97ms
2023-01-05 18:54:03,006 INFO 304 GET /devices (0.0.0.0) 2.01ms
2023-01-05 18:54:07,995 INFO 304 GET /devices (0.0.0.0) 2.02ms
2023-01-05 18:54:10,493 WARNING 404 GET /info?configuration=garage-opener.yaml (0.0.0.0) 1.93ms
2023-01-05 18:54:13,014 INFO 304 GET /devices (0.0.0.0) 2.26ms
2023-01-05 18:54:18,001 INFO 304 GET /devices (0.0.0.0) 1.92ms
2023-01-05 18:54:23,011 INFO 304 GET /devices (0.0.0.0) 1.65ms
2023-01-05 18:54:28,018 INFO 304 GET /devices (0.0.0.0) 1.63ms
2023-01-05 18:54:30,184 INFO 200 POST /wizard (0.0.0.0) 18.21ms
2023-01-05 18:54:30,216 INFO 101 GET /compile (0.0.0.0) 2.52ms
2023-01-05 18:54:30,220 INFO Running command 'esphome --dashboard compile /config/esphome/garage-opener.yaml'
2023-01-05 18:54:30,855 INFO Process exited with return code 2
2023-01-05 18:54:31,063 INFO 200 POST /delete?configuration=garage-opener.yaml (0.0.0.0) 5.46ms
2023-01-05 18:54:33,016 INFO 304 GET /devices (0.0.0.0) 2.44ms
2023-01-05 18:54:38,017 INFO 304 GET /devices (0.0.0.0) 2.03ms
2023-01-05 18:54:43,032 INFO 304 GET /devices (0.0.0.0) 1.60ms
2023-01-05 18:58:11,550 INFO 304 GET / (0.0.0.0) 2.50ms
2023-01-05 18:58:11,625 INFO 304 GET /devices (0.0.0.0) 3.22ms
2023-01-05 18:58:12,965 WARNING 404 GET /secret_keys (0.0.0.0) 2.07ms
2023-01-05 18:58:12,978 INFO 304 GET /boards (0.0.0.0) 3.00ms
2023-01-05 18:58:16,611 INFO 304 GET /devices (0.0.0.0) 2.33ms
2023-01-05 18:58:21,623 INFO 304 GET /devices (0.0.0.0) 2.19ms
2023-01-05 18:58:26,625 INFO 304 GET /devices (0.0.0.0) 1.41ms
2023-01-05 18:58:27,659 WARNING 404 GET /info?configuration=garage.yaml (0.0.0.0) 1.30ms
2023-01-05 18:58:31,634 INFO 304 GET /devices (0.0.0.0) 1.72ms
2023-01-05 18:58:36,644 INFO 304 GET /devices (0.0.0.0) 1.52ms
2023-01-05 18:58:41,634 INFO 304 GET /devices (0.0.0.0) 2.10ms
2023-01-05 18:58:43,906 INFO 200 POST /wizard (0.0.0.0) 9.83ms
2023-01-05 18:58:43,936 INFO 101 GET /compile (0.0.0.0) 1.66ms
2023-01-05 18:58:43,939 INFO Running command 'esphome --dashboard compile /config/esphome/garage.yaml'
2023-01-05 18:58:44,566 INFO Process exited with return code 2
2023-01-05 18:58:44,789 INFO 200 POST /delete?configuration=garage.yaml (0.0.0.0) 7.55ms
2023-01-05 18:58:46,634 INFO 304 GET /devices (0.0.0.0) 2.53ms
2023-01-05 18:58:51,803 INFO 304 GET /devices (0.0.0.0) 1.95ms
2023-01-05 18:58:56,885 INFO 304 GET /devices (0.0.0.0) 1.35ms

@snatch did to solve this problem? I am experiencing exactly the same issue.

i connected to my docker container shell, created a almost blank yaml file and ran this:
esphome --dashboard compile /config/test.yaml

this compiled and worked. From this point onwards I was able to get the website ui to work.
Probably a coincidence, not sure.
I also had 404 errors in the logs for secrets.yaml so perhaps this was also related to the problem.

When I access the home assistant shell I don’t have any esphome command. Do I need to enter the esphome addon container? I tried to look into the different ha commands, but couldn’t find it. Can you please explain how you were able to do it?

I was able to get this working by clicking “skip this step”, saving the configuration, and then using my browser with the ESP device connected.