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

Incorrect Configuration error with testIsolation setting when experimentalSessionAndOrigin is true #24497

Closed
oatsoda opened this issue Nov 2, 2022 · 6 comments · Fixed by #24604
Assignees

Comments

@oatsoda
Copy link

oatsoda commented Nov 2, 2022

Current behavior

If you have a config like this:

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    experimentalSessionAndOrigin: true,
    testIsolation: "off",
  }
});

Then running Cypress works just fine.

*However, if you make ANY change to the config, then you'll get an error:

Your configFile at cypress.config.js set an invalid value:

Expected e2e.testIsolation to be not set unless the experimentalSessionAndOrigin flag is turned on.

Instead the value was: "off"

Error
    at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:272:41
    at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\config\src\browser.js:121:24
    at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:4967:15
    at baseForOwn (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:3032:24)
    at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:4936:18
    at Function.forEach (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:9410:14)
    at validate (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\config\src\browser.js:111:29)
    at ProjectConfigManager.validateConfigFile (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:268:31)
    at ProjectConfigManager.initializeConfig (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:82:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ProjectLifecycleManager.refreshLifecycle (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectLifecycleManager.js:271:9)

You have to restart Cypress for it to work again.

Desired behavior

The error is incorrect as experimentalSessionAndOrigin is true. So it just shouldn't error.

Test code to reproduce

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    experimentalSessionAndOrigin: true,
    testIsolation: "off",
  }
});

Cypress Version

10.11.0

Node version

16.15.0

Operating System

WIndows 11 22H2 22621.674

Debug Logs

No response

Other

No response

@mschile
Copy link
Contributor

mschile commented Nov 2, 2022

Hi @oatsoda 👋 , thanks for logging this issue! I was able to reproduce the issue and will route it to the appropriate team.

@aubincc
Copy link

aubincc commented Nov 8, 2022

Damn, I knew it wasn't me 😸

@skjnldsv
Copy link

skjnldsv commented Nov 8, 2022

Ahaha, same here, it drove me crazy for a couple of days 🥲

@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Nov 8, 2022
@stokrattt
Copy link

i have the same issue

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Nov 9, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2022

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

@mjhenkes
Copy link
Member

Released in 11.0.1.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants