Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledErrorOrRejection #465

Open
arezooebrahimi opened this issue Apr 28, 2022 · 0 comments
Open

UnhandledErrorOrRejection #465

arezooebrahimi opened this issue Apr 28, 2022 · 0 comments

Comments

@arezooebrahimi
Copy link

arezooebrahimi commented Apr 28, 2022

Hello, how can I solve this error?
my code:
try {
await agent.goto('https://google.com');
const intro = await agent.document.querySelector('body').innerHTML
res.status(200).json(intro)
} catch (err) {
console.log(err)
res.status(400).json({ error: err })
}
finally {
await agent.close();
}

error
2022-04-28T12:25:44.652Z ERROR [K:\chromium - Copy\node_modules\@secret-agent\core\index] UnhandledErrorOrRejection { context: {}, sessionId: null, sessionName: undefined } TimeoutError: undefined at new Resolvable (K:\chromium - Copy\node_modules\commons\Resolvable.ts:16:18) at Object.createPromise (K:\chromium - Copy\node_modules\commons\utils.ts:68:10) at Dns.lookupDnsEntry (K:\chromium - Copy\node_modules\mitm\lib\Dns.ts:87:22) at Dns.lookupIp (K:\chromium - Copy\node_modules\mitm\lib\Dns.ts:38:35) at processTicksAndRejections (node:internal/process/task_queues:96:5) at RequestSession.lookupDns (K:\chromium - Copy\node_modules\mitm\handlers\RequestSession.ts:107:16) at MitmRequestAgent.createSocketConnection (K:\chromium - Copy\node_modules\mitm\lib\MitmRequestAgent.ts:149:24) at Object.cb (K:\chromium - Copy\node_modules\mitm\lib\SocketPool.ts:75:26) at Queue.next (K:\chromium - Copy\node_modules\commons\Queue.ts:82:19) (node:17840) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant