Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changeMetamaskNetwork is not working #244

Closed
lefuncq opened this issue Oct 16, 2021 · 4 comments
Closed

changeMetamaskNetwork is not working #244

lefuncq opened this issue Oct 16, 2021 · 4 comments

Comments

@lefuncq
Copy link

lefuncq commented Oct 16, 2021

Hi again,

The changeMetamaskNetwork is not working currently I tried to call it with and without await but it doesn't fix the issue.

My output

 CypressError: Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise.

The command that returned the promise was:

  > `cy.task()`

The cy command you invoked inside the promise was:

  > `cy.changeMetamaskNetwork()`

Because Cypress commands are already promise-like, you don't need to wrap them or return your own promise.

Cypress will resolve your command with whatever the final Cypress command yields.

The reason this is an error instead of a warning is because Cypress internally queues commands serially whereas Promises execute as soon as they are invoked. Attempting to reconcile this would prevent Cypress from ever resolving.
      at $Cy.cy.<computed> [as changeMetamaskNetwork] (http://localhost:3000/__cypress/runner/cypress_runner.js:157795:23)

@drptbl
Copy link
Member

drptbl commented Oct 16, 2021

Hey,

Can you tell me the exact vesion of synpress that you use?

Thanks,
Jakub.

@lefuncq
Copy link
Author

lefuncq commented Oct 16, 2021

Here it is ;)

 "devDependencies": {
    "@synthetixio/synpress": "^0.9.14",
``
`

@drptbl
Copy link
Member

drptbl commented Oct 16, 2021

@NameItNow try to bump your synpress version to 0.9.25-beta.17 and please try again. Let me know if it works, so that we can close this issue.

Thanks,
Jakub.

@lefuncq
Copy link
Author

lefuncq commented Oct 18, 2021

Thank you did the job!

@lefuncq lefuncq closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants