Comments (21)
@drptbl Thanks for the fast response. Using version 0.9.25-beta.26 I am still experiencing the same issue.
I am applying a screenshot with part of the latest fix you provided await puppeteer.metamaskWindow().waitForTimeout(1000);
just to be sure I applied the last changes.
from synpress.
@DimitarTAtanasov @RAMTO @ochikov thanks for reports guys. I will take a look in to this asap (today).
Cheers,
Jakub.
from synpress.
@DimitarTAtanasov @RAMTO @ochikov this issue should be fixed now.
Please use: @synthetixio/[email protected]
and let me know if it works for you now.
It was a quick fix, I will come up with something better until end of the week, but it should be still fine for now.
I'm going to work on Metamask 10+ support in upcoming week and support both versions (<10 also).
Thanks,
Jakub.
from synpress.
@drptbl Can you give us a hand once again? Thank you in advance.
from synpress.
Thanks for everything @DimitarTAtanasov, gonna dig in to this today, hopefully will have some solution until tonight.
from synpress.
@drptbl seems to be working with 0.9.25-beta.30 with waitAndSetValue
. I think you are right, It seems this could be puppeter related issue. Thanks for the help @drptbl really appreciate it.
I think we could close this issue.
If you find time to include the changes for changeMetamaskNetwork
in some of the next releases I will be extremely grateful.
Thanks again and have a nice evening :)
from synpress.
The same issue on my side.
from synpress.
Yep, on my as well
from synpress.
@DimitarTAtanasov @ochikov sure, with pleasure :).
Few questions:
- Is there any chance your test code is open sourced, so that I can reproduce the issue on my machine? Since yesterday fixes I can't reproduce it anymore.
- Do you run your e2e tests on MacOS/Linux/Windows/inside docker?
- Just to make sure, you're using
synpress run
for the whole time, right? - Do you use your PC while tests are running? They need a focus of browser sometimes (only while confirming transaction in metamask notification window), so at this specific point you shouldn't be interfering with window focus.
- Did you reproduce this issue only on 1 machine or does it happen on multiple machines? I can see few people participating in this conversation and I'm wondering if they're also having this issue on their machines?
Thanks for answers in advance, they will help me out with debugging. I will continue investigating this today.
Cheers,
Jakub.
from synpress.
- Unfortunately the code is not open sourced, I will try to record a video and will upload it later.
- Currently I am executing the tests on MacOS, tried also on Windows machine with the same result (I have plans to execute them in docker in future if possible)
- I run the tests using 'synpress run' as described in documentation
- Tried not touching anything after started the tests, still the same issue.
- Tried on two MacOS machines and one windows machine so far, the result is always the same.
Again when I remove the calling of
await puppeteer.waitClearAndType( newGasFee, confirmPageElements.gasFeeInput, notificationPage, );
the confirmation is successful
I will try to record and upload a video asap. Please let me know if I could help with something else in the investigation.
from synpress.
Sorry closed the issue by mistake. Reopening it
from synpress.
https://drive.google.com/file/d/1inv-_YzR0RgQ5ziaZdZV5jFZi2oP9zk2/view here is the link for the video recorded
from synpress.
One more thing which is probably not for this discussion, but in the "changeMetamaskNetwork" if we have network set from the .env, we will not able to change the network as no matter what we pass to the function it will be replaced with the value from the env.
changeMetamaskNetwork: async network => { if (process.env.NETWORK_NAME) { network = process.env.NETWORK_NAME; } else { network = 'kovan'; } const networkChanged = await metamask.changeNetwork(network); return networkChanged; },
If "changeMetamaskNetwork" is made like this on purpose can we have another one for example:
changeMetamaskToSpecificNetwork: async network => { let networkChanged = false; if(network) { networkChanged = await metamask.changeNetwork(network); } return networkChanged; },
This way the user will be able to change the metamask network even if there is a network set in the .env.
Sorry if I am missing something :)
If you agree with this I could make a PR for this one.
Thanks again
from synpress.
Hey @DimitarTAtanasov, could you please try to run this test on your machine?
https://gist.github.com/drptbl/223e869a7954c393702a3f9d73470412
Just copy content and create new example-spec.js
file inside specs
folder.
Command to run:
SECRET_WORDS='fill, your, secret, words' BASE_URL=https://rinkeby.gnosis-safe.io/app/\#/welcome NETWORK_NAME=rinkeby npx synpress run
It creates a new gnosis safe on rinkeby, it's ugly but I wanted to do it as fast as possible as it will go to trash anyway.
Can you let me know if it works for you? Or do you have same issues as above?
I'm really trying to figure out what's going on, there is no way for me to reproduce the issue. I was thinking that maybe it's OS-related, but I'm also on macOS.
side-note:
I will also fix the issue with changeMetamaskNetwork
that you've mentioned above using occasion after I get the idea where the main issue is.
Thanks again and sorry for taking your time. I'm still investigating in the meantime.
This is how it works on my macOS, just fine:
from synpress.
This example works on my end as well. This is so confusing as I am using the confirmation the same way as in the example you gave me. I will try to dig more in this as well and will get back to you as soon as I have any result.
Thanks again for the time spent on this.
from synpress.
Sorry just realized that the example worked for me as I removed the call of await puppeteer.waitClearAndType( newGasFee, confirmPageElements.gasFeeInput, notificationPage, );
in confirmTransaction
Still have the same issue when execute it with the original code...
from synpress.
@DimitarTAtanasov Thanks for confirming! I'm currently trying to find another solution for waitClearAndType
behind the scenes. I should have something ready in ~1h.
from synpress.
Sure, thanks again, it is really strange why await input.click({ clickCount: 3 });
in waitClearAndType
is failing for me and working for you.
from synpress.
@DimitarTAtanasov Pushed a new update, confirmTransaction
is now using waitAndSetValue
instead of waitClearAndType
.
Please try this version:
"@synthetixio/synpress": "0.9.25-beta.30"
And let me know if it has changed anything. If not, I will keep digging.
Sorry for inconvenience. It's really hard to fix an issue when you're not able to reproduce it.
Thanks,
Jakub.
from synpress.
Damn.. I think that I've actually found related issue that we're experiencing:
puppeteer/puppeteer#3347
confirmTransaction
is the only place in the code which uses click()
directly from puppeteer, so it makes sense.
from synpress.
Thanks for confirming @DimitarTAtanasov and thanks for helping me out to solve this one.
I will fix changeMetamaskNetwork
tomorrow morning. It's an easy fix.
Related issue:
#253
All best,
Jakub.
from synpress.
Related Issues (20)
- Metamask window freeze after 'cy.confirmMetamaskTransaction() intermittently '[🐛 Bug]: <title> HOT 5
- [🐛 Bug]: Sometimes calling metamask.confirmPermissionToApproveAll() method on Metamask approve window is failing using Playwright + Synpress as plugin HOT 7
- [🐛 Bug]: Can't run synpress 3.7.2-beta.9 in Github Actions (`cy.task('setupMetamask')` timed out after waiting `120000ms`.) HOT 3
- [🐛 Bug]: Alpha version: Wallet cache hashes are different between generation and test HOT 8
- [💡 Feature]: ability to use a custom browser when creating a cache
- [🐛 Bug]: waiting for locator('[data-testid=account-options-menu-button]').first()
- `cy.task('setupMetamask')` failed with ECONNREFUSED 127.0.0.1:9222 ("before all" hook) HOT 2
- Expect to support tronlink connections
- No response from RPC HOT 2
- confirmSignatureRequest() failing in Playwright + Synpress - Error: page.waitForSelector: Target closed waiting for locator('.notification .request-signature__footer__sign-button') to be visible
- [🐛 Bug]: Wrong uncaught exception handing produces "process is not defined" error HOT 3
- [💡 Feature]: Synpress with fully parallel run with metamask windows HOT 4
- [🐛 Bug]: An error of 'Timeout 30000ms exceeded.' occurred in Docker mode But Correct in non Docker mode HOT 12
- Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (1:0) HOT 16
- [💡 Feature]: Validate all user inputs with zod
- [🐛 Bug]: Module parse failed: Unexpected token HOT 2
- [💡 Feature]: Save metamask configuration in a fixture so that the entire setup doesn't happen with every run
- [🐛 Bug]: `cy.importMetamaskAccount()` timeout on duplicate account HOT 1
- [💡 Feature]: Autoconnect a newly switched account to the dapp if one was connected previously HOT 1
- can't run with playwright HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synpress.