react-pdf: Visiting react-pdf throws Unhandled rejection: DataCloneError in IE10 on Windows <10

It looks like react-pdf is not compatible with IE11 and IE10 on Windows version 8.1 (tested through Browserstack). IE11 on Windows 10 does not have this problem. An Unhandled rejection: DataCloneError error is thrown. Tried it with several PDF’s, including the react-pdf sample at http://projekty.wojtekmaj.pl/react-pdf/

I found this closed pdf.js issue which seems related. Any idea?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (11 by maintainers)

Most upvoted comments

@up209d That is not a good idea to import both entry files, and disabling worker won’t work in React-PDF 4.x.

Would you check the newest beta if you’re getting the same error?

Published it right now. Check out v2.4.1!

This is in IE11 on Windows 8.1 using Browserstack:

screen shot 2017-11-04 at 18 07 56 screen shot 2017-11-04 at 18 08 22

Doesn’t give loads of useful information unfortunately, but it seems like it might be the worker that causes trouble.

I linked this earlier. Seems to be related, if not exactly the same problem.

I can confirm that disabling the worker loads and renders a PDF correctly in my own viewer app built with react-pdf in IE10 on Windows 8.1 (tested through Browserstack). Although not ideal (switching on/off the worker based on some kind of browser/device detection algorithm), I guess the solution @8enSmith proposes is the only way to go.