[HOLD for payment 2024-12-05] [HOLD for payment 2024-12-03] "You don't have the permission to take the requested action" when opening public room thread
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.66-0 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team
Action Performed:
- Go to staging.new.expensify.com
- Create a public room.
- Send a message to the public room.
- Right click on the message > Reply in thread.
- Send a reply.
- Return to the main chat.
- Copy the link to the public room.
- Navigate to the link anonymously (logged out).
- Click FAB.
- Click on the tour link (important).
- Return to the public room (still anonymous).
- Click on the reply to open the thread.
Expected Result:
The thread will open without error message.
Actual Result:
"You don't have the permission to take the requested action" appears briefly when opening public room thread anonymously.
Workaround:
Unknown
Platforms:
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [x] Android: mWeb Chrome
- [ ] iOS: Standalone
- [ ] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/b57128e7-80c0-446f-be6a-761c5115942b
Issue Owner
Current Issue Owner: @c3024
Triggered auto assignment to @RachCHopkins (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Triggered auto assignment to @deetergp (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
π¬ A slack conversation has been started in #expensify-open-source
:wave: 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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Can repro - exactly as described.
Edited by proposal-police: This proposal was edited at 2024-11-25 05:35:20 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
"You don't have the permission to take the requested action" appears briefly when opening public room thread anonymously.
What is the root cause of that problem?
Come from PR
We call
https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L565
when clicking on the tour link. With anonymous user, viewTourTaskReport is undefined. So the taskReportID in completeTask function is -1:
https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/libs/actions/Task.ts#L353
hence we store the action to reportActions_-1 to the onyx storage.
- The bug "You don't have the permission to take the requested action" when opening public room thread is because when we open the thread, we display the mostRecentReportAction:
https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/pages/home/ReportScreen.tsx#L700 that comes from reportActions data. And the reportActions data is from the hook:
https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/hooks/usePaginatedReportActions.ts#L11
that we are falling back to the reportActions_-1 data if the reportID is undefined.
What changes do you think we should make in order to solve the problem?
We should only call completeTask function:
https://github.com/Expensify/App/blob/f4f8da74c100f2c5ddb666ff4314038010104cbf/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L565
if viewTourTaskReport is not undefined.
What alternative solutions did you explore? (Optional)
@daledah are you sure you linked the correct PR, it takes me to a not found page
@allgandalf Oh I mistyped, here's the PR
Assigning @c3024 as the author of the offending PR, @daledah if your solution is used, we are going to pay you $50 for your help π
Fix being CPed
$50 to @daledah once done as their solution was used
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.66-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/53069
If no regressions arise, payment will be issued on 2024-12-03. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @c3024 requires payment (Needs manual offer from BZ)
@c3024 @RachCHopkins @c3024 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Offer sent to you @daledah !
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.67-9 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/53069
If no regressions arise, payment will be issued on 2024-12-05. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @c3024 requires payment (Needs manual offer from BZ)
@c3024 @RachCHopkins @c3024 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Payment Summary:
- Contributor: @daledah paid $50 via Upwork
- Contributor+: @c3024 no payment, due to regression
@c3024 can you complete the checklist please?
Payment Summary
Upwork Job
- ROLE: @c3024 paid $(AMOUNT) via Upwork (LINK)
BugZero Checklist (@RachCHopkins)
- [ ] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
- [ ] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
- [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
- [ ] I have verified the payment summary above is correct
@deetergp, @RachCHopkins, @mountiny, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!
BugZero Checklist:
- [x] [Contributor] Classify the bug:
Bug classification
Source of bug:
- [x] 1a. Result of the original design (eg. a case wasn't considered)
- [ ] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [ ] 1z. Other:
Where bug was reported:
- [ ] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
- [x] 2b. Reported on staging (eg. found during regression or PR testing)
- [ ] 2d. Reported on a PR
- [ ] 2z. Other:
Who reported the bug:
- [ ] 3a. Expensify user
- [ ] 3b. Expensify employee
- [ ] 3c. Contributor
- [ ] 3d. QA
- [ ] 3z. Other:
-
[x] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: Author of the original PR authored the fix PR too.
-
[x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: No discussion was started because this is too specific a case and could not be identified earlier.
-
[x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
No regression test is proposed because this was identified during staging.
Regression Test Proposal Template
-
[ ] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree π or π
Contributor has been paid, the contract has been completed, and the Upwork post has been closed.