luisfarzati/chromda

Protocol error (Page.navigate): Session closed.

rafasashi opened this issue · 3 comments

Hello there,

I just deployed Chromda and was testing it. The first 10 invocations worked ok but then after trying to customize the Puppeteer options I started getting the following error:

2020-04-30T06:58:10.591Z b6c3dce7-7bb5-4a7f-815c-331d7004c038 ERROR Invoke Error { "errorType": "Error", "errorMessage": "Protocol error (Page.navigate): Session closed. Most likely the page has been closed.", "stack": [ "Error: Protocol error (Page.navigate): Session closed. Most likely the page has been closed.", " at CDPSession.send (/opt/nodejs/node_modules/puppeteer-core/lib/Connection.js:180:29)", " at navigate (/opt/nodejs/node_modules/puppeteer-core/lib/FrameManager.js:118:39)", " at FrameManager.navigateFrame (/opt/nodejs/node_modules/puppeteer-core/lib/FrameManager.js:95:7)", " at Frame.goto (/opt/nodejs/node_modules/puppeteer-core/lib/FrameManager.js:406:37)", " at Frame.<anonymous> (/opt/nodejs/node_modules/puppeteer-core/lib/helper.js:112:23)", " at Page.goto (/opt/nodejs/node_modules/puppeteer-core/lib/Page.js:672:49)", " at Page.<anonymous> (/opt/nodejs/node_modules/puppeteer-core/lib/helper.js:112:23)", " at MrPuppetShot.navigate (/opt/nodejs/node_modules/mrpuppetshot/src/MrPuppetShot.js:32:22)", " at /var/task/src/captureScreenshot.js:1:2030", " at /opt/nodejs/node_modules/aws-xray-sdk-core/lib/capture.js:119:17", " -- ASYNC --", " at Frame.<anonymous> (/opt/nodejs/node_modules/puppeteer-core/lib/helper.js:111:15)", " at Page.goto (/opt/nodejs/node_modules/puppeteer-core/lib/Page.js:672:49)", " at Page.<anonymous> (/opt/nodejs/node_modules/puppeteer-core/lib/helper.js:112:23)", " at MrPuppetShot.navigate (/opt/nodejs/node_modules/mrpuppetshot/src/MrPuppetShot.js:32:22)", " at /var/task/src/captureScreenshot.js:1:2030", " at /opt/nodejs/node_modules/aws-xray-sdk-core/lib/capture.js:119:17", " at Namespace.run (/opt/nodejs/node_modules/continuation-local-storage/context.js:48:5)", " at contextFcn (/opt/nodejs/node_modules/aws-xray-sdk-core/lib/capture.js:117:15)", " at Object.captureAsyncFunc (/opt/nodejs/node_modules/aws-xray-sdk-core/lib/capture.js:69:12)", " at Runtime.t.handler (/var/task/src/captureScreenshot.js:1:1789)" ] }.

Now it is doing it all the time even with the nytimes starter example.

Is there any cache or permanent settings implemented?

I tried to rebuild and the error is gone but I don't know the reason or if it is even related....

Is there any way to stabilize the environment for production?

Hello @rafasashi , sorry for replying so late. I hope you found the problem by now.

Thanks for reaching out @luisfarzati. It is working just fine in prod right now.

I could not reproduce the error so I can't tell you more about it unfortunately...

I close the issue for the moment.