Error: Could not compute box model.
at /github/workspace/app/node_modules/chrome-remote-interface/lib/chrome.js:93:35
at Chrome._handleMessage (node_modules/chrome-remote-interface/lib/chrome.js:256:17)
at WebSocket.<anonymous> (node_modules/chrome-remote-interface/lib/chrome.js:234:22)
at WebSocket.EventEmitter.emit (domain.js:483:12)
at Receiver.receiverOnMessage (node_modules/ws/lib/websocket.js:797:20)
at Receiver.EventEmitter.emit (domain.js:483:12)
at Receiver.dataMessage (node_modules/ws/lib/receiver.js:437:14)
at /github/workspace/app/node_modules/ws/lib/receiver.js:394:23
at /github/workspace/app/node_modules/ws/lib/permessage-deflate.js:306:9
at /github/workspace/app/node_modules/ws/lib/permessage-deflate.js:385:7
at afterWrite (_stream_writable.js:490:5)
at onwrite (_stream_writable.js:470:7)
at InflateRaw.afterTransform (_stream_transform.js:98:3)
at Zlib.processCallback (zlib.js:578:8)
at Zlib.callbackTrampoline (internal/async_hooks.js:120:14)
I have no idea why this is happening or what is causing this. The same test often also works but often, it fails with the error message above.
node 12
taiko 1.0.23
Is there a sample that we could use to replicate? otherwise it is going to be difficult debugging the issue.
@NivedhaSenthil unfortunately there is no exact stack trace that leads to the line in the test causing this. According to other logging, I guess the error happens somewhere in the following lines:
await text(text1, below("Text2")).exists();
expect(await text(text1, near($("#comment"))).exists(), "Comment text failure").to.be.true;
const textParts = testMultiText.split("\n");
for (let index = 0; index < textParts.length; index++) {
const textPart = textParts[index];
expect(await text(textPart, near($("#comment"))).exists(), "Comment text part failure").to.be.true;
}
await click($("#abort"));
await click("Yes");
await click("View", undefined, toRightOf("Edit"));
await click("List", undefined, below("View"));
await click(link("Link"), undefined, near($("#grid")));
expect(await text("Aborted").exists(), "Text is not present!").to.be.true;
Same goes for me, I got this error several times randomly. Then I re-run it without changing anything, no error.
@dewirosalin if you can give us a sample script to replicate.. it will be really helpful fixing this faster.
I could see this happening when I explicitly try to click on a hidden element by passing {selectHiddenElements:true} option to a selector. Taiko filters hidden element when selecting elements... I have a suspicion that once the element is selected and in between the action is performed the selected element is becoming hidden which might lead to this and be intermittent depending on if the element becomes hidden or not. Am trying to fix this case but it will be helpful if I can get a real scenario where this exception occurs
@NivedhaSenthil I'm sorry but like I mentioned before, it happens randomly. And no, it's not a hidden element. My script as simple as await click(button("Cancel")) and this error appear. And the next time this error appear is when I want to click the autocomplete option. The script just await click("Option Text") nothing special. But it didn't happen everytime I run the spec. I'm using mat-autocomplete just in case you need the information.
I hope this will help.
There are some fixes done on click.. can you please check if this is fixed in latest version of Taiko(1.0.26)
@ceisele-r and @dewirosalin any updates on the issue ?
As for me, I don't see this error anymore so far.
Most helpful comment
As for me, I don't see this error anymore so far.