Worker published but not reachable or not responding

Published to workers.dev and now the worker isn’t responding. Waited 30+ minutes. https://email-signup.sih.workers.dev is the full url.

Things I tried

//wrangler.toml
workers_dev = true

Subdomain was created fine. I see it in my account dashboard.
wrangler preview --watch is fine. Worker runs and sends back “hello world”.

API key is fine. Uploaded and published with wrangler publish a-OK.

index.js was auto-generated but its barebones. Don’t see anything wrong:

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})

/**
 * Fetch and log a request
 * @param {Request} request
 */
async function handleRequest(request) {
  return new Response('Hello worker!', { status: 200 })
}

It’s reachable for me.

Reachable now! Just took a few hours. Probably just time delay because I just created the account same day or weekend maint. or something.

EDIT----
Turns out this was 100% wrong. had to edit my laptop’s /etc/nsswitch.conf file and move the dns up to the 2nd item in the hosts: list. Dunno why or how this prevented me from resolving *.workers.dev but that was it! Couldn’t resolve it for some reason.

2 Likes