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

[iOS] Webview source/uri cannot load base64 pdf #22416

Closed
3 tasks done
ColinKrist opened this issue Nov 26, 2018 · 2 comments
Closed
3 tasks done

[iOS] Webview source/uri cannot load base64 pdf #22416

ColinKrist opened this issue Nov 26, 2018 · 2 comments
Labels
Component: View Component: WebView Related to the WebView component. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@ColinKrist
Copy link

Environment

Run react-native info in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz
Memory: 5.54 GB / 15.89 GB
Binaries:
Yarn: 1.10.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4720617

Description

Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.

Prior to React Native 57+ Webview could load a base64 pdf on iOS since it was supported natively on UIWebview. After Expo recently upgraded to RN 57+ (Expo 31) our team hit this issue when using rn-pdf-reader-js since this library uses this functionality.

Usage

let data = "data:application/pdf;base64," + pdfbase64Data;

jsx:
<WebView
  style={{ flex: 1}}
  source={{ uri: data}}
/>

When loading the Webview we now get a promise rejection from resolveAssetSource().

yellowbox
NOTE: this image was taken from the expo forum post for rn-pdf-reader-js

NOTE: we haven't tried this with react-native-community/react-native-webview since it hasn't landed, but it seems that they have this working in their repository.

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

@react-native-bot react-native-bot added 🔶Components Component: View Component: WebView Related to the WebView component. Platform: iOS iOS applications. labels Nov 26, 2018
@hramos
Copy link
Contributor

hramos commented Nov 30, 2018

Please use https://github.com/react-native-community/react-native-webview and file a bug there if you have issues.

@hramos hramos closed this as completed Nov 30, 2018
@hughbe
Copy link

hughbe commented Jan 10, 2019

Anyone figured out a workaround?

@facebook facebook locked as resolved and limited conversation to collaborators Nov 30, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: View Component: WebView Related to the WebView component. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants