You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug seems to be a little bit random, but it probably has something to do with links opening new tabs/windows. Here is script, which reproduces the error after some time. I was able to reproduce this error on 2 websites. The example script clicks on icon which opens a new window and then it closes the window. The error occuress when calling await browser.pages(). This error does not happen with puppeteer version <= 1.11.0.
constpuppeteer=require('puppeteer');puppeteer.launch({defaultViewport: {width: 1280,height: 720},headless: true}).then(asyncbrowser=>{letpage=(awaitbrowser.pages())[0];awaitpage.goto('https://www.seznam.cz/');for(leti=0;i<15;i++){console.log('Round',i);awaitpage.click('.timeline-article-footer__recommend-icon');awaitpage.waitFor(500);awaitpage.bringToFront();// Following line may throw an errorletpages=awaitbrowser.pages();awaitpages[1].close();}awaitbrowser.close();});
What is the expected result?
Everything is fine.
What happens instead? browser.pages() throws following error:
Error: Protocol error (Page.createIsolatedWorld): Could not create isolated world
at Promise (C:\Seznam\puperr\node_modules\puppeteer\lib\Connection.js:183:56)
at new Promise (<anonymous>)
at CDPSession.send (C:\Seznam\puperr\node_modules\puppeteer\lib\Connection.js:182:12)
at Promise.all.frames.map.frame (C:\Seznam\puperr\node_modules\puppeteer\lib\FrameManager.js:259:63)
at Array.map (<anonymous>)
at FrameManager._ensureIsolatedWorld (C:\Seznam\puperr\node_modules\puppeteer\lib\FrameManager.js:259:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Target.<anonymous> (C:\Seznam\puperr\node_modules\puppeteer\lib\helper.js:108:27)
at Promise.all.targets.filter.map.target (C:\Seznam\puperr\node_modules\puppeteer\lib\Browser.js:307:35)
at Array.map (<anonymous>)
at BrowserContext.pages (C:\Seznam\puperr\node_modules\puppeteer\lib\Browser.js:307:14)
at BrowserContext.<anonymous> (C:\Seznam\puperr\node_modules\puppeteer\lib\helper.js:109:23)
at Promise.all.browserContexts.map.context (C:\Seznam\puperr\node_modules\puppeteer\lib\Browser.js:233:90)
at Array.map (<anonymous>)
at Browser.pages (C:\Seznam\puperr\node_modules\puppeteer\lib\Browser.js:233:67)
at Browser.<anonymous> (C:\Seznam\puperr\node_modules\puppeteer\lib\helper.js:109:23)
at puppeteer.launch.then (C:\Seznam\puperr\index.js:18:29)
Hopefully, this will be enough for you to reproduce the error. It seems to be related to #2671
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
The bug seems to be a little bit random, but it probably has something to do with links opening new tabs/windows. Here is script, which reproduces the error after some time. I was able to reproduce this error on 2 websites. The example script clicks on icon which opens a new window and then it closes the window. The error occuress when calling
await browser.pages()
. This error does not happen with puppeteer version <= 1.11.0.What is the expected result?
Everything is fine.
What happens instead?
browser.pages()
throws following error:Hopefully, this will be enough for you to reproduce the error. It seems to be related to #2671
The text was updated successfully, but these errors were encountered: