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

Migration in V11 not working have to go over 10 #24643

Closed
rogoit opened this issue Nov 10, 2022 · 14 comments · Fixed by #24675
Closed

Migration in V11 not working have to go over 10 #24643

rogoit opened this issue Nov 10, 2022 · 14 comments · Fixed by #24675

Comments

@rogoit
Copy link
Contributor

rogoit commented Nov 10, 2022

Current behavior

Hello Friends,

today I wanted to upgrade a E2E testing project from version 9 to 11. The migration window "5 minutes" can not finishwork and was there endless.

Solution was to update from 9 to 10 and then install 11.

Desired behavior

That a upgrade from V9 to V11 just will work.

Test code to reproduce

Do not have it public

Cypress Version

9

Node version

14.7

Operating System

Ubuntu 22

Debug Logs

No response

Other

No response

@marktnoonan
Copy link
Contributor

Thanks for reporting this @rogoit! Could I please confirm, did you experience this in 11.0.0 or 11.0.1?

I've tried a couple of ways to reproduce this but migration directly into 11+ is working for me directly without going through 10.

Is the project you upgraded public by any chance? Did you see the migration steps displayed, and the spinner started after attempting the first step, or did Cypress just not ever show the specs?

Screen Shot 2022-11-10 at 9 48 45 AM

@rogoit
Copy link
Contributor Author

rogoit commented Nov 10, 2022

for me in 11.0.1

@marktnoonan
Copy link
Contributor

I wonder if you can share the old cypress.json from the project (with redactions if needed). Hard to say what the problem is (but very grateful that you reported a problem after you were personally unblocked!).

@xram
Copy link

xram commented Nov 10, 2022

I'm currently seeing the same behaviour attempting to upgrade from 7.3.0 to 11.0.1. I'll try going through 10 and report back. In the meantime, my cypress.json file looks like this:

{
  "baseUrl": "http://localhost:3000/",
  "experimentalFetchPolyfill": true,
  "retries": {
    "openMode": 0,
    "runMode": 2
  },
  "numTestsKeptInMemory": 0,
  "video": false,
  "viewportWidth": 1280,
  "viewportHeight": 960,
  "supportFile": "./cypress/support/index.ts",
  "chromeWebSecurity": false,
  "env": {
    "auth_audience": "<snip>",
    "auth_url": "http://localhost:3002/oauth/token",
    "auth_client_id": "<snip>",
    "auth_client_secret": "<snip>",
    "auth_username": "<snip>",
    "auth_password": "<snip>",
    "codeCoverage": {
      "exclude": ["**/service-worker-registration.ts", "**/lib/monitoring/*"]
    }
  }
}

@xram
Copy link

xram commented Nov 10, 2022

Upgrading to v10 first worked for me too. The migration helper came up almost straight away after running cypress open and stepped me through the changes when upgrading from 7 to 10. Trying to go from 7 to 11 just left me staring at a loading spinner and a message about it taking 5-10 minutes after running cypress open.

The subsequent upgrade from 10 to 11 has worked too.

@marktnoonan
Copy link
Contributor

Hmm. Thanks for this @xram. When you upgraded to 10, did you go for 10.0.0 or 10.11.0, the latest? That'll help narrow down the changes that could be causing this.

@marktnoonan
Copy link
Contributor

Just to document and confirm: still not able to reproduce - I forked cypress-test-tiny and set it up with Cy 8, then opened some tests. After that I installed 11.0.1 and opened Cypress, it correctly offered migration and migrated without an issue.

I'm keeping this issue open & I'm very interested in what could be the cause. I tried with your cypress.json @xram and no issues there.

@aspacek-se
Copy link

aspacek-se commented Nov 10, 2022

I just had the same issue, going from 9 -> 11.0.1 would hang during migration at this stage:

cypress:data-context:sources:GitDataSource Refreshing git data +1m
cypress:data-context:sources:GitDataSource On current branch main +260ms 

did 9 -> 10.11.0 -> 11.0.1 instead and both migrations were pretty much instantaneous

edit: it didn't really hang, it would just loop those two commands for 10 minutes before I killed it

@marktnoonan
Copy link
Contributor

marktnoonan commented Nov 10, 2022

Thanks @aspacek-se. If you have the time/interest in repeating the process, would you be able to do so with dev tools open on the launchpad? You can open them in the "Developer Tools" menu at the top. This will show if there any error recorded on the client side. Without reverting your whole project, you could rename cypress.config.ts to something else and add an empty cypress.json. That should put 11.0.1 in a migration state next time you open it.

@aspacek-se
Copy link

yup, here's the error

    "name": "CombinedError",
    "message": "[GraphQL] 'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)",
    "graphQLErrors": [
        {
            "message": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)",
            "path": [
                "migration",
                "configAfterCode"
            ],
            "extensions": {}
        }
    ],
    "response": {}

@marktnoonan
Copy link
Contributor

Thanks so much @aspacek-se!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 14, 2022

The code for this is done in cypress-io/cypress#24675, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Nov 14, 2022
@marktnoonan
Copy link
Contributor

This will be fixed in the next patch, thanks again to people reporting the issue even after you have unblocked yourselves 💯

@marktnoonan marktnoonan removed their assignment Nov 14, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 15, 2022

Released in 11.1.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v11.1.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants