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

"Cannot read properties of undefined (reading 'r3')" error when the requestMode: true #138

Open
AVorvul opened this issue Nov 21, 2024 · 0 comments

Comments

@AVorvul
Copy link

AVorvul commented Nov 21, 2024

When I add requestMode: true to the cypress.config.js I get:

TypeError: Cannot read properties of undefined (reading 'r3')

Because this error occurred during a before all hook we are skipping all of the remaining tests.
at xt (webpack://api-cypress/./node_modules/cypress-plugin-api/dist/support.js:14:946)
at ee (webpack://api-cypress/./node_modules/cypress-plugin-api/dist/support.js:14:1972)
at Context.eval (webpack://api-cypress/./node_modules/cypress-plugin-api/dist/support.js:14:2181)
From previous event:
at Promise.longStackTracesCaptureStackTrace [as _captureStackTrace] (http://localhost:59963/__cypress/runner/cypress_runner.js:3509:19)
at Promise._then (http://localhost:59963/__cypress/runner/cypress_runner.js:1262:17)
at Promise._passThrough (http://localhost:59963/__cypress/runner/cypress_runner.js:4133:17)
at Promise.lastly.Promise.finally (http://localhost:59963/__cypress/runner/cypress_runner.js:4142:17)
at Object.onRunnableRun (http://localhost:59963/__cypress/runner/cypress_runner.js:162742:53)
at $Cypress.action (http://localhost:59963/__cypress/runner/cypress_runner.js:41484:28)
at Runnable.run (http://localhost:59963/__cypress/runner/cypress_runner.js:145330:13)
at next (http://localhost:59963/__cypress/runner/cypress_runner.js:155115:10)
at (http://localhost:59963/__cypress/runner/cypress_runner.js:155159:5)
at timeslice (http://localhost:59963/__cypress/runner/cypress_runner.js:145670:27)
logError @ index-BdCmY7-e.js:96640
(anonymous) @ index-BdCmY7-e.js:108999
emit2 @ index-BdCmY7-e.js:102351
(anonymous) @ cypress_runner.js:187443
emit @ cypress_runner.js:146113
emit @ cypress_runner.js:187506
onPrint @ cypress_runner.js:206184
_onPrintClick @ cypress_runner.js:206188
(anonymous) @ cypress_runner.js:205895
executeAction @ cypress_runner.js:182836
_onClick @ cypress_runner.js:182821
Rb @ cypress_runner.js:279
Xb @ cypress_runner.js:279
Yb @ cypress_runner.js:280
Ze @ cypress_runner.js:327
se @ cypress_runner.js:328
(anonymous) @ cypress_runner.js:340
Jb @ cypress_runner.js:519
Nb @ cypress_runner.js:277
jd @ cypress_runner.js:332
yc @ cypress_runner.js:302
hd @ cypress_runner.js:301
exports.unstable_runWithPriority @ cypress_runner.js:561
gg @ cypress_runner.js:349
Hb @ cypress_runner.js:519
gd @ cypress_runner.js:300

My cypress.config.js file:
const { defineConfig } = require('cypress');

module.exports = defineConfig({
reporter: 'cypress-mochawesome-reporter',
reporterOptions: {
charts: true,
reportPageTitle: 'NRS CONS-API',
embeddedScreenshots: true,
inlineAssets: true,
saveAllAttempts: false,
},
e2e: {
env: {
requestMode: true,
},
experimentalRunAllSpecs: true,
specPattern: 'cypress/api-specs//*.spec.{js,jsx,ts,tsx}',
setupNodeEvents(on, config) {
require('cypress-mochawesome-reporter/plugin')(on);
// implement node event listeners here
on('task', {
log(message) {
console.log('/
/');
console.log(message);
console.log('/
**/');
return null;
},
});
},
watchForFileChanges: false,
viewportWidth: 860,
viewportHeight: 720,
},
});

What could it be the reason?

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

1 participant