wrangler-legacy icon indicating copy to clipboard operation
wrangler-legacy copied to clipboard

`wrangler dev` fails when zone has no apex record

Open Electroid opened this issue 3 years ago • 4 comments

🐛 Bug report

Describe the bug

If a zone has no apex record, when running wrangler dev, the following error shows up:

Error: error sending request for url (https://<zone>/cdn-cgi/workers/preview/?s0=<token>): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known

Reproduce the bug

A list of steps to reproduce the bug.

  1. Either create a new zone, or remove all DNS records from an existing zone
  2. Generate a wrangler template, and specify any route to the zone
  3. Run wrangler dev
  4. See the error

Expected behavior

Wrangler should instruct the developer to ensure an apex record exists on their zone.

Environment and versions

Fill out the following information about your environment.

  • operating system: macOS Big Sur
  • output of wrangler -V: wrangler 1.11.0
  • output of node -v: v15.4.0
  • content of wrangler.toml:
name = "gamertag"
type = "javascript"
account_id = "..."
zone_id = "..."
workers_dev = false
routes = ["api.gamertag.dev/random"]

Note: There is a DNS record for api.gamertag.dev, but no record for gamertag.dev

Electroid avatar Mar 03 '21 20:03 Electroid

seeing that right now with my first wrangler rodeo. 👍

adjavaherian avatar Mar 08 '21 19:03 adjavaherian

Yes, facing same. Feels strange to require have apex record just to run wrangler dev.

Update: still seeing with 1.17:

% wrangler -V
wrangler 1.17.0

karnauskas avatar Mar 18 '21 11:03 karnauskas

This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.

stale[bot] avatar Jan 09 '22 02:01 stale[bot]

.

karnauskas avatar Jan 21 '22 05:01 karnauskas

Thanks for creating this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this PR.

New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it or create a new PR in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.

JacobMGEvans avatar Feb 27 '23 16:02 JacobMGEvans