You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use page.evaluateHandle and kept getting an error: TypeError: Converting circular structure to JSON. Everything I was sending was either Serializable or a JSHandle. Eventually, between reading the source and stepping through in the debugger, I discovered my error. I was passing a JSHandle inside an object as an argument: { scope: JSHandle }.
Would you be open to a patch that caught and re-raised that error, but also logged a warning about "Nesting JSHandles inside objects is not supported"? I would be happy to write it if you think this would be a worthwhile change.
The text was updated successfully, but these errors were encountered:
Would you be open to a patch that caught and re-raised that error, but also logged a warning about "Nesting JSHandles inside objects is not supported"? I would be happy to write it if you think this would be a worthwhile change.
@bgschiller Yeah that would be nice. Please go for it!
bgschiller
added a commit
to bgschiller/puppeteer
that referenced
this issue
Nov 22, 2018
ExecutionContext.evaluateHandle accepts arguments that are either
serializable, or JSHandles. A potential confusion is that it *does not*
accept arguments that *contain* JSHandles.
This patch adds a log message warning when it encounters that situation.
Fixespuppeteer#3562
ExecutionContext.evaluateHandle accepts arguments that are either
serializable, or JSHandles. A potential confusion is that it *does not*
accept arguments that *contain* JSHandles.
This patch adds a log message warning when it encounters that situation.
Fixes#3562
I was trying to use
page.evaluateHandle
and kept getting an error:TypeError: Converting circular structure to JSON
. Everything I was sending was either Serializable or a JSHandle. Eventually, between reading the source and stepping through in the debugger, I discovered my error. I was passing a JSHandle inside an object as an argument:{ scope: JSHandle }
.Would you be open to a patch that caught and re-raised that error, but also logged a warning about "Nesting JSHandles inside objects is not supported"? I would be happy to write it if you think this would be a worthwhile change.
The text was updated successfully, but these errors were encountered: