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

Text layer crash in Safari iOS #1655

Open
4 tasks done
lksnmnn opened this issue Oct 26, 2023 · 3 comments
Open
4 tasks done

Text layer crash in Safari iOS #1655

lksnmnn opened this issue Oct 26, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@lksnmnn
Copy link

lksnmnn commented Oct 26, 2023

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

I have updated from 6.2.2 to the latest version (7.5.1). While it does work in browsers, it crashes for some (!) PDFs in Safari on iOS. This happens both on 15.X and 16.X iOS devices.

I can't really narrow down, why some PDFs work and others do not. The crash happens in pdf-js when trying to render the text layer:

TypeError: null is not an object (evaluating 'this._transport.messageHandler.sendWithStream')
streamTextContent — 2b7b2d2a.c91375ee806f06d5.js:1400:84

I assume that this is probably a bug in either pdf-js or some error in Safari. However, it might be something else thus I have opened this ticket here.

Steps to reproduce

  1. Implement latest version
  2. open example PDF
  3. See worker crash on iOS safari.

Expected behavior

Does not crash :)

Actual behavior

Crashes

Additional information

media-d7734040-c661-442c-8d0f-ecb1e3a59c4c.pdf

Environment

  • Browser (if applicable): Safari 15.X, Safari 16.X (latest)
  • React-PDF version: 7.5.1 (also tried 7.3.3)
  • React version: 18.2.0
  • Webpack version (if applicable): 5.89.0
@lksnmnn lksnmnn added the bug Something isn't working label Oct 26, 2023
@lksnmnn
Copy link
Author

lksnmnn commented Oct 26, 2023

Also I just saw, that "modern" pdf-js does not support Safari at all. Will try the "legacy" version, else I will downgrade for now :)

@NIticache
Copy link

NIticache commented Jan 10, 2024

Can I know which version you downgraded to , i am currently using 6.2.2

@lksnmnn
Copy link
Author

lksnmnn commented Mar 25, 2024

Hey, sorry for the late reply. I've downgraded to 6.2.2.
I haven't tried the latest version, but I guess the issue is with pdf-js ?!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants