question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blank screen on loading pdf from URL `http://docs.google.com/gview?embedded=true&url=${url}`

See original GitHub issue

Bug description: Sometimes pdf is rendered fine and sometime it’s just blank screen, debugged it many times but always the url and headers are same. Don’t know what is causing the issue.

To Reproduce: let url = http://docs.google.com/gview?embedded=true&url=${url};

<WebView ref={(ref) => { this.webviewReload = ref; }} source={{ uri: url, headers: headers, }} incognito={true} style={{ flex: 1 }} onLoadEnd={() => this.setState({ loaded: true })} />

Expected behavior: Pdf should always render successfully.

Screenshots/Videos: simulator_screenshot_1C57D609-EBA0-4A76-B21A-F7E19C26EC48

Environment:

  • OS: macOS 11.0.1
  • react version: 16.13.1 => 16.13.1
  • react-native version: 0.63.3 => 0.63.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:11

github_iconTop GitHub Comments

5reactions
adrianveecotechcommented, Jun 23, 2021

onLoad={(syntheticEvent) => { const { nativeEvent } = syntheticEvent; if (nativeEvent.title == "") { webViewRef.current.reload(); } }}

0reactions
github-actions[bot]commented, Nov 29, 2021

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web PDF files will not open or download. I get just a blank ...
When I try to open a web PDF file, I just get a blank/black screen. "Automatic download" is turned off already, so that...
Read more >
react-native-community - Bountysource
Blank screen on loading pdf from URL `http://docs.google.com/gview?embedded=true&url=${url}`
Read more >
Q. When I try to view a PDF article, I just see blank pages after ...
If you are having issues with PDFs downloading incompletely in Chrome (can see one page and the rest of the pdf comes out...
Read more >
webview shows blank screen some times while opening pdf in ...
The PDF file has many pictures and chart. It load the PDF perfectly. But some times it shows blank screen. I added the...
Read more >
Chrome PDF Viewer Not Working? Here's How to Fix It
Instead of opening the PDF file, Chrome PDF Viewer might display a black screen similar to the one that appears when a PDF...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found