Page crashed on page.pdf()
See original GitHub issueI’m facing a weird issue. I’m opening a page and increasing that page height through evaluate. $('body').css('height', '2000px')
. Then rendering it for pdf in a4 portrait At that point, my page crashed. And there is no specific error message.
Error: Page crashed! at Page._onTargetCrashed (/home/puppeteerTest/node_modules/puppeteer/lib/Page.js:156:24) at CDPSession.Page.client.on.event (/home/puppeteerTest/node_modules/puppeteer/lib/Page.js:132:56) at emitOne (events.js:116:13) at CDPSession.emit (events.js:211:7) at CDPSession._onMessage (/home/puppeteerTest/node_modules/puppeteer/lib/Connection.js:232:12) at Connection._onMessage (/home/puppeteerTest/node_modules/puppeteer/lib/Connection.js:119:19) at emitOne (events.js:116:13) at WebSocket.emit (events.js:211:7) at Receiver.receiverOnMessage (/home/puppeteerTest/node_modules/ws/lib/websocket.js:720:20) at emitOne (events.js:116:13) at Receiver.emit (events.js:211:7) at Receiver.dataMessage (/home/puppeteerTest/node_modules/ws/lib/receiver.js:414:14) at Receiver.getData (/home/puppeteerTest/node_modules/ws/lib/receiver.js:346:17) at Receiver.startLoop (/home/puppeteerTest/node_modules/ws/lib/receiver.js:133:22) at Receiver._write (/home/puppeteerTest/node_modules/ws/lib/receiver.js:69:10) at doWrite (_stream_writable.js:397:12)
Without increasing the height of the body, pdf renders in 1 page which is suppose to have multipage. The rest of the pages are hidden. That is why I tried to increase the height of the body. Note:
- The issue doesn’t occur all the time. For other pages, it worked just fine for the same scenario. The only difference between the two pages is the error page is a responsive web page
page.screenshot()
works just fine. The issue only occurs with the pdf.- The same scenario works fine in phantomjs
page.render();
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top GitHub Comments
We’re marking this issue as unconfirmed because it has not had recent activity and we weren’t able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.
We’re marking this issue as unconfirmed because it has not had recent activity and we weren’t able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.