anchordotdev / cli

MIT License
146 stars 3 forks source link

Error: lookup hi-amenu-sh.lcl.host: no such host #19

Open Amenu-sh opened 3 weeks ago

Amenu-sh commented 3 weeks ago

Are there any additional details you would like to share?


Command: anchor lcl Executable: /opt/homebrew/bin/anchor Version: 0.0.37 (darwin/arm64) Commit: 1cd0aa11dbb338760b0ff26abf1f469d6ae5b1a9 BuildDate: 2024-05-28T21:30:13Z Arguments: [] Flags: [] Timestamp: 2024-06-23T02:33:27.098574Z Stdout:

| Let's set up lcl.host HTTPS in your local development environment!
| 
| lcl.host (made by the team at Anchor) adds HTTPS in a fast and totally free way
| to local applications & services.
# Setup lcl.host HTTPS Local Development Environment `anchor lcl`
    | Once setup finishes, you'll have a secure context in your browsers and local
    | system so you can use HTTPS locally.
# Audit lcl.host HTTPS Local Development Environment `anchor lcl audit`
    | We'll begin by checking your system to determine what you need for your setup.
    - Checked resources on Anchor.dev: need to provision resources.
    - Compared local and expected CA certificates: need to install 2 missing certificates.
# Configure System for lcl.host HTTPS Local Development `anchor lcl config`
    | Before issuing HTTPS certificates for your local applications, we need to
    | configure your browsers and OS to trust your personal certificates.
    |
    | We'll start a local diagnostic web server to guide you through the process.
    - Entered hi-amenu-sh.lcl.host domain for lcl.host diagnostic certificate.
    - Resolved hi-amenu-sh.lcl.host domain: failed!
    | The entered domain name is either invalid or cannot be resolved from
    | your machine, possibly due to rebinding protection on your DNS server.
    | Learn more here: https://lcl.host/dns-rebinding
geemus commented 3 weeks ago

I can see from using dig hi-amenu-sh.lcl.host that this appears to resolve to 127.0.0.1 as I would expect. So it seems likely that there is something in your local context that is preventing this from working (dns rebinding is a likely culprit as the message mentions near the end). There are some further details at https://lcl.host/dns-rebinding, but I'll repeat them here:

To bypass DNS rebinding protection, try using a public DNS server like 8.8.8.8 (Google) or 1.1.1.1 (CloudFlare) instead. Or add an entry for lcl.host subdomain to your /etc/hosts file (e.g. subdomain.lcl.host 127.0.0.1).

Let us know if that doesn't help or you have trouble with it though and we will work through it with you.