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

_data column is not found exception in 7.0 Nougat #156

Closed
kumarbhubnesh opened this issue Oct 6, 2017 · 12 comments
Closed

_data column is not found exception in 7.0 Nougat #156

kumarbhubnesh opened this issue Oct 6, 2017 · 12 comments

Comments

@kumarbhubnesh
Copy link

kumarbhubnesh commented Oct 6, 2017

Hi Am using URIHelpers.java for getting the uri from file path but in nougat its throwing exception.

 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 dropbox.UriHelpers.getDataColumn(UriHelpers.java:98)
     at dropbox.UriHelpers.getFileForUri(UriHelpers.java:73)
     at dropbox.UploadFileTask.doInBackground(UploadFileTask.java:62)
     at dropbox.UploadFileTask.doInBackground(UploadFileTask.java:28)
     at android.os.AsyncTask$2.call(AsyncTask.java:304)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
     at java.lang.Thread.run(Thread.java:761) 
@greg-db
Copy link
Contributor

greg-db commented Oct 6, 2017

@kumarbhubnesh Can you share the code that reproduces this issue? Thanks in advance!

@kumarbhubnesh
Copy link
Author

UriHelpers.txt Line no. 73 of this file. i have used this file from dropbox sample.

@greg-db
Copy link
Contributor

greg-db commented Oct 9, 2017

@kumarbhubnesh Apologies, I'm not sure I follow. Can you share any code that you wrote that triggers this? Or, if there is code in one of our samples that triggers this, can you link to the relevant sample and line? Thanks in advance!

@kumarbhubnesh
Copy link
Author

UploadFileTask.txt
@greg-db This is the file from your sample which triggers it.

@greg-db
Copy link
Contributor

greg-db commented Oct 10, 2017

@kumarbhubnesh Thanks! I just tried uploading a file using the Android example app that uses UploadFileTask on Android 7.0 though and it didn't reproduce that crash.

Can you share some more specific steps for reproducing this? Thanks in advance!

@kumarbhubnesh
Copy link
Author

@greg-db Ok let me check that sample again,.

@nicolabeghin
Copy link

Any update on this?

@greg-db
Copy link
Contributor

greg-db commented Dec 4, 2017

@nicolabeghin I don't have an update on this. Are you seeing this issue as well? We have not been able to reproduce it. If you can, please share the code and steps to do so. Thanks!

@nicolabeghin
Copy link

nicolabeghin commented Dec 4, 2017

Hi @greg-db I just used the de-facto standard aFileChooser and just selected a file from the Dropbox app. I can confirm the _data column is not available, therefore throwing an exception at https://github.com/iPaulPro/aFileChooser/blob/master/aFileChooser/src/com/ipaulpro/afilechooser/utils/FileUtils.java#L330

Maybe your UploadFileTask is not crashing because you're uploading a file and not selecting one?

image

@greg-db
Copy link
Contributor

greg-db commented Dec 4, 2017

@nicolabeghin I see, thank you. Based on this, I see that this error is actually more about interacting with the official Dropbox Android app (com.dropbox.android) and not the Dropbox API itself. I can only provide support for the Dropbox API part though.

Please open this is as a ticket here with these details and I'll redirect that to the right people. Thanks!

@greg-db greg-db closed this as completed Dec 4, 2017
@HBiSoft
Copy link

HBiSoft commented Apr 13, 2019

@nicolabeghin Did you resolve this? If you did, do you mind sharing? Thank you.

@nicolabeghin
Copy link

@HBiSoft if I'm not wrong I changed in aFileChooser to handle all files as "to be downloaded" like below. Not pretty if you ask me, but had no time to deep dive in this.

public static boolean isCloudFile(Uri uri) {
        return "content".equalsIgnoreCase(uri.getScheme());
    }

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

4 participants