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

DT-1170 - Update App.jsx to handle auth library not yet loaded #1741

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

snf2ye
Copy link
Contributor

@snf2ye snf2ye commented Jan 21, 2025

We're seeing intermittent failures in our e2e tests. The stacktrace suggests that it is an issue with the auth library not getting loaded before we try to access the "isLoading" field in App.jsx. This PR adds null checks to help the component more gracefully wait for the auth library to load.

Details

the error from cypress output:

Cannot read properties of undefined (reading 'isLoading')

From the stacktrace:
at App (http://localhost:3000/src/containers/App.jsx:195:90)

The line numbers don't match up exactly, we we directly reference auth.isLoading in several places in App.jsx. I don't think it would hurt to handle this case that "auth" is undefined a little more gracefully.

Cypress run: https://cloud.cypress.io/projects/e6ttjx/runs/3978/overview/b621a50d-ea83-43b5-ba96-4[…]-logs&roarHideRunsWithDiffGroupsAndTags=1&ts=1737432179725.8

Testing

One passing test run doesn't mean a whole lot. We'll see whether we continue to see this error out in the wild.

Copy link

Copy link

cypress bot commented Jan 21, 2025

jade-data-repo-ui    Run #3981

Run Properties:  status check passed Passed #3981  •  git commit 3c3b649833 ℹ️: Merge 10cbf58631a78745148d57bdbf9406333afb0857 into 852af449b9757d89986bae531f3c...
Project jade-data-repo-ui
Branch Review sh/DT-1170
Run status status check passed Passed #3981
Run duration 03m 07s
Commit git commit 3c3b649833 ℹ️: Merge 10cbf58631a78745148d57bdbf9406333afb0857 into 852af449b9757d89986bae531f3c...
Committer Shelby Holden
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 17
View all changes introduced in this branch ↗︎

@snf2ye snf2ye marked this pull request as ready for review January 22, 2025 15:02
@snf2ye snf2ye requested a review from a team as a code owner January 22, 2025 15:02
@snf2ye snf2ye requested review from rushtong and s-rubenstein and removed request for a team January 22, 2025 15:02
Copy link
Contributor

@rjohanek rjohanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good! I hope it helps!

@snf2ye snf2ye merged commit 950d14c into develop Jan 22, 2025
9 checks passed
@snf2ye snf2ye deleted the sh/DT-1170 branch January 22, 2025 16:58
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

Successfully merging this pull request may close these issues.

3 participants