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

Failing to load pdf.worker.js does not throw an error in pdfjs.getDocument #10135

Closed
wojtekmaj opened this issue Oct 5, 2018 · 0 comments
Closed
Labels

Comments

@wojtekmaj
Copy link
Contributor

Attach (recommended) or Link to PDF file here:

Configuration:

  • PDF.js version: 2.0.550

Steps to reproduce the problem:

  1. Configure PDF.js badly so that pdf.worker.js is a 404 page
  2. Run pdfjs.getDocument

What is the expected behavior?

  1. getDocument Promise gets rejected

What went wrong?

  1. Since creating worker failed, setupFakeWorker is called.
  2. Inside it, setupFakeWorkerGlobal() never resolves, nor never throws an error, if something bad happens with fakeWorker. So adding .catch() to setupFakeWorkerGlobal() or even wrapping it with try {} catch {} does not make any difference.
  3. getDocument Promise is never resolved, does not throw an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants