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

ColinKrist opened this issue Nov 26, 2018 · 2 comments


Copy link

commented Nov 26, 2018


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


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.


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

  style={{ flex: 1}}
  source={{ uri: data}}

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

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 Please follow the guidelines for providing a MCVE:


This comment has been minimized.

Copy link

commented Nov 30, 2018

Please use and file a bug there if you have issues.

@hramos hramos closed this Nov 30, 2018


This comment has been minimized.

Copy link

commented Jan 10, 2019

Anyone figured out a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.