Getting error "Cannot read properties of null (reading 'uuid')"
See original GitHub issueCurrent 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’)
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:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve found work around for this issue. you can close this case.
Cypress.on('uncaught:exception', () => false)
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.