iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

Unsupported column: _data #44

Open gattacus opened 10 years ago

gattacus commented 10 years ago

I have crashes with the library. Device is Nexus 5 with Android 4.4.2. Trace is Caused by: java.lang.UnsupportedOperationException: Unsupported column: _data at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:169) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137) at android.content.ContentProviderProxy.query(ContentProviderNative.java:413) at android.content.ContentResolver.query(ContentResolver.java:461) at android.content.ContentResolver.query(ContentResolver.java:404) at com.ipaulpro.afilechooser.utils.FileUtils.getDataColumn(FileUtils.java:218) at com.ipaulpro.afilechooser.utils.FileUtils.getPath(FileUtils.java:319)

How to fix this?

devashishmamgain commented 10 years ago

@gattacus this must be coming for remote files eg: google + and picasa files

snwalkunde commented 8 years ago

Hi,

Were you able to solve this?

I am also getting the same issue for my production app but i am unable to reproduce the issue on my devices

I tried google+ and picasa app for sharing images with my app and it works fine.

I am using this cordova file chooser plugin which internally uses aFileChooser library.

https://github.com/cdibened/filechooser

Following is the stacktrace

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app.and/com.example.app.and.ShareHandlerActivity}: java.lang.IllegalArgumentException: column '_data' does not exist at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2426) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) Caused by: java.lang.IllegalArgumentException: column '_data' does not exist at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:333) at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:87) at com.ipaulpro.afilechooser.utils.FileUtils.getDataColumn(SourceFile:233) at com.ipaulpro.afilechooser.utils.FileUtils.getPath(SourceFile:330) at com.example.app.and.ShareHandlerActivity.onCreate(SourceFile:111) at android.app.Activity.performCreate(Activity.java:6259) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379) ... 9 more

Any help on reproducing the issue or markers to resolving is appreciated.

Thanks Shashikant