dappeteer
dappeteer copied to clipboard
Waiting for select '.network-display'
Describe the bug When the browser is initialized and the metamask setup is being done, after managing to get through the entire flow it somehow halts and gives a timeout error. In the below presented code, the finished with setup log is never presented and there is the timout error which is mentioned further below
To Reproduce
console.log('INitialize browser')
const browser = await dappeteer.launch({
metaMaskVersion: 'v10.35.0',
headless: false,
metaMaskFlask: false
});
console.log('Initialize metamask')
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
await sleep(2000);
await dappeteer.setupMetaMask(browser, metaMaskSetup)
console.log('Finished with setup')
Logs
Error in Dappeteer process: TimeoutError: Waiting for selector `.network-display` failed: Waiting failed: 30000ms exceeded
at new WaitTask (.../node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:60:34)
at IsolatedWorld.waitForFunction (..../node_modules/puppeteer-core/lib/cjs/puppeteer/api/Realm.js:35:26)
at PQueryHandler.waitFor (.../node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js:180:95)
at async CdpFrame.waitForSelector (/.../node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:504:21)
at async CdpPage.waitForSelector (.../node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:1305:20)
at async DPupeteerPage.waitForSelector (.../node_modules/@chainsafe/dappeteer/dist/puppeteer/page.js:63:55)
at async .../node_modules/@chainsafe/dappeteer/dist/helpers/actions.js:19:33
at async retry .../node_modules/@chainsafe/dappeteer/dist/helpers/utils.js:13:20)
at async openNetworkDropdown ... /node_modules/@chainsafe/dappeteer/dist/helpers/actions.js:18:5)
at async showTestNets .../node_modules/@chainsafe/dappeteer/dist/setup/setupActions.js:6:5)
Expected behavior I would expect the setupMetaMask function to finish after getting to the dashboard page of the extension and then continue with the flow. However, it halts at some point.
Screenshots If applicable, add screenshots to help explain your problem.
System:
- OS: MacOS
- OS version 14.1.2
- NodeJs version 21.3.0
- dappeteer version 5.2.9
- testing framework n.a.
- testing framework version n.a.
- puppeteer version 21.6.1
- playwright version 1.40.1
Additional context Add any other context about the problem here.