Astro deploy crashes - `panic: runtime error: invalid memory address or nil pointer dereference`

Hello, just installed astronomer and wanted to try to deploy my first DAG to airflow(almost example from ‘astro dev init’ files). Image works locally (with astro dev start).
And I got:

$ astro deploy
Authenticated to xxx.yyy.astronomer.io 

Select which airflow deployment you want to deploy to:
 #     LABEL                DEPLOYMENT NAME           WORKSPACE       DEPLOYMENT ID                   
 1     MyLabel     elementary-xxx     Workspace     xxxxxxxxxxx     

> 1
Deploying: elementary-xxx
elementary-xxx/airflow
Building image...
Invalid Semantic Version
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x143d0ca]

goroutine 1 [running]:
github . com/astronomer/astro-cli/houston.coerce(0xc000024363, 0xe, 0xc000128e58)
       /Users/adamvandover/go/src/github . com/astronomer/astro-cli/houston/types.go:275 +0xca
github . com/astronomer/astro-cli/houston.(*DeploymentConfig).GetValidTags(0xc00052e588, 0xc000024363, 0xe, 0xc000128ec0, 0x1420451, 0xc000484000)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/houston/types.go:242 +0xd1
github . com/astronomer/astro-cli/houston.(*DeploymentConfig).IsValidTag(0xc00052e588, 0xc000024363, 0xe, 0x4)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/houston/types.go:253 +0x43
github . com/astronomer/astro-cli/airflow.Deploy(0xc000024044, 0x38, 0x0, 0x0, 0xc00041cea0, 0x1b, 0x15edf00, 0xc000422090, 0x185f720)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/airflow/docker.go:622 +0x1306
github . com/astronomer/astro-cli/cmd.deploy(0xc0004a1680, 0x1d46e50, 0x0, 0x0, 0x0, 0x0)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/cmd/deploy.go:73 +0xfe
github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra.(*Command).execute(0xc0004a1680, 0x1d46e50, 0x0, 0x0, 0xc0004a1680, 0x1d46e50)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra/command.go:826 +0x453
github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra.(*Command).ExecuteC(0xc000437680, 0x185f720, 0xc0000aa008, 0xc000437680)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra/command.go:914 +0x2fb
github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra.(*Command).Execute(...)
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/vendor/github . com/spf13/cobra/command.go:864
main.main()
        /Users/adamvandover/go/src/github . com/astronomer/astro-cli/main.go:17 +0xe1

What could be wrong?

$ astro version

Astro CLI Version: 0.23.1, Git Commit: e3c74b0ea3c43cf2eb2b744d91b02c08a91e909e

Astro Server Version: 0.23.2
$ sw_vers
ProductName: macOS

ProductVersion: 11.0.1

BuildVersion: 20B29

P.S. I wasn’t able to install astronemer with brew:
$ brew install astronomer/tap/astro

==> **Tapping astronomer/tap**

Cloning into '/usr/local/Homebrew/Library/Taps/astronomer/homebrew-tap'...

remote: Enumerating objects: 27, done.

remote: Counting objects: 100% (27/27), done.

remote: Compressing objects: 100% (23/23), done.

remote: Total 213 (delta 12), reused 10 (delta 4), pack-reused 186

Receiving objects: 100% (213/213), 33.20 KiB | 1.38 MiB/s, done.

Resolving deltas: 100% (96/96), done.

Error: Invalid formula: /usr/local/Homebrew/Library/Taps/astronomer/homebrew-tap/Formula/astro@0.23.0.rb

No available formula with the name "astro@0.23.0".

In formula file: /usr/local/Homebrew/Library/Taps/astronomer/homebrew-tap/Formula/astro@0.23.0.rb

Expected to find class AstroAT0230, but only found: AstroAT023.

Error: Cannot tap astronomer/tap: invalid syntax in tap!

only with

curl -sSL https://install.astronomer.io | sudo bash

Hi @Nikolay-Kha! I noticed you ended up reaching out to our support team to get this issue resolved, but I did want to post back here for anyone else who hits this issue.

We’ve since identified that the root of the deploy error (panic: runtime error: invalid memory address or nil pointer dereference) is related to the image in your Dockerfile: FROM quay.io/astronomer/ap-airflow:latest-onbuild.

To resolve it:

  1. Change your Dockerfile to specify a particular Airflow version + image. e.g:
    FROM quay.io/astronomer/ap-airflow:1.10.12-1-buster-onbuild

  2. Then, run $ astro deploy again

For a full list of supported Astronomer Certified (AC) images, refer to “Manage Airflow Versions.”. We’ve recorded this as a bug internally and will work with our engineering team to resolve it.

In terms of the issue with Brew install - we’re still investigating! Will relay back an update here or create a new post - I’m glad you were able to install with cURL in the meantime. Appreciate your patience, @Nikolay-Kha! Excited to have you onboard with us.

@Nikolay-Kha Just to follow up here, our CLI team has fixed the issue that caused the Brew Install error and it was just merged in (PR here).

You should be able to try to install the Astro CLI again via Brew with:
$ brew install astronomer/tap/astro

If you do try this, let us know if you run into any issues! Thanks again for reporting this.

Hi @paola, thank you very much for quick fixes. I can confirm - both issues are fixed and everything works for me.

1 Like

Happy to hear it, @Nikolay-Kha!