Closed chenxhong closed 2 days ago
error: node:internal/deps/undici/undici:13178 Error.captureStackTrace(err); ^
TypeError: fetch failed at node:internal/deps/undici/undici:13178:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { [cause]: AggregateError [ECONNREFUSED]: at internalConnectMultiple (node:net:1118:18) at afterConnectMultiple (node:net:1685:7) { code: 'ECONNREFUSED',
Error: connect ECONNREFUSED 0.0.0.0:443 at createConnectionError (node:net:1648:14) at afterConnectMultiple (node:net:1678:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '0.0.0.0', port: 443 }, Error: connect ECONNREFUSED :::443 at createConnectionError (node:net:1648:14) at afterConnectMultiple (node:net:1678:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '::', port: 443 } ]
} }
my code: typescript const login = async (auth_token: string, csrf_token: string) => { const cookie = { auth_token:${auth_token}, ct0:${csrf_token}}; TwitterOpenApi.fetchApi = fetch as any; const api = new TwitterOpenApi(); const proxyAgent = new HttpsProxyAgent('http://127.0.0.1:7890'); api.setInitOverrides({ agent: proxyAgent } as any); client = await api.getClientFromCookies(cookie); };
typescript const login = async (auth_token: string, csrf_token: string) => { const cookie = { auth_token:
, ct0:
}; TwitterOpenApi.fetchApi = fetch as any; const api = new TwitterOpenApi(); const proxyAgent = new HttpsProxyAgent('http://127.0.0.1:7890'); api.setInitOverrides({ agent: proxyAgent } as any); client = await api.getClientFromCookies(cookie); };
it's workd ,my issue. close this issue
error: node:internal/deps/undici/undici:13178 Error.captureStackTrace(err); ^
TypeError: fetch failed at node:internal/deps/undici/undici:13178:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { [cause]: AggregateError [ECONNREFUSED]: at internalConnectMultiple (node:net:1118:18) at afterConnectMultiple (node:net:1685:7) { code: 'ECONNREFUSED',
} }
my code:
typescript const login = async (auth_token: string, csrf_token: string) => { const cookie = { auth_token:
${auth_token}, ct0:
${csrf_token}}; TwitterOpenApi.fetchApi = fetch as any; const api = new TwitterOpenApi(); const proxyAgent = new HttpsProxyAgent('http://127.0.0.1:7890'); api.setInitOverrides({ agent: proxyAgent } as any); client = await api.getClientFromCookies(cookie); };