Check this first
Describe the bug
After loading the pdf file in ngx-extended-pdf-viewer it's showing an error in the console like TypeError: Promise.allSettled is not a function
Version info
Desktop (please complete the following information):
To Reproduce
Can you provide a reproducer? That's a small and simple but complete project demonstrating the bug.
Otherwise, please tell me how to reproduce the behavior:
Demo PDF file
Many errors happen with specific PDF files only. So please add a PDF file (after checking the copyright of the PDF file first!)
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
Please update to a current version of zone.js. The old versions of zone.js are like a polyfill, just the other way round: they wrap functions like Promise in order to add additional features. Too bad it took some time to support the full range of modern ES2015 methods.
So all you need to do is to update to a modern version of zone.js. When I did that, the update went flawlessly.
stephan is right ! Also npm update zone.js won't update zone.js to the most recent version. You actually have to specify a version name npm update [email protected]
Still having a problem with ng2-pdf-viewer. I get this error when I upload pdfs:
pdf.js:7221 Uncaught (in promise) TypeError: Promise.allSettled is not a function
at MessageHandler._deleteStreamController (pdf.js:7221)
at MessageHandler._processStreamMessage (pdf.js:7160)
at Worker.MessageHandler._onComObjOnMessage (pdf.js:6817)
at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:4736)
at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at ZoneTask../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:498)
at invokeTask (zone.js:1744)
at Worker.globalZoneAwareCallback (zone.js:1781)
@jasonmonroe Did you add the polyfills? In particular, did you update to zone.js 10.x?
By the way, if you're interested in ng2-pdf-viewer, this is the wrong bugtracker. :)
I gave up and removed it. Decided to use the HTML5
On Wed, Jul 1, 2020 at 1:54 PM Stephan Rauh notifications@github.com
wrote:
@jasonmonroe https://github.com/jasonmonroe Did you add the polyfills?
In particular, did you update to zone.js 10.x?By the way, if you're interested in ng2-pdf-viewer, this is the wrong
bugtracker. :)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stephanrauh/ngx-extended-pdf-viewer/issues/263#issuecomment-652590098,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANF52TMBIQC7L33RQ55TXDRZOA7VANCNFSM4MIUP6ZA
.
In order to solveFailed to load PDF file,

I added pdfjs.GlobalWorkerOptions.workerSrc = https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
I have tried npm update [email protected] , but it is still wrong

@hengqu4 This looks like Google Chrome. You say you're already using zone.js 0.10.3? Strange.
You can try to use the es5 versions of the files (i.e. pdf-es5.min.js, pdf.worker-es5.min.js, and viewer-es5.min.js.
BTW, if you're using ngx-extended-pdf-viewer, it's a bad idea to use the original pdf.js files from Cloudflare. I've modified the files from Mozilla, so you'll miss a couple of bug fixes and new features.
Most helpful comment
Please update to a current version of zone.js. The old versions of zone.js are like a polyfill, just the other way round: they wrap functions like
Promisein order to add additional features. Too bad it took some time to support the full range of modern ES2015 methods.So all you need to do is to update to a modern version of zone.js. When I did that, the update went flawlessly.