wranger 3.15.0+ I get getaddrinfo ENOTFOUND using unstable_dev

Hi! I am using unstable_dev with local = false to do end to end tests. I have been testing, and although it works fine with wranger 3.14.0 and earlier, I get a weird DNS issue with 3.15.0+ and latest versions (including the beta one). FYI it works with local = true. I tried with very minimal wrangler.toml file and it always fail with the same error (even with unnamed worker). It works if I deploy manually using the CLI, however i.e. the published URL works. The domain it is mentioned is existing on the Cloudflare dashboard (it's managed by cloudflare as well).
1 Reply
rufi
rufiOP12mo ago
my wrangler.toml has been totally commented out to debug. (So it's really minimal.) I use this function to create the worker:
const createWorker = async () => {
try {
const worker = await unstable_dev('src/main.js', {
experimental: {
disableExperimentalWarning: true,
},
logLevel: 'debug',
local: false,
});

return worker;
} catch (error) {
console.error('Error creating worker:', error);
console.error(error.stack);
throw error;
}
};
const createWorker = async () => {
try {
const worker = await unstable_dev('src/main.js', {
experimental: {
disableExperimentalWarning: true,
},
logLevel: 'debug',
local: false,
});

return worker;
} catch (error) {
console.error('Error creating worker:', error);
console.error(error.stack);
throw error;
}
};
To run this I use - npx cucumber-js This points to steps implementations that contain
BeforeAll(async () => {
state.worker = await createWorker();
});
BeforeAll(async () => {
state.worker = await createWorker();
});
Full error log is
Retrieving cached values for userId from node_modules/.cache/wrangler
...
▲ [WARNING] No compatibility_date was specified. Using the installed Workers runtime's latest supported date: 2023-10-30.
...
disableDevRegistry: false
-- START CF API REQUEST: GET https://api.cloudflare.com/client/v4/accounts/XXX/workers/subdomain/edge-preview
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API REQUEST
-- START CF API RESPONSE: OK 200
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API RESPONSE
-- START EXCHANGE API REQUEST: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END EXCHANGE API REQUEST
-- START EXCHANGE API RESPONSE: OK 200
HEADERS: {}
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END EXCHANGE API RESPONSE
Total Upload: 44.79 KiB / gzip: 10.67 KiB
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/XXX/workers/scripts/XXX/edge-preview
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API REQUEST
-- START CF API RESPONSE: OK 200
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API RESPONSE
Checking if domain has Access enabled: XXX.XXX.workers.dev
Access switch not cached for: XXX.XXX.workers.dev
Caching access switch for: XXX.XXX.workers.dev
PREVIEW URL: https://7b9ec9e5ace34ccfxxx.XXX.workers.dev
✘ [ERROR] 3:28:53 PM Error: getaddrinfo ENOTFOUND *

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '*'
}
Retrieving cached values for userId from node_modules/.cache/wrangler
...
▲ [WARNING] No compatibility_date was specified. Using the installed Workers runtime's latest supported date: 2023-10-30.
...
disableDevRegistry: false
-- START CF API REQUEST: GET https://api.cloudflare.com/client/v4/accounts/XXX/workers/subdomain/edge-preview
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API REQUEST
-- START CF API RESPONSE: OK 200
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API RESPONSE
-- START EXCHANGE API REQUEST: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END EXCHANGE API REQUEST
-- START EXCHANGE API RESPONSE: OK 200
HEADERS: {}
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END EXCHANGE API RESPONSE
Total Upload: 44.79 KiB / gzip: 10.67 KiB
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/XXX/workers/scripts/XXX/edge-preview
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API REQUEST
-- START CF API RESPONSE: OK 200
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
-- END CF API RESPONSE
Checking if domain has Access enabled: XXX.XXX.workers.dev
Access switch not cached for: XXX.XXX.workers.dev
Caching access switch for: XXX.XXX.workers.dev
PREVIEW URL: https://7b9ec9e5ace34ccfxxx.XXX.workers.dev
✘ [ERROR] 3:28:53 PM Error: getaddrinfo ENOTFOUND *

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: '*'
}
Want results from more Discord servers?
Add your server