-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-06-13] [$500] Infinite loading spinner when trying to open a link to an Image that is in a room I have no access to. #23374
Comments
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Infinite loading spinner when trying to open a link to an Image that is in a room I have no access to. What is the root cause of that problem?For the attachment that have no access to, app pass empty file.name prop to What changes do you think we should make in order to solve the problem?We should add checking whether function AttachmentView(props) {
...
if (props.file.name === '') {
return <NotFoundPage />;
}
... What alternative solutions did you explore? (Optional)None. |
Will review |
Job added to Upwork: https://www.upwork.com/jobs/~01440acd5fcf557a24 |
Triggered auto assignment to @MitchExpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
I believe my auto-assignment was buggy here. Greg is already on it so unassigning myself 👍 |
@greg-schroeder |
@greg-schroeder @DanutGavrus They are two different cases, The other issue here (#23068) is just the second half of this issue, I mentioned two issues here. The first one is Trying to open an attachment from a room that you don't have access to which leads to infinite Loading. This issue isn't mentioned there as it covers the attachment from a room you have access to, which takes you to the "something went wrong" page. And this is the second part of this issue, which happens when you try to open the link again after closing the infinite-loading page |
ProposalPlease re-state the problem that we are trying to solve in this issue.Infinite loading spinner visible on attachment modal, when a chat attachment url is directly used and the user logged in at that moment doesn't have access to that chat. What is the root cause of that problem?There is no chat access check or handling at What changes do you think we should make in order to solve the problem?Inorder to resolve this we can utilize
src/languages/es.js
|
We should be putting this on hold @greg-schroeder based on the conversation on #23068 (comment). Right? |
Yes, doing |
Opened the same question on slack https://expensify.slack.com/archives/C01GTK53T8Q/p1716284156418899. |
Yeah, I'm really not sure so I'll defer to that conversation in Slack |
It seems so far people think the behavior is fine |
@greg-schroeder Let's see if we can push the discussion on slack to get a few more votes. |
I didn't get good participation on the discussion but I think we are fine with this behaviour so I am moving forward with the PR> |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-06-13. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Do you agree 👍 or 👎 ? |
@parasharrajat I don't agree that the PR which introduced the bug was identified correctly. Additionally, you didn't provide an explanation for your conclusion. The endless loading bug was occurring long before the linked PR. The issue lies within the App/src/components/Attachments/AttachmentView/index.tsx Lines 217 to 218 in 569b7c1
The endless loading bug would still occur for any network error. I believe addressing this underlying issue will provide a more robust solution. |
This issue is related to inaccessible reports. So when you don't have access to the report, we shouldn't render the attachment at all. Thus I don't see how providing a fallback to the attachmentView component will help with this issue. I saw that you added a new route for attachment and thus I thought this is a valid use case to be handled with routing. But you might be correct, I can be wrong with the root cause. I will try to find the older PRs responsible. |
I don't think it was possible to have a link to a specific attachment in the past and while the recent PR may have surfaced the issue, it's more accurate to address the underlying component behavior. I believe it would be more accurate to render the attachment carousel regardless of the end result. Route parameters match the attachment route, and the user probably expects to see an attachment. In case of an error, like when they don't have access, they'll see the attachment frame and the fallback/error content. The fallback can be further enhanced to display a message based on the network error. |
That's what we are showing so far. The attachment modal is shown but instead of an image, it shows |
Updated the checklist to remove the PR responsible. This issue seemed to be present from the start. The app was either crashing or showing a continuous loader when the image was not loaded anyhow. |
Processing |
Payment summary: Contributor: @Ahmed-Abdella - $500 - Paid via Upwork |
Filed regression test, closing |
Payment requested as per #23374 (comment) |
$500 approved for @parasharrajat |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
An error page should appear for the user that he doesn't have access to that attachment because he doesn't have access to its room.
Actual Result:
An infinite spinner for the attachment loading appears, and nothing to tell the user that he can't open that attachment.
After closing it, the user got "Hmm... it's not here You don't have access to this chat'', and if he navigate to the image link again he got the "Uh-oh, something went wrong!" page
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.44-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screencast.from.19-07-23.21_28_35.webm
Recording.1317.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Ahmed-Abdella
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689814964693879
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @greg-schroederThe text was updated successfully, but these errors were encountered: