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

Workspace - Infinite loading displayed for second device after delete the Workspace as admin. #16915

Closed
2 of 6 tasks
kbecciv opened this issue Apr 4, 2023 · 17 comments
Closed
2 of 6 tasks
Assignees
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Apr 4, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Precognition:
2 accounts are needed for the following tests, 1 Admin and 1 user
With one of the accounts, log in, create a workspace and invite the other account to the workspace.

  1. Log in with the same workspace admin account on the main device and the employee in the secondary device/ navigate to #announce room
  2. Navigate to a Workspace settings
  3. Delete the workspace by click/tap on the 3 dots > Delete workspace
  4. Check secondary device

Expected Result:

"Hmm. it's not here . You don't have access to this chat" should be appeared for second device.

Actual Result:

Infinite loading displayed for second device after delete WS as admin.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.94.0

Reproducible in staging?: Yes

Reproducible in production?: No

If this was caught during regression testing, add the test name, ID and link from TestRail:
https://expensify.testrail.io/index.php?/tests/view/3322739

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6005687_WS_Kot.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Apr 4, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Apr 4, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Triggered auto assignment to @PauloGasparSv (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@kbecciv
Copy link
Author

kbecciv commented Apr 4, 2023

Issue is not reproduced in Production, adding Deploy Blocker Label.

IMG_ADFE9859715E-1

@kbecciv kbecciv changed the title Web - Workspace - Infinite loading displayed for second device after delete the Workspace as admin. Workspace - Infinite loading displayed for second device after delete the Workspace as admin. Apr 4, 2023
@PauloGasparSv
Copy link
Contributor

Shifting my focus to this!

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Apr 4, 2023

Great! Was able to replicate this in Web : D

Local:

image

Staging:
image

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Apr 4, 2023

This may be caused because the report data is still in Onyx after the deletion but the reportActions are removed

Still couldn't figure out which P.R. introduced this but it may be API related

@PauloGasparSv
Copy link
Contributor

For some reason this logic in the API isn't clearing the report_<ReportID> object but instead turning it into this thing

image

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Apr 4, 2023

Issue is not reproduced in Production, adding Deploy Blocker Label.

Strange thing is that commenting this logic solves the issue! But that logic should be in production, so I'll test production here.

cc @roryabraham if you have any ideas on this as the logic I commented was introduced in this P.R.

After commenting those lines:
image
image

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Apr 4, 2023

Also couldn't replicate the issue in production!

The report object still exists in Onyx but has some extra fields, investigating that (specifically why isLoadingReportActions is true is staging and dev but not in prod)

image

@PauloGasparSv
Copy link
Contributor

All right, I think isLoadingReportActions is being updated wrong now!

Couldn't find any recent changes or the P.R. that introduced this bug yet.

Taking a break for lunch but I'll get back to this ASAP.

@situchan
Copy link
Contributor

situchan commented Apr 4, 2023

This might have same root cause as #16897

@MelvinBot
Copy link

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Apr 4, 2023

Thanks @situchan!
Testing the P.R. #16918 right now, I think it will fix this

cc @marcaaron

@PauloGasparSv
Copy link
Contributor

Yup, the changes from #16918 fix this!

I think what was happening is we make a call to OpenReport in the client after the workspace is deleted in the other device and that call was successful but returned no data and a jsonCode: 403

image

That caused a failure but there was no Onyx failure data that switched the state of isLoadingReportActions back to false.

That may be related to https://github.com/Expensify/Web-Expensify/pull/36929

@PauloGasparSv
Copy link
Contributor

#16918 Got merged! Keeping an eye on it.

@PauloGasparSv
Copy link
Contributor

P.R. is in staging, re-testing this!

@PauloGasparSv
Copy link
Contributor

Changes from #16918 fixed this and were CP'd to staging so closing it off!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants