cordova-plugin-filepath icon indicating copy to clipboard operation
cordova-plugin-filepath copied to clipboard

Cordova FilePath returns Invalid column _data for image uri from contacts cordova plugin

Open RishabAkalankan opened this issue 6 years ago • 8 comments

I'm trying to get the file path from an URI returned by the cordova contacts plugin using the resolveNativePath from filepath plugin.

contactsImageURI = contact.photo[0].value; contactsImageURI = content://com.android.contacts/contacts/XXXX/photo; this.filePath.resolveNativePath((contactsImageURI)).then(()=> { console.log('success'); }).catch((error: any)) => { console.log(error); }); // output Invalid column _data

can anyone help me out

RishabAkalankan avatar Jun 29 '18 07:06 RishabAkalankan

Hi @RishabAkalankan - is this still happening?

ChrizC avatar Aug 31 '18 21:08 ChrizC

It is happening with me too. I just downloaded your plugin and used it and got the same error: "column '_data' does not exist". Btw, I googled and found that it is since Nougat that they have changed things and even those using Java API are facing this issue. See: https://stackoverflow.com/questions/42508383/illegalargumentexception-column-data-does-not-exist

Could you please fix it?

manishb-socialcurry avatar Sep 07 '18 03:09 manishb-socialcurry

Hi. I have the same issue with Telegram images:

content://org.telegram.messenger.provider/media/Telegram/Telegram%20Images/246936588_94670.jpg

=> "column '_data' does not exist"

Phone: Huawei P9 Version of plugin: 1.4.2

Does not work with files from Telegram and Whatsapp. Other Apps (Google Drive, Huawei Photo App) do work.

ayalpani avatar Oct 18 '18 11:10 ayalpani

@ChrizC I have same problem as @RishabAkalankan. I take contact by cordova contacts plugin, get image url in format "content://com.android.contacts/contacts/:contactId/photo", try to convert, but always get as a result "Invalid column _data"

Eugenizer avatar Feb 25 '19 15:02 Eugenizer

Happens for me as well, using it wrapped with Ionic, but it down to the same error.

cromdev avatar Apr 15 '19 15:04 cromdev

same for me with whatsapp

marvin-SL avatar Apr 29 '19 21:04 marvin-SL

Any update on this issue?????

Alfre90 avatar Feb 19 '20 00:02 Alfre90

Any update on this issue?????

Hello, I did a PR a while ago to fix this https://github.com/hiddentao/cordova-plugin-filepath/pull/53

marvin-SL avatar Feb 20 '20 21:02 marvin-SL