Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1597

Preview fails to load when downloading document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10, 3.0.15
    • Fix Version/s: 2.4.73, 3.0.22
    • Component/s: UI
    • Release Notes Summary:
      The preview is correctly displayed even if a download is triggered during the preview loading.
    • Backlog priority:
      600
    • Browser:
    • Sprint:
      UI - 2023-3, UI - 2023-4, UI COOLDOWN - 2023-3

      Description

      Steps to Reproduce:

      Scenario1:

      • Upload a 20MB or a bigger pdf file
      • Once the pdf file is uploaded, refresh the web page
      • On a slower network for example, when the pdf file is loading in the viewer, click on the Download button below the previewer
      • It gives an  “An error occurred while loading the PDF” error on PDF.js in the previewer and the document stops to load in the previewer
      • However the download of the pdf completes and the file gets downloaded to local machine

      Expected - Previewer should not break and finish loading the document correctly

      Actual - Previewer breaks with a PDF.js error

      Example  - https://nightly-2019.nuxeocloud.com/nuxeo/ui/#!/browse/default-domain/UserWorkspaces/test-user-1/TestPDF20mb.pdf

       

      Scenario2:

      • Upload a 20MB or a bigger pdf file
      • To this same document, add a few image attachments
      • Refresh the pdf preview page (of the 20 MB pdf document)
      • On a slower network for example, when the pdf file is loading in the viewer, click on the Download button near any one of the existing attachments in order to download the attachment
      • It gives an  “An error occurred while loading the PDF” error on PDF.js in the previewer and the document stops to load in the previewer
      • However the download of the respective attachment completes and the file gets downloaded to local machine

      Expected - Previewer should not break and continue to load and finish loading the document correctly

      Actual - Previewer breaks with a PDF.js error

      Example - https://nightly-2019.nuxeocloud.com/nuxeo/ui/#!/browse/default-domain/UserWorkspaces/test-user-1/test-attachments/TestPDF20mb.pdf

       

      Browsers tested:
      Firefox Version 105.0.2 (64-bit) - preview breaks
      Safari Version 16.0 (17614.1.25.9.10, 17614) - preview breaks
      Chrome Version 106.0.5249.91 - preview loads successfully

      As noted above, the preview displays an error with Firefox and Safari but Chrome is able to load the preview successfully.  All testing was done on nightly-2019 and nightly-2021.

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: