question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting error "Cannot read properties of null (reading 'uuid')"

See original GitHub issue

Current behavior

I’ve written 3 cypress test cases but 2nd test case is showing passed but it’s not getting executed and showing error as : Uncaught TypeError: Cannot read properties of null (reading ‘uuid’)

image

Desired behavior

No response

Test code to reproduce

Code:

describe('Login', () => {
  const baseUrl = Cypress.env('CYPRESS_BASE_URL')
  const oktaBaseUrl = Cypress.env('CYPRESS_OKTA_BASE_URL')
  Cypress.config({ force: true, baseUrl })

  after(() => {
    cy.contains('a', 'Sign Out')
      .click()
  })

  it('it redirects to OKTA, logs in, and redirect to vstaas', () => {
    cy.visit(`${ baseUrl }/hvstaas/home`)
    cy.url()
      .should('include', `${ baseUrl }/hvstaas/home`)
    cy.url()
      .should('include', `${ oktaBaseUrl }`)
    cy.get('input[id="okta-signin-username"]')
      .type('username')
    cy.get('input[id="okta-signin-password"]')
      .type('pwd')
    cy.get('input[id="okta-signin-submit"]')
      .click()
  })

  it('the authToken cookie exists', () => {
    cy.getCookie('authToken').should('exist').then(cookie => {
      expect(cookie).to.have.property('value')
    })
  })

  it('Sign Out', () => {
    cy.contains('a', 'Sign Out')
      .click()
  })
})

Cypress Version

8.4.0

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
patelsmit2890commented, Oct 4, 2021

I’ve found work around for this issue. you can close this case.

Cypress.on('uncaught:exception', () => false)

0reactions
LeohsPaixaocommented, Nov 28, 2022

I’ve found work around for this issue. you can close this case. Cypress.on('uncaught:exception', () => false)

You have added this on any index.js file?

No. In the Spec itself, however, this is considered an error, as it is disappearing with some errors, leaving the tests not covering the entire system within this Spec.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read properties of null (reading ...
I get this error upon logging out: (Uncaught TypeError: Cannot read properties of null (reading 'uid')), but my application works and does ...
Read more >
"Cannot read property '$uuid' of null" on X3 batch controllers ...
This issue was caused by a duplicate entry in the BatchServer collection in MongoDB. Resolution. Remove the duplicate entry in the BatchServer ...
Read more >
[Scene] Cannot read property 'uuid' of null - Cocos Creator
Hi all. I am getting an error when try to get properties of scene in Inspector. I just choose scene and click on...
Read more >
[SOLVED] Cannot read property 'uid' - help - Meteor.js forums
Hello everyone. This project worked fine a few months ago. Now, project unchanged, it crashes. I am not sure how to resolve this....
Read more >
Uncaught (in promise) TypeError: Cannot read properties of ...
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'uuid') ... Hello everyone, I can't get any further with an error. I ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found