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

[Re-test] mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened #38429

Closed
1 of 6 tasks
kbecciv opened this issue Mar 15, 2024 · 10 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Mar 15, 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: 1.4.53-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Tap on a workspace chat
  3. Tap plus icon--- request money --- Scan
  4. Upload below attached corrupted pdf file
  5. Tap request
  6. Navigate to LHN
  7. Reopen the Workspace chat

Corrupted file:
CORRUPT-2024-02-06_11_32_55.302-2024-03-14 19_26_31.015.pdf

Expected Result:

Scan requests made using corrupted files should not continuously display a spinner in the preview.

Actual Result:

Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened

Workaround:

n/a

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

Bug6415395_1710534476736.logn.mp4

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 15, 2024
Copy link

melvin-bot bot commented Mar 15, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@kbecciv
Copy link
Author

kbecciv commented Mar 15, 2024

@strepanier03 I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Mar 15, 2024

Proposal

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

mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened

What is the root cause of that problem?

I guess this isn't worth fixing since we use Document from react-pdf and it takes required time to check if the pdf is valid or not.

BTW, I found a potential bug when trying to explore the components. The error message is not visible in dark mode and it isn't using correct font. This issue also happens in report preview component.
dark_pdf_fail
light_pdf_fail

The root cause it that the Document is using the default styles for showing the error message since we haven't added our custom component using error prop.

<Document
loading={<FullScreenLoadingIndicator />}
file={isAuthTokenRequired ? addEncryptedAuthTokenToURL(previewSourceURL) : previewSourceURL}
options={{
cMapUrl: 'cmaps/',
cMapPacked: true,
}}
externalLinkTarget="_blank"
onPassword={onPassword}
>

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

We need to add the custom component like we do in WebPDFDocument.

<Document
loading={<FullScreenLoadingIndicator />}
error={<Text style={errorLabelStyles}>{translate('attachmentView.failedToLoadPDF')}</Text>}
file={sourceURL}

We might want to add default styles like textLabel but that can be discussed. Additionally we can errorLabelStyles just like we do in WebPDFDocument. Styling changes can be discussed.

Result

fix_pdf_font_light fix_pdf_font

@HezekielT
Copy link
Contributor

There is a plan to prevent corrupted files from being uploaded by users in this issue and a draft pr is already created to meet that expectation. If a user is unable to upload a corrupted file, I think this issue will no longer be reproducible. So I personally think we should put this on hold for #34032

@melvin-bot melvin-bot bot added the Overdue label Mar 18, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

@strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@strepanier03
Copy link
Contributor

Thank you @HezekielT - I'll place this on hold. I was going to close it for focus on higher value bugs anyway so holding works for me.

@melvin-bot melvin-bot bot removed the Overdue label Mar 20, 2024
@strepanier03 strepanier03 added Weekly KSv2 and removed Daily KSv2 labels Mar 20, 2024
@strepanier03 strepanier03 changed the title mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened [HOLD #34032] mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened Mar 20, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@strepanier03
Copy link
Contributor

Polish priority and on hold still.

@melvin-bot melvin-bot bot removed the Overdue label Apr 5, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@strepanier03
Copy link
Contributor

HOLD GH is still open, paused for now.

@melvin-bot melvin-bot bot removed the Overdue label Apr 16, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 25, 2024
@strepanier03 strepanier03 added the retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause label May 3, 2024
@strepanier03 strepanier03 changed the title [HOLD #34032] mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened [Re-test] mweb - Scan - Scan requests made using corrupted files consistently display a spinner in the preview each time they are opened May 3, 2024
@strepanier03
Copy link
Contributor

THe HOLD GH was closed for being unable to repro. Will let this get tested again and close if this isn unrepro as well.

@melvin-bot melvin-bot bot removed the Overdue label May 3, 2024
@melvin-bot melvin-bot bot added the Overdue label May 13, 2024
@strepanier03
Copy link
Contributor

Closing out, still can't repro.

@melvin-bot melvin-bot bot removed the Overdue label May 14, 2024
@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. retest-weekly Apply this label if you want this issue tested on a Weekly basis by Applause Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants