react-native-doc-viewer icon indicating copy to clipboard operation
react-native-doc-viewer copied to clipboard

Pdf not opening on Android after updating react-native version to 0.51.0

Open MugeshM opened this issue 7 years ago • 4 comments

MugeshM avatar Jan 12 '18 05:01 MugeshM

Do u have installed a third party app on Android which support pdf?

philipphecht avatar Jan 15 '18 07:01 philipphecht

Same with me (RN 0.52). In my case, I have a third party app for pdf's.


crash details using logcat (adb logcat -D)

--------- beginning of crash
01-23 10:44:20.269 32212 32212 E AndroidRuntime: FATAL EXCEPTION: main
01-23 10:44:20.269 32212 32212 E AndroidRuntime: Process: (Omitted), PID: 32212
01-23 10:44:20.269 32212 32212 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:584)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:558)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:400)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at com.reactlibrary.RNReactNativeDocViewerModule$FileDownloaderAsyncTask.onPostExecute(RNReactNativeDocViewerModule.java:326)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at com.reactlibrary.RNReactNativeDocViewerModule$FileDownloaderAsyncTask.onPostExecute(RNReactNativeDocViewerModule.java:276)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.os.AsyncTask.finish(AsyncTask.java:660)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.os.AsyncTask.-wrap1(AsyncTask.java)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:677)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6692)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
01-23 10:44:20.269 32212 32212 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

Fconstant avatar Jan 23 '18 12:01 Fconstant

Strangely, creating a brand new RN 0.52 project and installing & linking react-native-doc-viewer won't cause errors at all.

Fconstant avatar Jan 23 '18 13:01 Fconstant

I look at this.

philipphecht avatar Mar 26 '18 19:03 philipphecht