With the changes on bug 1937118 landed I can force an unhandled error of type `MessageHandlerFrame:MessageHandlerFrameParent:sendCommand: message reply cannot be cloned.` when the called code in the child JSWindowActor returns data that cannot be cloned. In this case it's a Promise. The change required to see the issue is: ```diff diff --git a/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs b/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs index 7d99ae7fe9cd9..831e608df7ea7 100644 --- a/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs +++ b/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs @@ -194,17 +194,17 @@ class InputModule extends WindowGlobalBiDiModule { async _finalizeAction() { // Terminate the current wheel transaction if there is one. Wheel // transactions should not live longer than a single action chain. ChromeUtils.endWheelTransaction(); // Wait for the next animation frame to make sure the page's content // was updated. - await lazy.AnimationFramePromise(this.messageHandler.window); + return lazy.AnimationFramePromise(this.messageHandler.window); } ``` Then run `webdriver/tests/bidi/input/perform_actions/pointer_mouse.py` and you will see this test failure: ``` FAIL test_click_navigation - webdriver.bidi.error.UnknownErrorException: unknown error ([Exception... "MessageHandlerFrame:MessageHandlerFrameParent:sendCommand: message reply cannot be cloned." nsresult: "0x80004005 (DataCloneError)" location: "<unknown>" data: no]) ``` Maybe it's a platform issue that is causing it? Otherwise maybe we have a chance to better handle it?
Bug 1937745 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
With the changes on bug 1937118 landed I can force an unhandled error of type `MessageHandlerFrame:MessageHandlerFrameParent:sendCommand: message reply cannot be cloned.` when the called code in the child JSWindowActor returns data that cannot be cloned. In this case it's a Promise. The change required to see the issue is: ```diff diff --git a/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs b/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs index 7d99ae7fe9cd9..831e608df7ea7 100644 --- a/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs +++ b/remote/webdriver-bidi/modules/windowglobal/input.sys.mjs @@ -194,17 +194,17 @@ class InputModule extends WindowGlobalBiDiModule { async _finalizeAction() { // Terminate the current wheel transaction if there is one. Wheel // transactions should not live longer than a single action chain. ChromeUtils.endWheelTransaction(); // Wait for the next animation frame to make sure the page's content // was updated. - await lazy.AnimationFramePromise(this.messageHandler.window); + return lazy.AnimationFramePromise(this.messageHandler.window); } ``` Then run `test_click_navigation` from `webdriver/tests/bidi/input/perform_actions/pointer_mouse.py` and you will see this test failure: ``` FAIL test_click_navigation - webdriver.bidi.error.UnknownErrorException: unknown error ([Exception... "MessageHandlerFrame:MessageHandlerFrameParent:sendCommand: message reply cannot be cloned." nsresult: "0x80004005 (DataCloneError)" location: "<unknown>" data: no]) ``` Maybe it's a platform issue that is causing it? Otherwise maybe we have a chance to better handle it?