Closed Bug 1692276 Opened 4 years ago Closed 4 years ago

"This pdf document might not be displayed correctly" message when browsing web pages

Categories

(Firefox :: PDF Viewer, defect)

Firefox 87
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox85 --- affected
firefox86 --- affected
firefox87 --- affected

People

(Reporter: gwarser, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

Open https://sportsbay.org/live-streams and click one of the links (streams?).

Actual results:

Message on top "This pdf document might not be displayed correctly"

Expected results:

No message - there is no pdf file to display.

Console shows:

Warning: Indexing all PDF objects pdf.worker.js:1073:13
Invalid or corrupted PDF file.
PDF.js v2.7.510 (build: 631bada0d)
Message: Invalid PDF structure. viewer.js:1415:15
    error resource://pdf.js/web/viewer.js:1415
    (Async: promise callback)
    error resource://pdf.js/web/viewer.js:1414
    open resource://pdf.js/web/viewer.js:1264
    (Async: promise callback)
    open resource://pdf.js/web/viewer.js:1263
    (Async: promise callback)
    open resource://pdf.js/web/viewer.js:1243
    onOpenWithData resource://pdf.js/web/viewer.js:1020
    windowMessage resource://pdf.js/web/viewer.js:13317
    (Async: EventListener.handleEvent)
    initPassiveLoading resource://pdf.js/web/viewer.js:13269
    initPassiveLoading resource://pdf.js/web/viewer.js:1011
    webViewerOpenFileViaURL resource://pdf.js/web/viewer.js:2626
    webViewerInitialized resource://pdf.js/web/viewer.js:2614
    (Async: promise callback)
    run resource://pdf.js/web/viewer.js:920
    webViewerLoad resource://pdf.js/web/viewer.js:195
    (Async: EventListener.handleEvent)
    __webpack_modules__ resource://pdf.js/web/viewer.js:201
    __webpack_require__ resource://pdf.js/web/viewer.js:13788
    <anonymous> resource://pdf.js/web/viewer.js:13797
    <anonymous> resource://pdf.js/web/viewer.js:13799
Uncaught (in promise) 
Object { message: "Invalid PDF structure.", name: "InvalidPDFException", stack: "BaseExceptionClosure@resource://pdf.js/build/pdf.js:1229:29\n__webpack_modules__<@resource://pdf.js/build/pdf.js:1232:2\n__w_pdfjs_require__@resource://pdf.js/build/pdf.js:11673:41\n__webpack_modules__<@resource://pdf.js/build/pdf.js:274:32\n__w_pdfjs_require__@resource://pdf.js/build/pdf.js:11673:41\n__webpack_modules__<@resource://pdf.js/build/pdf.js:237:41\n__w_pdfjs_require__@resource://pdf.js/build/pdf.js:11673:41\n@resource://pdf.js/build/pdf.js:11683:18\n@resource://pdf.js/build/pdf.js:11684:12\nwebpackUniversalModuleDefinition@resource://pdf.js/build/pdf.js:31:50\n@resource://pdf.js/build/pdf.js:32:3\n" }
Component: Untriaged → PDF Viewer

Hi gwarser,
thank you for taking the time to submit this bug report.
I was able to reproduce on Windows 10 and 7, on Firefox Release 86.0.1 (64-bit), Beta 87.0 (64-bit) and Nightly 88.0a1 (2021-03-17) (64-bit) version.
I'll mark this ticket as NEW for visibility.

Regards,
Jerónimo.

Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to gwarser from comment #0)

[...]

Message on top "This pdf document might not be displayed correctly"

Expected results:

No message - there is no pdf file to display.

Well, technically there actually is a PDF document embedded on that page. However, it's a corrupt/incomplete document and it's positioned outside of the visible page; please note the following excerpt from the HTML code:

<object data="data:application/pdf;base64,aG1t" style="position:absolute;top:-500px;left:-500px;visibility:hidden;" onerror="unsandbox();$(this).remove()" width="1px" height="1px"></object>

Perhaps it'd make sense to not show the fallback bar if the entire viewer is hidden, assuming that's generally easy to detect!?

Severity: -- → S3
Status: NEW → RESOLVED
Closed: 4 years ago
Depends on: 1705327
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.