v1.18.0 Page.pdf - Protocol error (IO.read): Invalid parameters handle: string value expected
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version:
1.18.0
- Platform / OS version:
AWS Lambda / Amazon Linux
- Node.js version:
8.10
What steps will reproduce the problem?
await page.setContent(HTML);
await page.pdf({
path: "/tmp/filename.html",
format: "A4",
margin: {
top: 0,
bottom: 0,
left: 0,
right: 0
},
preferCSSPageSize: true,
printBackground: true
});
Stack Trace:
{
"errorMessage": "Protocol error (IO.read): Invalid parameters handle: string value expected",
"errorType": "Error",
"stackTrace": [
"Promise (/var/task/node_modules/puppeteer-core/lib/Connection.js:183:56)",
"new Promise (<anonymous>)",
"CDPSession.send (/var/task/node_modules/puppeteer-core/lib/Connection.js:182:12)",
"Function.readProtocolStream (/var/task/node_modules/puppeteer-core/lib/helper.js:238:37)",
"<anonymous>",
" -- ASYNC --",
"Page.<anonymous> (/var/task/node_modules/puppeteer-core/lib/helper.js:111:15)",
"convert (/var/task/convert.js:74:27)",
"<anonymous>",
"process._tickDomainCallback (internal/process/next_tick.js:228:7)"
]
}
"convert (/var/task/convert.js:74:27)"
is where await page.pdf(...);
call is.
- Lunch
await puppeteer.launch();
- Browser new page
await browser.newPage();
- Page set content
await page.setContent(HTML)
- Page pdf
await page.pdf(...);
What is the expected result?
PDF saved to /tmp/filename.pdf
What happens instead?
Error: Protocol error (IO.read): Invalid parameters handle: string value expected
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Pdf options: Invalid parameters handle: string value expected ...
I want to convert html to pdf so I am using puppeteer, ... Protocol error (IO.read): Invalid parameters handle: string value expected.
Read more >How to fix Puppeteer 'Error: Protocol error (Emulation ...
How to fix Puppeteer 'Error: Protocol error (Emulation.setDeviceMetricsOverride): Invalid parameters width: integer value expected; height: ...
Read more >page.goto() fails with Invalid Parameters : r/learnjavascript
It keeps failing with the stack below and I am not able to figure out what the invalid parameter is. ProtocolError: Protocol error...
Read more >Known issues with PaperCut MF, NG, Hive, Pocket and ...
This page lists all Known Issues across PaperCut products and includes information ... Print Deploy Client may show "Can't reach this page" error...
Read more >Fix list for IBM WebSphere Application Server V8.5
PH45688, Changing the WebSphere default protocol to TLS v1.3,TLS v1.2 ... with exception java.io.eofexception: unexpected end of zlib input stream error.
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
I encountered the same issue. Turns out I had
Chromium 72.0.3626.121
instead ofChromium 77.0.3865.120
with"puppeteer": "1.19.0"
… because I was using thenode:12-alpine
image in my Dockerfile instead ofnode:13-alpine
.@yhatt Either this or use a matching versions of chrome and puppeteer-core