Closed ekingunoncu closed 7 months ago
Hmm, you're right. As reference, here's the test I used:
test("should take screenshot", async ({ runCrxTest }) => {
await runCrxTest(async ({ expect, page, server }) => {
await page.goto(server.EMPTY_PAGE);
await page.setContent('<h1>Hello World!</h1>');
const screenshot = await page.screenshot();
expect(screenshot).not.toBeNull();
});
});
and the stacktrace with sourcemap:
validatorPrimitives.ts:68 Uncaught Error: binary: expected base64-encoded buffer, got object
at tBinary (validatorPrimitives.ts:68:11)
at validatorPrimitives.ts:112:21
at CrxConnection.dispatch (connection.ts:161:26)
at CrxConnection.dispatch (crxConnection.ts:51:18)
at index.ts:46:81
at run (setImmediate.js:40:13)
at runIfPresent (setImmediate.js:69:21)
at channel.port1.onmessage (setImmediate.js:128:13)
I already fixed the bug, and I'm going to release a new version today or tomorrow with playwright 1.42.0
I just released 0.4.0
Thank you very much!
Hello Rui,
I hope you are doing well. After the below commit 18ca4ea we are unable to take screenshots.
We are getting the error below:
It was working on the commit d808a75
The issue is not reproducible via unit tests, for example, the below code takes the screenshot:
To reproduce the issue we have to load it as an extension to chrome. We can simply add before createTodos
I believe the change was the playwright's version. Since the difference is huge and the change caused the issue is not on our side I don't know where to look for the fix.
I would love to help if you can give me a direction. Thanks in advance, Best regards,
Ekin