"astro dev start" failing with empty requirements.txt and packages.txt files

Hi, I am having a very strange issue with astro dev start. I am using the latest docker image 8.8.0, and Docker Desktop on an Intel Mac running Monterey 12.2. This issue persists whether I am using OpenSSL 1.1 or 3.1 on my local machine, after mapping the webserver to different ports, and after a restart. Please let me know if you need any additional specs of my setup.

Airflow containers spin up fine in a clean astro dev init folder structure. However, if I make any edits to packages.txt, e.g., adding even one of the required packages listed here and then removing it completely so the file is empty again, the pip install -r requirements.txt step of astro dev restart or astro dev start (after astro dev kill and removing remaining images) fails with

24.00 Could not fetch URL https://pip.astronomer.io/v2/astro-run-dag/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pip.astronomer.io', port=443): Max retries exceeded with url: /v2/astro-run-dag/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1007)'))) - skipping

The same SSL error also occurs for astronomer-fab-security-manager and astronomer-airflow-version-check.

I am able to wget these URLs from my local machine, but not from a docker container based on the image that results from docker build . -t astro_test:latest, or even from a successfully running webserver-1 container. Even for https://www.google.com I get:

ERROR: The certificate of ‘www.google.com’ is not trusted.
ERROR: The certificate of ‘www.google.com’ doesn't have a known issuer.

This doesn’t happen if I remove the ‘s’ in https, but persists after apt-get installing ca-certificates.

When I diff the clean dev init directory structure that works with the one that is failing (where I touched packages.txt), I only get the following difference:

diff ../astro_clean/packages.txt ./packages.txt
0a1
> 

I obviously need to be able to edit packages.txt and requirements.txt to use the astro cli, and have spent a long time trying to figure this out, so I really appreciate any insight you might have!

Thanks,
Aruna

It turned out this was a firewall issue on my company network, and if I edit packages.txt on a different network it works fine. I’m still not sure why the extra white space character in packages.txt would trigger the SSL issue, but in case anyone else is experiencing this issue I suggest calling your sys admin!

1 Like