Skip to content

react-pdf Document is caching PDFs failure to load #13453

Closed

Description

@aldo-expensify

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


Coming from here: #13409 (review)

Action Performed:

  1. Upload a pdf
  2. Open the pdf and verify that it loads fine
  3. Close the modal
  4. Go offline
  5. Open the pdf and verify that you see error message
  6. Close the modal
  7. Go back online
  8. Open the pdf

Expected Result:

The PDF should open successfully now that you are online

Actual Result:

We keep getting the error after coming back online

Screen.Recording.2022-12-08.at.4.19.03.PM.mov

Workaround:

Refresh the page?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 9, 2022
  2. melvin-bot commented on Dec 9, 2022

    @melvin-bot

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

  3. aldo-expensify commented on Dec 9, 2022

    @aldo-expensify
    ContributorAuthor

    I think a next step is create a GH issue in the react-pdf repo: https://github.com/wojtekmaj/react-pdf/issues proving a reproducible example.

    There is an existing issue about disabling cache, but it was opened for other reasons and then closed without activity.

  4. aldo-expensify commented on Dec 9, 2022

    @aldo-expensify
    ContributorAuthor

    When we close and reopen the attachment, I confirmed that the component PDFView is getting destroyed/reconstructed.

  5. aldo-expensify commented on Dec 9, 2022

    @aldo-expensify
    ContributorAuthor

    @muttmuure This issue was mentioned by @rushatgabhane here when he was reviewing a PR. Just mentioning in case it makes him qualify for reporting compensation.

  6. melvin-bot commented on Dec 12, 2022

    @melvin-bot

    @muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!

  7. muttmuure commented on Dec 13, 2022

    @muttmuure
    Contributor

    Not had chance to get to this yet

  8. melvin-bot commented on Dec 19, 2022

    @melvin-bot

    @muttmuure Huh... This is 4 days overdue. Who can take care of this?

  9. muttmuure commented on Dec 21, 2022

    @muttmuure
    Contributor

    Testing now

  10. muttmuure commented on Dec 21, 2022

    @muttmuure
    Contributor

    Hey @aldo-expensify I can't reproduce this - I can still load the PDF I uploaded even after I go offline, do you mind checking that the bug still happens for you?

  11. aldo-expensify commented on Dec 21, 2022

    @aldo-expensify
    ContributorAuthor

    I managed to reproduce, but I noticed that I can only do it using the Chrome dev tools to go offline/online and with Disable cache checked. I tried to reproduce without chrome dev tools by disconnecting the wifi and it works fine in that case (which is the normal use case).

    I'm going to close it, thanks for trying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions