question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Page crashed on page.pdf()

See original GitHub issue

I’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:

  1. 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
  2. page.screenshot() works just fine. The issue only occurs with the pdf.
  3. The same scenario works fine in phantomjs page.render();

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Nov 5, 2022

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.

1reaction
stale[bot]commented, Jun 27, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve Acrobat intermittent crashes on Windows
Solution 4: Launch Acrobat Distiller and check if Acrobat is activated ... Press Windows key + R to open the Run command window....
Read more >
browsers crash when generating print preview of a PDF prior to
All browsers crash when generating print preview of a PDF prior to printing. Can't print. Hello-. I updated both my Chrome and MS...
Read more >
Adobe Reader 10 crashes when a document is opened in it ...
If I set Adobe Reader to prepare the document one page at a time, the crash doesn't happen, no matter witch reading mode...
Read more >
Big Sur: "Save as PDF" crashing - Apple Support Communities
Thanks. Already tried. "Export as PDF" works fine, but isn't available in every application. In Word e.g. the workaround is "Saver as.
Read more >
Displaying a PDF with the pdf.js viewer crash Chrome - Monorail
Issue 333594: Displaying a PDF with the pdf.js viewer crash Chrome ... The weird thing is I can reproduce all day long on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found