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

High Priority: NULL user.states.incident value causes Spinner of Death #687

Open
3 tasks
aarontitus opened this issue Feb 7, 2024 · 1 comment
Open
3 tasks
Assignees
Labels
auth bug Something isn't working ui

Comments

@aarontitus
Copy link
Member

aarontitus commented Feb 7, 2024

Description

When user_users.states.incident is null, and a user logs in, they are taken to the spinner of death. For some users, this happens very regularly. It even happens once they're logged in. It has been a pain point for several users, and about 205 currently have their user.states set to NULL.

Expected Behavior

If the user.states.incident is null, then it should automatically be reset to the most recent incident to which the organization has access. And the URL /incident/undefined/work should be handled the same way.

Current Behavior

When user.states.incident = null, and they are on Work, the user is forwarded to a URL like crisiscleanup.org/incident/undefined/work/282613?showOnMap=true. This is an invalid URL, and you get the spinner of death. See screenshot below.

Screenshots

Undefined Incident

Steps to Reproduce

  1. UPDATE user_users SET states = states || '{"incident": null}' WHERE id = 14;
  2. Log in.
  3. Bug: Spinner of death.
  4. Manually visit a valid URL that contains the incident_id in the URL, like https://www.crisiscleanup.org/incident/286/work
  5. User states is updated, and the site works as expected.

Tasks

  • Forward crisiscleanup.org/incident/undefined/work/ to the most recent incident to which the organization has access.
  • If user.states.incident is null, then reset to the most recent incident to which the organization has access.
  • On the blank spinner of death screen, add a white button that says "Start Over." this button does two things: 1. Sets user.states.incident to the most recent incident, then 2. Logs out.
@aarontitus aarontitus added auth bug Something isn't working ui labels Feb 7, 2024
@aarontitus
Copy link
Member Author

For what it's worth, this error does not appear to be browser specific. It's happening to Safari, Chrome, Firefox, and Edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth bug Something isn't working ui
Projects
None yet
Development

No branches or pull requests

2 participants