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
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:
Save the reproducible example as repro.js.
Run npm install puppeteer (to install the latest version).
Run 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:
file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:97
#error = new ProtocolError();
^
ProtocolError: Protocol error (script.callFunction): unknown error Cannot convert undefined or null to object TypeError: Cannot convert undefined or null to object
at Function.hasOwn (<anonymous>)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js:65:20)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WindowRealm.js:93:22)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js:88:26)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WindowRealm.js:93:22)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js:88:26)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WindowRealm.js:93:22)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js:88:26)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WindowRealm.js:93:22)
at WindowRealm.serializeForBiDi (/home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js:88:26)
at <instance_members_initializer> (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:97:14)
at new Callback (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:101:16)
at CallbackRegistry.create (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:20:26)
at BidiConnection.send (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Connection.js:51:32)
at Session.send (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.js:134:42)
at Session.<anonymous> (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/util/decorators.js:101:27)
at WindowRealm.callFunction (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.js:92:51)
at WindowRealm.<anonymous> (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/util/decorators.js:101:27)
at #evaluate (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js:134:42)
at BidiFrameRealm.evaluate (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js:104:36)
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:
timvandermeij
changed the title
[Bug]: TypeError: Cannot convert undefined or null to object with resolve argument of a Promise
[Regression]: TypeError: Cannot convert undefined or null to object with resolve argument of a Promise
Dec 21, 2024
/cc @OrKoN@jrandolf-2 as authors of the original PR since you probably know much more about this code than I do.
timvandermeij
changed the title
[Regression]: TypeError: Cannot convert undefined or null to object with resolve argument of a Promise
[Bug]: TypeError: Cannot convert undefined or null to object with resolve argument of a Promise
Dec 21, 2024
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: