-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: TypeError: Cannot convert undefined or null to object
with resolve argument of a Promise
#13433
Comments
TypeError: Cannot convert undefined or null to object
with resolve argument of a PromiseTypeError: Cannot convert undefined or null to object
with resolve argument of a Promise
I think the problem is that the check introduced in https://github.com/GoogleChromeLabs/chromium-bidi/pull/2039/files is not present in /cc @OrKoN @jrandolf-2 as authors of the original PR since you probably know much more about this code than I do. |
TypeError: Cannot convert undefined or null to object
with resolve argument of a PromiseTypeError: Cannot convert undefined or null to object
with resolve argument of a Promise
Thanks for filing the issue once again. Indeed it regressed due to the lack of test coverage. I am adding a WPT test and a fix into chromium-bidi. |
Deeply nested nodes do not include values in CDP, thus, Object.hasOwn throws an error because only objects are allowed as the first arg. Drive-by: improve types Caused by: #2622 Addresses: puppeteer/puppeteer#13433 WPT test: https://github.com/web-platform-tests/wpt/pull/49821/files
This is now fixed in the releases It seem the dependency was not updated correctly. |
Minimal, reproducible example
Background
This bug was previously fixed in #12111, but unfortunately it seems like it has returned. This was found in the context of mozilla/pdf.js#17961 where we try to enable WebDriverBidi for Chrome in the Mozilla PDF.js project again, and currently lots of test fail because of this.
Steps to reproduce:
repro.js
.npm install puppeteer
(to install the latest version).node repro.js
and notice the traceback.Note that this only fails for Chrome with WebDriverBiDi. It works for Firefox with WebDriverBiDi and for Chrome with CDP.
Expectation
The script doesn't log anything.
Reality
The script logs the following traceback for Chrome with WebDriverBiDi:
Puppeteer configuration file (if used)
No response
Puppeteer version
23.11.1
Node version
23.4.0
Package manager
npm
Package manager version
10.9.2
Operating system
Linux
The text was updated successfully, but these errors were encountered: