wrangler-legacy
wrangler-legacy copied to clipboard
`wrangler dev` fails when zone has no apex record
🐛 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.
- Either create a new zone, or remove all DNS records from an existing zone
- Generate a wrangler template, and specify any route to the zone
- Run
wrangler dev
- 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
seeing that right now with my first wrangler rodeo. 👍
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
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.
.
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.