Deploy CLI runtime error: invalid memory address or nil pointer dereference

Problem statement

We get the following error with the new Deploy CLI when trying to update the branding templates:

runtime error: **invalid memory address or nil pointer dereference**
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10536b650]
goroutine 42 [running]:
[github.com/auth0/auth0-cli/internal](http://github.com/auth0/auth0-cli/internal)/cli.(*cli).obtainCustomTemplateData.func3()
/home/runner/work/auth0-cli/auth0-cli/internal/cli/branding.go:435 +0x240
[golang.org/x/sync](http://golang.org/x/sync)/errgroup.(*Group).Go.func1()
/home/runner/go/pkg/mod/[golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75](http://golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75) +0x5c
created by [golang.org/x/sync](http://golang.org/x/sync)/errgroup.(*Group).Go
/home/runner/go/pkg/mod/[golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72](http://golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72) +0xa4

Symptoms

Using the deploy CLI branding templates and getting the “invalid memory address or nil pointer” dereference error.

Steps to reproduce

Use the Deploy CLI with a previous version of v1 and any branding command such as auth0 branding texts update .

Cause

This is a known bug from a previous version of the CLI:

The fix is in the v1.0.0-beta.1 release. Release v1.0.0 · auth0/auth0-cli · GitHub

Solution

Installing the version v1.0.0 or above should fix the problem.