App crash after selecting files
nomanoff opened this issue · comments
Discussed in #607
Originally posted by knightyau November 28, 2022
I have the following dependencies:
"react": "17.0.1"
"react-native": "0.64.2"
"react-native-document-picker": "^8.1.3"
And here is the code that leads to the crash:
const file = await DocumentPicker.pickSingle({
type: [DocumentPicker.types.allFiles],
});
console.log('res : ' + JSON.stringify(file));
I am able to see the file picker, but after selecting any files it will crash without any error on console. I have to use adb logcat to get the errors. Currently testing on my android device.
Any one facing the same problem? Please help!
Added logcat error for reference:
11-28 18:38:04.025 26392 26392 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method getExceptionHandler()Lcom/facebook/react/bridge/JSExceptionHandler; in class Lcom/facebook/react/bridge/ReactContext; or its super classes (declaration of 'com.facebook.react.bridge.ReactContext' appears in /data/app/com.codebox57.connextion-b9Ux2h15gW8UpDGXAnymXg==/base.apk)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule$ProcessDataTask.<init>(DocumentPickerModule.java:234)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule.onShowActivityResult(DocumentPickerModule.java:218)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule$1.onActivityResult(DocumentPickerModule.java:76)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:305)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:762)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:112)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:68)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:7599)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4487)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.ActivityThread.-wrap20(Unknown Source:0)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
11-28 18:38:04.025 26392 26392 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
I'm having the same problem (with same logcat). Happening on android only in my case. I'm on a lesser version of doc picker.
"react": "17.0.2",
"react-native": "0.66.1",
"react-native-document-picker": "^7.1.3",
please open a new issue and follow the issue template, thank you 🙂
Okay
specifically, I need a full app that reproduces the crash, thank you 👍