Can't get AutoTLS to work locally

I have an A record for a domain (let’s call it local.mydomain.com) pointing to 127.0.0.1.

This is my first time trying to use Echo. I just can’t get AutoTLS to work. I keep getting these errors:
⇨ https server started on [::]:443
echo: http: TLS handshake error from 127.0.0.1:60078: acme/autocert: unable to satisfy “https://acme-v02.api.letsencrypt.org/acme/authz-v3/1781773148” for domain “local.mydomain.com”: no viable challenge type found
echo: http: TLS handshake error from 127.0.0.1:60079: acme/autocert: missing certificate

I don’t get any write errors on the tempdir… Any help is much appreciated!

Here is my code:
package main

import (

    "net/http"

    "os"

    "github.com/labstack/echo"

    "github.com/labstack/echo/middleware"

    "golang.org/x/crypto/acme/autocert"

)

func main() {

    defer os.RemoveAll(Config.tempDir)

    e := echo.New()

    e.Use(middleware.Recover())

    e.Use(middleware.Logger())

    e.Use(middleware.SecureWithConfig(middleware.SecureConfig{

        XSSProtection:         "1; mode=block",

        ContentTypeNosniff:    "nosniff",

        XFrameOptions:         "SAMEORIGIN",

        HSTSMaxAge:            3600,

        ContentSecurityPolicy: "default-src 'self'",

    }))

    e.Pre(middleware.HTTPSRedirect())

    e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("local.mydomain.com")

    e.AutoTLSManager.Cache = autocert.DirCache(Config.tempDir)

    e.GET("/", func(c echo.Context) error {

        return c.String(http.StatusOK, "Hello, World!")

    })

    e.Logger.Fatal(e.StartAutoTLS(":443"))

}