GithubHelp home page GithubHelp logo

Comments (21)

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024 3

@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.
Screenshot 2021-10-27 at 10 42 43

from synpress.

drptbl avatar drptbl commented on July 27, 2024 2

@DimitarTAtanasov @RAMTO @ochikov thanks for reports guys. I will take a look in to this asap (today).

Cheers,
Jakub.

from synpress.

drptbl avatar drptbl commented on July 27, 2024 1

@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.

ochikov avatar ochikov commented on July 27, 2024 1

@drptbl Can you give us a hand once again? Thank you in advance.

from synpress.

drptbl avatar drptbl commented on July 27, 2024 1

Thanks for everything @DimitarTAtanasov, gonna dig in to this today, hopefully will have some solution until tonight.

from synpress.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024 1

@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.

ochikov avatar ochikov commented on July 27, 2024

The same issue on my side.

from synpress.

RAMTO avatar RAMTO commented on July 27, 2024

Yep, on my as well

from synpress.

drptbl avatar drptbl commented on July 27, 2024

@DimitarTAtanasov @ochikov sure, with pleasure :).

Few questions:

  1. 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.
  2. Do you run your e2e tests on MacOS/Linux/Windows/inside docker?
  3. Just to make sure, you're using synpress run for the whole time, right?
  4. 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.
  5. 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.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

@drptbl

  1. Unfortunately the code is not open sourced, I will try to record a video and will upload it later.
  2. 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)
  3. I run the tests using 'synpress run' as described in documentation
  4. Tried not touching anything after started the tests, still the same issue.
  5. 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.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

Sorry closed the issue by mistake. Reopening it

from synpress.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

https://drive.google.com/file/d/1inv-_YzR0RgQ5ziaZdZV5jFZi2oP9zk2/view here is the link for the video recorded

from synpress.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

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.

drptbl avatar drptbl commented on July 27, 2024

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:
2021-10-27 23 03 03

from synpress.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

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.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

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.

drptbl avatar drptbl commented on July 27, 2024

@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.

DimitarTAtanasov avatar DimitarTAtanasov commented on July 27, 2024

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.

drptbl avatar drptbl commented on July 27, 2024

@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.

drptbl avatar drptbl commented on July 27, 2024

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.

drptbl avatar drptbl commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.