Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

java.lang.NullPointerException on FilePath.getDataColumn | Crash Report #68

Open
tonn1o opened this issue Nov 17, 2020 · 1 comment
Open

Comments

@tonn1o
Copy link

tonn1o commented Nov 17, 2020

This crash happens only for Android 11 and Pixel devices.
Unable to reproduce.

Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {xxx.app/xxx.app.MainActivity}: java.lang.NullPointerException: uri

android.app.ActivityThread.deliverResults (ActivityThread.java:5015)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947)
Caused by java.lang.NullPointerException

java.util.Objects.requireNonNull (Objects.java:245)
android.content.ContentResolver.query (ContentResolver.java:1157)
android.content.ContentResolver.query (ContentResolver.java:1115)
android.content.ContentResolver.query (ContentResolver.java:1071)
> com.hiddentao.cordova.filepath.FilePath.getDataColumn (FilePath.java:212)
com.hiddentao.cordova.filepath.FilePath.getPath (FilePath.java:386)
com.hiddentao.cordova.filepath.FilePath.resolveNativePath (FilePath.java:103)
com.hiddentao.cordova.filepath.FilePath.onRequestPermissionResult (FilePath.java:138)
org.apache.cordova.CordovaInterfaceImpl.onRequestPermissionResult (CordovaInterfaceImpl.java:221)
org.apache.cordova.CordovaActivity.onRequestPermissionsResult (CordovaActivity.java:511)
android.app.Activity.dispatchRequestPermissionsResult (Activity.java:8466)
android.app.Activity.dispatchActivityResult (Activity.java:8314)
android.app.ActivityThread.deliverResults (ActivityThread.java:5008)
android.app.ActivityThread.handleSendResult (ActivityThread.java:5056)
android.app.servertransaction.ActivityResultItem.execute (ActivityResultItem.java:51)
android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2066)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:223)
android.app.ActivityThread.main (ActivityThread.java:7656)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:592)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947)
@tonn1o
Copy link
Author

tonn1o commented Nov 19, 2020

Looks like the plugin doesn't work correctly with Android 10/11.
I solved the problem by removing this plugin and using Chooser to get the base64 encoded file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant