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

[HOLD for payment 2024-08-01] [$50] Group chat - Avatar loads infinitely when refreshing full screen avatar on confirmation page #45824

Closed
6 tasks done
lanitochka17 opened this issue Jul 20, 2024 · 36 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 20, 2024

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


Version Number: 9.0.10-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

. Go to staging.new.expensify.com
2. Go to FAB > Start chat > Chat
3. Select a few users
4. Proceed to confirmation page
5. Add a group chat avatar
5. On confirmation page, click on the group chat avatar
6. Click View avatar
7. Refresh the page

Expected Result:

Avatar will load after refreshing the page

Actual Result:

Avatar loads infinitely when refreshing full screen avatar on confirmation page

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6547681_1721434123139.gorup_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0163f99f868835a727
  • Upwork Job ID: 1814779353535476997
  • Last Price Increase: 2024-07-23
  • Automatic offers:
    • Ahmed-Abdella | Contributor | 103224976
Issue OwnerCurrent Issue Owner: @RachCHopkins
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 20, 2024
Copy link
Contributor

👋 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.

Copy link

melvin-bot bot commented Jul 20, 2024

Triggered auto assignment to @carlosmiceli (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@mountiny
Copy link
Contributor

@mollfpr @b4s36t4 This one seems related to your PR #44702 can you please confirm if revert fixes it?

@mountiny
Copy link
Contributor

Not fixed by the revert, going to mark this as external

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed DeployBlocker Indicates it should block deploying the API labels Jul 20, 2024
@melvin-bot melvin-bot bot changed the title Group chat - Avatar loads infinitely when refreshing full screen avatar on confirmation page [$250] Group chat - Avatar loads infinitely when refreshing full screen avatar on confirmation page Jul 20, 2024
Copy link

melvin-bot bot commented Jul 20, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0163f99f868835a727

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 20, 2024
Copy link

melvin-bot bot commented Jul 20, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External)

@mountiny
Copy link
Contributor

In you proposals, you must include the offending PR. If you can highlight which PR caused it without a fix for the bug (the fix is a revert) a partial $50 reward will go your way

@Ahmed-Abdella
Copy link
Contributor

@mountiny ther is no option to view the group image in the confirm page in production so it looks like this come from this PR #41586 that add a feature to view a group chat custom avatar.

Also I noticed a behaviour : If you wait for some time before viewing the image it works fine and display the image after the first refresh. Check the video below. ( but it doesn't work if you refresh it for one more time )

screen-recording-2024-07-21-at-35250-am_JjkYRvqv.mp4

So I think what happened is that:
After refreshing the page the app trying trying to fetch the image from the backend, but it seems that it didn't get uploaded yet so the file is not found. When I try with a small size image and wait for sometime before veiwing the image it works because the image has been uploaded.

And here is the error message from the console.

The not found file message

Screenshot 2024-07-21 at 4 15 15 AM

Screenshot 2024-07-21 at 4 16 29 AM

@Ahmed-Abdella
Copy link
Contributor

Ahmed-Abdella commented Jul 21, 2024

Not Completely sure, but I think the same PR also cause this issue #45842. I mentioned the PR there too.

@gijoe0295
Copy link
Contributor

gijoe0295 commented Jul 21, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Avatar loads infinitely when refreshing full screen avatar on confirmation page

What is the root cause of that problem?

The image uploaded while creating group is optimistically saved locally in the form of blob URI. The blob data would be cleared once we refresh the page. As the result, console would throw ERR_FILE_NOT_FOUND and the attachment view modal would show loading:

{isLoading && (!isOffline || isLocalFile) && <FullscreenLoadingIndicator style={[styles.opacity1, styles.bgTransparent]} />}

and the group avatar in confirmation RHP would be reset to default.

Normally for an image to be uploaded to the CDN, we need to call the corresponding update avatar API and the BE will handle the upload. We haven't had any approaches solving the case of optimistic image data.

Offending PR: This has happened ever since we allowed viewing the custom avatar in full screen while creating group in #41586.

What changes do you think we should make in order to solve the problem?

We should not allow View photo option if the image uri indicates a local file FileUtils.isLocalFile(url):

if (!isUsingDefaultAvatar) {

Or we can revert the shouldDisableViewPhoto that had been removed in #41586 and use in in NewChatConfirmationPage.

@s77rt
Copy link
Contributor

s77rt commented Jul 21, 2024

cc @nexarvo Can you check this one 👀

@NaveedShaikh78
Copy link

I saw this issue in Upwork. I tried the same step but now it is not reproducible, is it fix or still reproducible ?

Copy link

melvin-bot bot commented Jul 21, 2024

📣 @NaveedShaikh78! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@NaveedShaikh78
Copy link

Is it still reproducible?

@tsa321
Copy link
Contributor

tsa321 commented Jul 21, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Avatar spinner shown when refreshing full screen avatar page and on new group chat confirmation page

What is the root cause of that problem?

PR #41586 enables viewing group avatar in full screen. When user creates new group, the data is stored in onyx newChatDraft, but the avatar is stored as blob uri string. The blob uri string won't be available when the user refresh the app.

What changes do you think we should make in order to solve the problem?

We could store the avatar image as base64 string in onyx and use it in new/chat/confirm page.
If we need to fix this issue quickly, I have made a draft PR.

Copy link

melvin-bot bot commented Jul 23, 2024

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.

Copy link

melvin-bot bot commented Jul 23, 2024

📣 @Ahmed-Abdella 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@mountiny
Copy link
Contributor

Yeah $50 to @Ahmed-Abdella

@Ahmed-Abdella
Copy link
Contributor

Offer accepted, Thanks @mountiny

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 25, 2024
@melvin-bot melvin-bot bot changed the title [$50] Group chat - Avatar loads infinitely when refreshing full screen avatar on confirmation page [HOLD for payment 2024-08-01] [$50] Group chat - Avatar loads infinitely when refreshing full screen avatar on confirmation page Jul 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jul 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.11-5 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-08-01. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 25, 2024

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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] 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:
  • [@s77rt] A discussion in #expensify-bugs 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:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@RachCHopkins] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@s77rt
Copy link
Contributor

s77rt commented Jul 30, 2024

No checklist needed ^ Offending PR has been reverted

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2024
@carlosmiceli
Copy link
Contributor

Can we close this?

@s77rt
Copy link
Contributor

s77rt commented Aug 2, 2024

@carlosmiceli, @Ahmed-Abdella is due payment for finding offending PR

@melvin-bot melvin-bot bot added the Overdue label Aug 2, 2024
@carlosmiceli
Copy link
Contributor

Understood!

Copy link

melvin-bot bot commented Aug 5, 2024

@carlosmiceli, @s77rt, @RachCHopkins, @mountiny, @Ahmed-Abdella Eep! 4 days overdue now. Issues have feelings too...

@carlosmiceli carlosmiceli added Weekly KSv2 and removed Daily KSv2 labels Aug 5, 2024
@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@RachCHopkins
Copy link
Contributor

I'm here Melvin! Sorry, busy week last week!

@mountiny
Copy link
Contributor

mountiny commented Aug 7, 2024

Summary $50 to @Ahmed-Abdella for help with this deploy blocker and finding the offending PR.

As we have reverted the offending change the checklist can be skipped

@RachCHopkins
Copy link
Contributor

Payment Summary:

Contributor: @Ahmed-Abdella paid $50 via Upwork

@RachCHopkins
Copy link
Contributor

Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

10 participants