Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Our PDF.js as extension-wrapped can't display a PDF that Firefox can #2654

Closed
BrendanEich opened this issue Jul 22, 2016 · 5 comments
Closed
Milestone

Comments

@BrendanEich
Copy link
Member

Did you search for similar issues before submitting this one?

Yes.

Describe the issue you encountered:

A PDF (DM'ed over Slack to @diracdeltas because confidential until reduced results in the "PDF is invalid or corrupted" error in Brave, but works in Firefox with its PDF.js, and works in Chrome.

(Sorry, short on time -- I didn't test in Chrome with the PDF.js extension yet.)

Expected behavior:

The PDF renders properly.

  • Platform (Win7, 8, 10? macOS? Linux distro?): macOS El Capitan.
  • Brave Version: 0.11.1
  • Steps to reproduce:
    1. Load (private, for now) PDF via file: URL.
    2. Get error.
    3. Confirm works in Firefox loaded same way.
@diracdeltas
Copy link
Member

Also broken in Chrome w/ pdfjs extension. @Rob--W do you have debugging tips? chrome console error:

Error: Invalid XRef stream header
pdf.worker.js:2312     at error (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:2312:17)
    at Object.XRef_readXRef [as readXRef] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:35350:13)
    at Object.XRef_parse [as parse] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:34933:28)
    at Object.PDFDocument_setup [as setup] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:41402:17)
    at Object.PDFDocument_parse [as parse] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:41283:12)
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:41593:28
    at LocalPdfManager_ensure [as ensure] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:41588:14)
    at LocalPdfManager.BasePdfManager_ensureDoc [as ensureDoc] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:41521:19)
    at chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:42076:22
pdf.worker.js:2298 Warning: Indexing all PDF objects
viewer.js:7847 Uncaught (in promise) Error: Invalid or corrupted PDF file.(…)

PDF.js v1.5.294 (build: 64a409b)
Message: Invalid PDF structure

@Rob--W
Copy link

Rob--W commented Jul 22, 2016

Looks like the file is malformed, and/or not correctly parsed by PDF.js. I'd start with building the latest version of PDF.js from master, and if that doesn't resolve the issue, check which Firefox/PDF.js version was used.

If you (with the reporter's consent) share the PDF file by mail, then I can also take a look if needed.

@diracdeltas
Copy link
Member

diracdeltas commented Jul 22, 2016

same error in Chrome with pdfjs built from master (10f9f11ec4cb1221c8be5335f1bf5aed19c558c0). @BrendanEich could you generate a PDF using the same process as the broken one but without the confidential information?

@bbondy
Copy link
Member

bbondy commented Jul 22, 2016

The PDF is our hiring document, I just generated a new one with fake info. It is not a public document though even know it is fake info so I will email you @Rob--W. Thanks for taking a look.

@luixxiul
Copy link
Contributor

in 0.11.2?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants