Evaluate returns undefined but chromium correctly has value inside evaluate
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.3.0
- Platform / OS version: OS X Sierra 10.12.6
- URLs (if applicable):
- Node.js version: 8.10.0
What steps will reproduce the problem?
You can run this gist here: https://gist.github.com/chrisabrams/a2a098d1b2d697f349f4e1ad1be98602
What is the expected result? The expected result is that evaluate will return the list of nodes
What happens instead?
Instead, evaluate returns undefined
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Page.evaluate() returns undefined, but statement works in ...
I get the output as an object containing arrays of 10 items each in the devTools, but when I run it in the...
Read more >Puppeteer documentation - DevDocs
Puppeteer is a Node library which provides a high-level API to control Chromium or Chrome over the DevTools Protocol. The Puppeteer API is...
Read more >Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError: Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an undefined...
Read more >Introduction to using XPath in JavaScript - MDN Web Docs
This method evaluates XPath expressions against an XML based document (including HTML documents), and returns a XPathResult object, which can be ...
Read more >Why does console.log() return 'undefined'? - Bits and Pieces
Thus after every bit of code you enter in the REPL is read, evaluated and ... /24342748/why-does-console-log-say-undefined-and-then-the-correct-value ...
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
If I get this right, DevTools protocol cannot serialize an array of nodes and resolves it to
undefined
. If you make it an array of strings, this works:How about throwing an error when evaluate returns a non-Serializable value? cc @aslushnikov