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

Local testing fails when testObservability added to e2e.js #657

Open
jdvegmond opened this issue Jul 21, 2023 · 0 comments
Open

Local testing fails when testObservability added to e2e.js #657

jdvegmond opened this issue Jul 21, 2023 · 0 comments

Comments

@jdvegmond
Copy link

I noticed that when I try my Cypress tests on my local machine they will always fail when the following line is present in cypress/support/e2e.js:
require('browserstack-cypress-cli/bin/testObservability/cypress');

The error I get (for every scenario):

TypeError: Cannot read properties of undefined (reading 'get')
      at runPrivilegedCommand (http://localhost:55177/__cypress/runner/cypress_runner.js:173408:27)
      at $Cy.task (http://localhost:55177/__cypress/runner/cypress_runner.js:151114:107)
      at $Cy.now (http://localhost:55177/__cypress/runner/cypress_runner.js:160956:90)
      at ../driver/node_modules/eventemitter2/lib/eventemitter2.js.EventEmitter.emit (http://localhost:55177/__cypress/runner/cypress_runner.js:96092:22)
      at parent.<computed> [as emit] (http://localhost:55177/__cypress/runner/cypress_runner.js:164812:31)
      at $Cypress.action (http://localhost:55177/__cypress/runner/cypress_runner.js:157297:21)
      at LogManager.trigger (http://localhost:55177/__cypress/runner/cypress_runner.js:165684:22)
      at LogManager.triggerLog (http://localhost:55177/__cypress/runner/cypress_runner.js:165689:17)
      at $Cypress.log (http://localhost:55177/__cypress/runner/cypress_runner.js:165736:12)
      at commandRunningFailed (http://localhost:55177/__cypress/runner/cypress_runner.js:159448:18)
      at onError (http://localhost:55177/__cypress/runner/cypress_runner.js:159854:7)
      at tryCatcher (http://localhost:55177/__cypress/runner/cypress_runner.js:18744:23)
      at Promise._settlePromiseFromHandler (http://localhost:55177/__cypress/runner/cypress_runner.js:16679:31)
      at Promise._settlePromise (http://localhost:55177/__cypress/runner/cypress_runner.js:16736:18)
      at Promise._settlePromise0 (http://localhost:55177/__cypress/runner/cypress_runner.js:16781:10)
      at Promise._settlePromises (http://localhost:55177/__cypress/runner/cypress_runner.js:16857:18)
      at _drainQueueStep (http://localhost:55177/__cypress/runner/cypress_runner.js:13451:12)
      at _drainQueue (http://localhost:55177/__cypress/runner/cypress_runner.js:13444:9)
      at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:55177/__cypress/runner/cypress_runner.js:13460:5)
      at Async.drainQueues (http://localhost:55177/__cypress/runner/cypress_runner.js:13330:14)

Once I remove the line from e2e.js, my tests run fine on my local machine. It doesn't seem to have an impact on my Browserstack integration either, maybe because in my config I've set "testObservability": false

Cypress version: 12.17.2
Browserstack-cypress-cli version: 1.24.4
Run on latest windows version.

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