Android 11 Crash when picking document
See original GitHub issueQuestion
Hi, I am having some issues with my app. Every time that a User selects a document from the document picker the application crashes with this error
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/~~SCx97egAGsAfLGze8YO-CQ==/xxxx.xxxx.xxxx-DoHB1qByuZVWIJImkdaEFw==/base.apk!classes16.dex)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule$ProcessDataTask.<init>(DocumentPickerModule.java:234)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule.onShowActivityResult(DocumentPickerModule.java:218)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.reactnativedocumentpicker.DocumentPickerModule$1.onActivityResult(DocumentPickerModule.java:76)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:333)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:785)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:113)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:70)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:8316)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:5237)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:5285)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2251)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.os.Looper.loop(Looper.java:233)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8068)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
11-22 19:30:29.269 17692 17692 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Does anyone know why this might be happening? Thanks!
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Android: apps crashes every time i try to open file manager
Hello all, I have a very big problem: If I open an app that needs to interact with my file manager, when I...
Read more >Detect and diagnose crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >App crashes on opening of File Browser (Android 11) #30
App crashes on opening of File Browser (Android 11) #30 ... It surprises me, that there can be a case without handler for...
Read more >App crash on file pick in android · Issue #286 - GitHub
Hi i am not able to pick file app get crashed when i select any file. I an using android device. Issue printed...
Read more >android - After opening PDF with intent, app crashes with ...
Selecting the document works and open fine in Polaris. When now switching back, the app crashes with Unable to start activity ...MainActivity ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@acollazomayer i have to change from “super(reactContext.getExceptionHandler());” to “super(reactContext);” . it works fine. Code at line 234 in DocumentPickerModule.java .
Hello, I’m closing this because upon further inspection, this should not be an issue. The constructor we use is present in RN 63 https://github.com/facebook/react-native/blob/0.63-stable/ReactAndroid/src/main/java/com/facebook/react/bridge/GuardedResultAsyncTask.java
and also in latest, RN 71.
To sum it up, this should not be an issue and if it is an issue, then please open a new one and follow the issue template, thank you 😃