executionContextId is 0 when using multiples connections
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: Master branch
- Platform / OS version: MacOS 10.14.2
- Node.js version: v8.10
What steps will reproduce the problem?
(async() => {
var options = { headless : true, };
var browser = await puppeteer.launch(options);
var browserWSEndpoint = browser.wsEndpoint();
var browser2 = await puppeteer.connect({ browserWSEndpoint });
var page = (await browser2.pages())[0];
await page.evaluateOnNewDocument(() => {console.log('Loading js helper1');});
await page.goto("https://www.google.com");
browser2.disconnect();
var browser3 = await puppeteer.connect({ browserWSEndpoint });
var page2 = (await browser3.pages())[0];
await page2.goto("https://www.google.com");
await page2.evaluateOnNewDocument(() => {console.log('Loading js helper1');});
browser3.disconnect();
browser.close();
})();
What is the expected result? It shouldn’t fail.
What happens instead? I’m getting a
(node:28860) UnhandledPromiseRejectionWarning: Error: INTERNAL ERROR: missing context with id = 0
warning.js:18
at assert (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/helper.js:278:11)
at FrameManager.executionContextById (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/FrameManager.js:308:5)
at Page._onConsoleAPI (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/Page.js:504:40)
at CDPSession.Page.client.on.event (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/Page.js:133:57)
at emitOne (events.js:116:13)
at CDPSession.emit (events.js:211:7)
at CDPSession._onMessage (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/Connection.js:216:12)
at Connection._onMessage (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/Connection.js:99:19)
at WebSocketTransport._ws.addEventListener.event (/Users/neo/Documents/Coding/Open Source/puppeteer/lib/WebSocketTransport.js:41:24)
at WebSocket.onMessage (/Users/neo/Documents/Coding/Open Source/puppeteer/node_modules/ws/lib/event-target.js:120:16)
(node:28860) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
warning.js:18
```
This was reported on Puppeteer-Sharp https://github.com/kblok/puppeteer-sharp/issues/856
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Play Framework 2.1 - Cannot find an implicit ExecutionContext
According to this issue, it is fixed in the documentation. I needed to add the following import: import play.api.libs.concurrent.Execution.Implicits._.
Read more >7 Advanced Language Features
You are required to use a different execution context instance for each thread. You can accomplish this in one of two ways: Specify...
Read more >Microsoft.Data.SqlClient.SqlException (0x80131904)
I am seeing the following exception occur sporadically in my logs: Microsoft.Data.SqlClient.SqlException (0x80131904): Connection Timeout ...
Read more >Execution context | NestJS - A progressive Node.js framework
Execution context. Nest provides several utility classes that help make it easy to write applications that function across multiple application contexts ...
Read more >J2CA - IBM
Collect diagnostic data and visit the IBM support site for more information. ... J2CA0045E: Connection not available while invoking method {0} for resource ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kblok yep manager to reproduce it!
@aslushnikov could you try that script with
https://www.facebook.com
?