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

App Crashed When I try to pick a pdf document from storage in Android 12 motorola from recents or whatsapp media document #30

Closed
Abhi5810 opened this issue Sep 13, 2023 · 3 comments

Comments

@Abhi5810
Copy link

java.lang.NullPointerException
at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getDataColumn(FileUtils.kt:154)
at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getMediaDocumentPath(FileUtils.kt:96)
at com.nareshchocha.filepickerlibrary.utilities.FileUtils.pathFromURI(FileUtils.kt:39)
at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getRealPath(FileUtils.kt:21)
at com.nareshchocha.filepickerlibrary.ui.activitys.DocumentFilePickerActivity$selectFile$1.invoke(DocumentFilePickerActivity.kt:66)
at com.nareshchocha.filepickerlibrary.ui.activitys.DocumentFilePickerActivity$selectFile$1.invoke(DocumentFilePickerActivity.kt:56)
at com.nareshchocha.filepickerlibrary.picker.PickerUtils.selectFile$lambda$0(PickerUtils.kt:23)
at com.nareshchocha.filepickerlibrary.picker.PickerUtils.$r8$lambda$5EjpwZuwUTQfOHixKEdyGZdAUG8(Unknown Source:0)
at com.nareshchocha.filepickerlibrary.picker.PickerUtils$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:2)
at androidx.activity.result.ActivityResultRegistry$1.onStateChanged(ActivityResultRegistry.java:149)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.kt:251)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.kt:287)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.kt:136)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.kt:119)
at androidx.lifecycle.ReportFragment$Companion.dispatch$lifecycle_runtime_release(ReportFragment.kt:192)
at androidx.lifecycle.ReportFragment$LifecycleCallbacks.onActivityPostStarted(ReportFragment.kt:121)
at android.app.Activity.dispatchActivityPostStarted(Activity.java:1431)
at android.app.Activity.performStart(Activity.java:8296)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3776)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8090)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)

@ChochaNaresh
Copy link
Owner

You are using letest version of library ?

@Abhi5810
Copy link
Author

Yes i am using that latest version

@VjIntesols
Copy link

VjIntesols commented Sep 27, 2023

Yes, That's true.

In Selecting PDF file only from "Recent" or "Whatsapp" the app crashes.

Process: com.nareshchocha.filepicker, PID: 21380 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=852660289, result=-1, data=Intent { dat=content://com.android.providers.media.documents/... flg=0x43 }} to activity {com.nareshchocha.filepicker/com.nareshchocha.filepickerlibrary.ui.activitys.DocumentFilePickerActivity}: java.lang.NullPointerException at android.app.ActivityThread.deliverResults(ActivityThread.java:5323) at android.app.ActivityThread.handleSendResult(ActivityThread.java:5362) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) Caused by: java.lang.NullPointerException at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getDataColumn(FileUtils.kt:154) at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getMediaDocumentPath(FileUtils.kt:96) at com.nareshchocha.filepickerlibrary.utilities.FileUtils.pathFromURI(FileUtils.kt:39) at com.nareshchocha.filepickerlibrary.utilities.FileUtils.getRealPath(FileUtils.kt:21) at com.nareshchocha.filepickerlibrary.ui.activitys.DocumentFilePickerActivity$selectFile$1.invoke(DocumentFilePickerActivity.kt:66) at com.nareshchocha.filepickerlibrary.ui.activitys.DocumentFilePickerActivity$selectFile$1.invoke(DocumentFilePickerActivity.kt:56) at com.nareshchocha.filepickerlibrary.picker.PickerUtils.selectFile$lambda$0(PickerUtils.kt:23) at com.nareshchocha.filepickerlibrary.picker.PickerUtils.$r8$lambda$5EjpwZuwUTQfOHixKEdyGZdAUG8(Unknown Source:0) at com.nareshchocha.filepickerlibrary.picker.PickerUtils$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:2) at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:418) at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:375) at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:793) at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:164) at android.app.Activity.dispatchActivityResult(Activity.java:8628) at android.app.ActivityThread.deliverResults(ActivityThread.java:5316) at android.app.ActivityThread.handleSendResult(ActivityThread.java:5362)  at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)  at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loopOnce(Looper.java:201)  at android.os.Looper.loop(Looper.java:288)  at android.app.ActivityThread.main(ActivityThread.java:7872)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 

BTW, Great library and very helpful.

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

No branches or pull requests

3 participants