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

Cryptic "Page crashed!" error inside Docker #258

Closed
jonathanmelville opened this issue Apr 26, 2018 · 2 comments
Closed

Cryptic "Page crashed!" error inside Docker #258

jonathanmelville opened this issue Apr 26, 2018 · 2 comments

Comments

@jonathanmelville
Copy link

My build process executes penthouse inside of a Docker container to generate critical CSS. I'm running up against the cryptic error Page crashed!. It seems to possibly be related to this issue, where there isn't enough available storage in the /dev/shm shared memory space for puppeteer to run.

I can see there is a flag you can pass to puppeteer, --disable-dev-shm-usage which tells it to fall back to using /tmp. I have tried to pass this in with the following option:

puppeteer: {
     getBrowser: () => puppeteer.launch({
          args: ['--disable-dev-shm-usage']
     })
}

This did not seem to do anything, I'm still getting the Page crashed! error. Are you able to offer any additional guidance on what could be going wrong? I have literally tried everything to get this to work.

Stack trace:

Error: Page crashed!
    at Page._onTargetCrashed (/buddy/seaside/node_modules/penthouse/node_modules/puppeteer/lib/Page.js:115:24)
    at CDPSession.Page.client.on.event (/buddy/seaside/node_modules/penthouse/node_modules/puppeteer/lib/Page.js:103:56)
    at emitOne (events.js:116:13)
    at CDPSession.emit (events.js:211:7)
    at CDPSession._onMessage (/buddy/seaside/node_modules/penthouse/node_modules/puppeteer/lib/Connection.js:204:12)
    at Connection._onMessage (/buddy/seaside/node_modules/penthouse/node_modules/puppeteer/lib/Connection.js:106:19)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at Receiver._receiver.onmessage (/buddy/seaside/node_modules/ws/lib/WebSocket.js:141:47)
    at Receiver.dataMessage (/buddy/seaside/node_modules/ws/lib/Receiver.js:389:14)
    at Receiver.getData (/buddy/seaside/node_modules/ws/lib/Receiver.js:330:12)
    at Receiver.startLoop (/buddy/seaside/node_modules/ws/lib/Receiver.js:165:16)
    at Receiver.add (/buddy/seaside/node_modules/ws/lib/Receiver.js:139:10)
    at Socket._ultron.on (/buddy/seaside/node_modules/ws/lib/WebSocket.js:138:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:607:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
FAILED
@pocketjoso
Copy link
Owner

Hi. The disable-dev-shm-usage flag would have been my first suggestion, but the way you tried it seems correct so no luck there then. Did you see the dedicated Puppeteer section for docker?
https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker

If that doesn't help, I don't have any concrete ideas, but I would suggest enabling Penthouse debugging, to see if there's anything strange going on:
https://github.com/pocketjoso/penthouse#enable-debug-logging

@pocketjoso
Copy link
Owner

Any update on this? Have you tried the latest penthouse version(s)?

Closing for now due to inactivity, but just comment if you still have problems and I will re-open.

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

2 participants