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-11-22] [$250] Chat - Attachment - Opening specific image page keeps loading infinitely #49974

Closed
4 of 6 tasks
izarutskaya opened this issue Oct 1, 2024 · 68 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 1, 2024

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: v9.0.42-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal team

Action Performed:

  1. Launch app
  2. Open a chat
  3. Paste the text - Alt Text
  4. Send the message
  5. Open the image

Expected Result:

If there is no image in url or cannot upload, error message must be displayed and page must not load infinitely.

Actual Result:

If there is no image in url or cannot upload, error message must be displayed but page keeps loading.

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

Bug6618678_1727543937333.Screenrecorder-2024-09-28-22-37-22-691.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021842294919161440709
  • Upwork Job ID: 1842294919161440709
  • Last Price Increase: 2024-10-04
  • Automatic offers:
    • hoangzinh | Reviewer | 104303524
Issue OwnerCurrent Issue Owner: @CortneyOfstad
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 1, 2024
Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @CortneyOfstad (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.

@daledah
Copy link
Contributor

daledah commented Oct 1, 2024

Proposal

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

If there is no image in url or cannot upload, error message must be displayed but page keeps loading.

What is the root cause of that problem?

The image url is https://exmaple.image.png so we detect it's the image, but we can't load it because it's the invalid url

and we don't pass fallbackSource so the loading is still shown

if (isFileImage) {
if (imageError && (typeof fallbackSource === 'number' || typeof fallbackSource === 'function')) {

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

Solution 1: Add the default fallbackSource in AttachmentCarousel, it can be depended on design team

fallbackSource = Expensicons.FallbackCarousel

Solution 2: Return DefaultAttachmentView if there's no fallbackSource and imageError is not undefined in here

        if(imageError && !fallbackSource){
            return (
                <DefaultAttachmentView
                    fileName={file?.name}
                    shouldShowDownloadIcon={shouldShowDownloadIcon}
                    shouldShowLoadingSpinnerIcon={shouldShowLoadingSpinnerIcon}
                    containerStyles={containerStyles}
                />
            );
        }
Screenshot 2024-10-01 at 17 20 12

What alternative solutions did you explore? (Optional)

@CortneyOfstad
Copy link
Contributor

So it looks like the copied text is hyperlinked to a default image, but can you please share the image here so we can fully test this appropriately?

@CortneyOfstad
Copy link
Contributor

Going to have this retested

@CortneyOfstad CortneyOfstad added retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause Needs Reproduction Reproducible steps needed labels Oct 2, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@Kalydosos
Copy link
Contributor

Kalydosos commented Oct 2, 2024

Edited by proposal-police: This proposal was edited at 2024-10-03 10:42:03 UTC.

Proposal

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

For an invalid url, the image cannot be loaded and the screen just displays a loading status

What is the root cause of that problem?

CArouselIem does not pass a fallbackSource to its attachments views

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

We should add a fallbackSource to the following

like this

            <AttachmentView
                source={item.source}
                previewSource={item.previewSource}
                file={item.file}
                isAuthTokenRequired={item.isAuthTokenRequired}
                onPress={onPress}
                transactionID={item.transactionID}
                reportActionID={item.reportActionID}
                isHovered={isModalHovered}
                isFocused={isFocused}
                duration={item.duration}
                *fallbackSource={Expensicons.Exclamation}*
            />
        </View>

If we choose an exclamation par exemple it give something like this

Capture d’écran de 2024-10-03 11-34-50

also modify AttachmentView to add

<View style={[styles.flexColumn, styles.alignItemsCenter, styles.justifyContentCenter]}>
<Icon
src={fallbackSource}
height={variables.defaultAvatarPreviewSize}
width={variables.defaultAvatarPreviewSize}
additionalStyles={[styles.alignItemsCenter, styles.justifyContentCenter, styles.flex1]}
fill={theme.border}
/>

{translate('notFound.attachmentNotFound')}
{translate('notFound.checkAttachmentLink')}

and add the translations in en.ts

What alternative solutions did you explore? (Optional)

None

@melvin-bot melvin-bot bot added the Overdue label Oct 4, 2024
@CortneyOfstad CortneyOfstad added the External Added to denote the issue can be worked on by a contributor label Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Chat - Attachment - Opening specific image page keeps loading infinitely [$250] Chat - Attachment - Opening specific image page keeps loading infinitely Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

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

melvin-bot bot commented Oct 4, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Oct 4, 2024
@hoangzinh
Copy link
Contributor

Thanks for proposals, everyone. According to the expected result, I think @Kalydosos provided a more complete solution, with an error message part. Therefore I think we can go with his proposal.

Link to proposal #49974 (comment)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 7, 2024

Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@MariaHCD
Copy link
Contributor

MariaHCD commented Oct 7, 2024

The proposal makes sense to me but let's work with the design team to iron out the UI for Attachment not found page.

Perhaps we may already have a component we can reuse?

Copy link

melvin-bot bot commented Oct 7, 2024

Triggered auto assignment to @dubielzyk-expensify (Design), see these Stack Overflow questions for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 7, 2024

📣 @Kalydosos You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@CortneyOfstad
Copy link
Contributor

I'm back from OoO — thanks @Christinadobrzyn for holding down the fort while I was gone!

@Kalydosos looks like there is a comment waiting for your input on the PR here — thanks!

@Kalydosos
Copy link
Contributor

I'm back from OoO — thanks @Christinadobrzyn for holding down the fort while I was gone!

@Kalydosos looks like there is a comment waiting for your input on the PR here — thanks!

@CortneyOfstad welcome back

yes i have seen it. i have answered already

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@hoangzinh
Copy link
Contributor

Issue not reproducible during KI retests. (First week)

We're aware of it, but it's still reproducible with steps here. We's also discussing how should we deal with it #50511 (comment)

@CortneyOfstad CortneyOfstad removed the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label Nov 5, 2024
@CortneyOfstad
Copy link
Contributor

Thanks @hoangzinh for the context!

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 7, 2024
@Christinadobrzyn Christinadobrzyn removed their assignment Nov 12, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 15, 2024
@melvin-bot melvin-bot bot changed the title [$250] Chat - Attachment - Opening specific image page keeps loading infinitely [HOLD for payment 2024-11-22] [$250] Chat - Attachment - Opening specific image page keeps loading infinitely Nov 15, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 15, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-4 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-11-22. 🎊

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

Copy link

melvin-bot bot commented Nov 15, 2024

@hoangzinh @CortneyOfstad @hoangzinh 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]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 22, 2024
@CortneyOfstad
Copy link
Contributor

@Kalydosos — I sent you an offer here in Upwork. Please let me know once you accept and I can get that paid ASAP. Thanks!

@CortneyOfstad
Copy link
Contributor

@hoangzinh — payment has been confirmed — please complete the check list below — thank you!

BugZero Checklist:

  • [Contributor] — Classify the bug:
Bug classification

Source of bug:

  • 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
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [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:

  • [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:

  • [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.

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:

@Kalydosos
Copy link
Contributor

@CortneyOfstad i have accepted the offer on upwork. Thank you very much !

@hoangzinh
Copy link
Contributor

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 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
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [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: I think it's a new requirement that we haven't covered before

  • [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: N/A

  • [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.

  • [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

Test:

  1. Sign in to any account
  2. Open a chat
  3. Send an image message markdown format ![Alt Text](https://expensify.com/randomex.jpeg)
  4. Click on the image
  5. Verify that an icon and the text "Attachment not found" are displayed

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
@CortneyOfstad
Copy link
Contributor

Thank you @hoangzinh!

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2024
@CortneyOfstad
Copy link
Contributor

Payment Summary

@Kalydosos — paid $250 via Upwork
@hoangzinh — paid $250 via Upwork

Regression Test

https://github.com/Expensify/Expensify/issues/447652

@garrettmknight
Copy link
Contributor

$250 approved for @hoangzinh

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. Daily KSv2 Design External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests