-
-
Notifications
You must be signed in to change notification settings - Fork 221
Description
🔎 Have you searched existing issues to avoid duplicates?
- I have made sure that my issue is not a duplicate.
🧪 Have you tested your code using latest version of Synpress?
- I have made sure that my issue still exists on latest version of Synpress.
💡 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
4.1.2
Node.js version
22.17.0
Operating system
Ubuntu, playwright + synpress
Run mode
Playwright + Synpress (as plugin)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
- This issue could be related to docker.
What happened?
Hi everyone,
I'm struggling with the wallet setup after upgrading to the latest versions. The setup process hangs indefinitely on the MetaMask onboarding completion screen ("Your wallet is ready!").
Environment:
Synpress: ^4.1.2
Playwright: ^1.57.0
MetaMask: v13.x (Manifest V3)
OS: Linux (running with LIBGL_ALWAYS_SOFTWARE=1)
The Issue: During defineWalletSetup, the metamask.importWallet(SEED_PHRASE) finishes, but the browser remains stuck on the "Your wallet is ready!" onboarding page.
The metamask.addNetwork() and metamask.switchNetwork() methods fail because they timeout waiting for [data-testid="network-display"].
If I try to manually navigate to home.html to bypass the onboarding screen, MetaMask enters a locked state, and the defineWalletSetup parser often fails with Failed to extract defineWalletSetup callback or Target page, context or browser has been closed.
What I've tried:
Using metamask.addNetwork with isTestnet: true.
Manual page.goto to extension home URL (leads to lock screen).
Adding manual listeners for pageerror and console, but no significant errors appear until the timeout hits.
It seems like there is a race condition or a broken reference to the extension page after the onboarding finishes in MV3. The network-display element is never found because the setup doesn't "click through" the final onboarding button or handle the transition to the main UI correctly in this Playwright version.
Any advice on how to handle the MM v13 onboarding completion in Synpress v4?
Additional context on minimal setup: Even when I simplify defineWalletSetup to only include await metamask.importWallet(SEED_PHRASE), the resulting cache is unusable. When I run my actual tests using this cache, the MetaMask extension always opens back up to the "Your wallet is ready!" screen instead of the main dashboard.
It seems the importWallet method in Synpress v4 doesn't internally handle the final "Open wallet" click for MetaMask v13, and any attempt to click it manually or navigate away within defineWalletSetup causes the runner to crash or lose context. How are we supposed to persist a "ready-to-use" state for MM v13?
What is your expected behavior?
No response
How to reproduce the bug.
Jasně, tady máš kompletně připravenou sekci How to reproduce, kterou můžeš vložit do GitHub Issue nebo poslat na Discord. Je to napsané tak, aby i vývojáři Synpressu hned viděli, kde je v jejich vnitřní logice chyba.
How to reproduce the bug
Environment Setup: * Use Playwright ^1.57.0 and Synpress ^4.1.2.
Ensure MetaMask version is 13.x (Manifest V3).
Set up an Nx monorepo or a standard Playwright project.
Wallet Setup Configuration: Create a metamask.setup.ts using defineWalletSetup with the following minimal logic:
TypeScript
export default defineWalletSetup(PASSWORD, async (context, walletPage) => {
const metamask = new MetaMask(context, walletPage, PASSWORD);
await metamask.importWallet(SEED_PHRASE);
// No further actions
});
Execution: Run the setup command: npx synpress ./path/to/setup --force.
Observed Behavior:
The importWallet method completes its internal steps.
The browser remains stuck on the MetaMask onboarding screen showing "Your wallet is ready!".
Synpress CLI hangs indefinitely or throws a timeout error because it's waiting for the network-display element (main dashboard), which is hidden behind the onboarding completion overlay.
If any subsequent command like metamask.addNetwork() is called, it fails immediately with a timeout because the UI is not in the expected state.
Resulting Cache: If the setup somehow finishes (e.g., by manual intervention during the process), the cached state starts on the "Your wallet is ready!" screen, making every subsequent test fail as they cannot interact with the actual wallet UI.