Skip to content

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

@AVorvul

Description

@AVorvul

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions