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
💡 Are you able to provide enough information to be able to reproduce your issue locally?
I can provide enough details to reproduce my issue on local environment.
Synpress version
3.7.3
Node.js version
20.10.0
Operating system
Windows 11
Run mode
Synpress (standalone)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
This issue could be related to docker.
What happened?
I have a Playwright+Sypress TypeScript test that installs Metamask into Chrome and logs in to a website.
Used metamask fixtures from Sypress examples https://github.com/synpress-io/synpress-examples/tree/master/playwright , almost exactly copypasted the example fixture into my test adding just the seed phrase and password.
Playwright opens Chromium, goes to extensions blinks for a second, then immediately crashes with an exception:
TypeError: Cannot read properties of undefined (reading 'waitForTimeout')
at ..\fixtures.ts:46
44 |
45 | // setup metamask
46 | await initialSetup(chromium, {
| ^
47 | secretWordsOrPrivateKey:
48 | "test test test test test test test test test test test junk",
49 | network: "optimism",
at Object.fixBlankPage (C:\Users\rkoma\Documents\Work\Lisa\Src\synpress\synpress_373-examples\playwright\isolated-state\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]__b_kejanbpmtdrkmqkoz7n3cj7t74\node_modules\@synthetixio\synpress\commands\playwright.js:399:16)
at initialSetup (C:\Users\rkoma\Documents\Work\Lisa\Src\synpress\synpress_373-examples\playwright\isolated-state\node_modules\.pnpm\@[email protected]_@[email protected]_@[email protected]_@[email protected]__b_kejanbpmtdrkmqkoz7n3cj7t74\node_modules\@synthetixio\synpress\commands\metamask.js:1526:22)
If debugged through Visual Studio code -> Debug test it goes through the process and installs the extension, apparently fixBlankPage crashes or needs more time.
Everything was working fine about 3 weeks, then after a break ran the test on 12-Aug. Happens on Synpress 3.7.3 and 3.7.2-beta3.
Run the test in chromium (add a shortcut command into package.json if wanted)
npx playwright test --project=chromium -g "Metamask login"
Relevant log output
C:\Src\synpress\synpress_373-examples\playwright\isolated-state>pnpmmetamasktest> @synpress-io/synpress-playwright-isolated-state-example@1.0.0metamasktest C:\Src\synpress\synpress_373-examples\playwright\isolated-state>playwrighttest--project=chromium-g"Metamask login"Running1testusing1worker1)[chromium]›Lisa-metamask-login.spec.ts:14:5›Metamasklogin────────────────────────────────
TypeError: Cannotreadpropertiesofundefined(reading'waitForTimeout')at..\fixtures.ts:4644|45|// setup metamask>46|awaitinitialSetup(chromium,{|^47|secretWordsOrPrivateKey:
48|"test test test test test test test test test test test junk",49|network: "optimism",atObject.fixBlankPage(C:\Src\synpress\synpress_373-examples\playwright\isolated-state\node_modules\.pnpm\@synthetixio+synpress@3.7.3_@babel+core@7.22.9_@babel+preset-env@7.22.9_@babel+core@7.22.9__b_kejanbpmtdrkmqkoz7n3cj7t74\node_modules\@synthetixio\synpress\commands\playwright.js:399:16)atinitialSetup(C:\Src\synpress\synpress_373-examples\playwright\isolated-state\node_modules\.pnpm\@synthetixio+synpress@3.7.3_@babel+core@7.22.9_@babel+preset-env@7.22.9_@babel+core@7.22.9__b_kejanbpmtdrkmqkoz7n3cj7t74\node_modules\@synthetixio\synpress\commands\metamask.js:1526:22)atObject.context(C:\Src\synpress\synpress_373-examples\playwright\isolated-state\fixtures.ts:46:5)1failed[chromium]›Lisa-metamask-login.spec.ts:14:5›Metamasklogin─────────────────────────────────
The text was updated successfully, but these errors were encountered:
I initially used Synpress 3.7.2-beta3, it was working fine until August 2024 when it started getting this error. Upgrade to 3.7.3 did not help, and 3.7,2-beta 3 also has the same issue.
I suspect it may be something with Metamask extension or Chrome itself, but the error does not suggest it..
@r-komarov let try with fixed playwright version (remove ^) "@playwright/test": "1.37.0",
@thinguyen-gft, It was initially working with 1.37.0, then stopped. Just tried again now - same error.
"Cannot read properties of undefined (reading 'waitForTimeout')"
🔎 Have you searched existing issues to avoid duplicates?
🧪 Have you tested your code using latest version of Synpress?
💡 Are you able to provide enough information to be able to reproduce your issue locally?
Synpress version
3.7.3
Node.js version
20.10.0
Operating system
Windows 11
Run mode
Synpress (standalone)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
What happened?
I have a Playwright+Sypress TypeScript test that installs Metamask into Chrome and logs in to a website.
Used metamask fixtures from Sypress examples https://github.com/synpress-io/synpress-examples/tree/master/playwright , almost exactly copypasted the example fixture into my test adding just the seed phrase and password.
Playwright opens Chromium, goes to extensions blinks for a second, then immediately crashes with an exception:
TypeError: Cannot read properties of undefined (reading 'waitForTimeout')
at ..\fixtures.ts:46
44 |
45 | // setup metamask
If debugged through Visual Studio code -> Debug test it goes through the process and installs the extension, apparently fixBlankPage crashes or needs more time.
Everything was working fine about 3 weeks, then after a break ran the test on 12-Aug. Happens on Synpress 3.7.3 and 3.7.2-beta3.
What is your expected behavior?
Metamask extension installed
How to reproduce the bug.
import { test, expect } from "../fixtures";
import * as metamask from "@synthetixio/synpress/commands/metamask";
const LisaUrl = process.env.PLAYWRIGHT_TEST_BASE_URL || 'https://dev.lisafoundation.com/';
const LisaMainPageTitle = 'Explore - LISA Foundation';
const extendedTimeout = 30000; // 30 sec - longer timeout for slow operations
const metamaskWallet = '';
const metamaskUserName = 'User name';
test('Metamask login', async ({ page }) => {
await page.goto(LisaUrl);
await page.getByRole('button', { name: 'Sign in' }).click();
await page.locator('div:nth-child(3) > button').first().click();
await metamask.acceptAccess();
await expect(page.getByText(metamaskUserName)).toBeVisible({ timeout: extendedTimeout });
});
npx playwright test --project=chromium -g "Metamask login"
Relevant log output
The text was updated successfully, but these errors were encountered: