Flutter_file_picker: column '_data' does not exist when picking from Dropbox

Created on 1 May 2019  路  11Comments  路  Source: miguelpruivo/flutter_file_picker

When picking from Dropbox on Android there is a deterministic crash with ...MainActivity}: java.lang.IllegalArgumentException: column '_data' does not exist

I guess this is the same issue as it was for image picker:
https://github.com/flutter/plugins/pull/772
Fix:
https://github.com/flutter/plugins/pull/772/commits/8e380534f1f0b7f25219b23288d1c2dd274e92cf

bug ready to deploy

All 11 comments

Probably will be the same, since they share underlying platform code for picking files. I'll add this for the 1.4.0 roadmap.

Thank you for reporting.

@apps-transround just released a fix for this in beta. Could you please give it a try and let me know if it's working for you? Just replace the file_picker: 1.3.6 in your pubspec.yaml with the following:

  file_picker:
    git:
      url: https://github.com/miguelpruivo/plugins_flutter_file_picker.git
      ref: beta

Thank you!

@apps-transround just released a fix for this in beta. Could you please give it a try and let me know if it's working for you? Just replace the file_picker: 1.3.6 in your pubspec.yaml with the following:

  file_picker:
    git:
      url: https://github.com/miguelpruivo/plugins_flutter_file_picker.git
      ref: beta

Thank you!

i have tried this way, but nothing changes. it crashes again if i choos dropbox

@bayuramadeza you need to make sure you do a flutter clean and then rebuild.

Also, if the same happens post your logs please. It shouldn鈥檛 happen with that version as the fix is already applied.

Thank you.

@bayuramadeza you need to make sure you do a flutter clean and then rebuild.

Also, if the same happens post your logs please. It shouldn鈥檛 happen with that version as the fix is already applied.

Thank you.

So, after i tried, this is happened
Failure delivering result ResultInfo{who=null, request=38442, result=-1, data=Intent { dat=content://com.dropbox.android.FileCache/filecache/9c6a764d-5d39-4d45-8ac3-e163df38d77d typ=application/pdf flg=0x3 }} to activity {com.example.MainActivity}: java.lang.IllegalArgumentException: column '_data' does not exist
E/AndroidRuntime( 6869): at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:339)
E/AndroidRuntime( 6869): at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:87)
E/AndroidRuntime( 6869): at com.mr.flutter.plugin.filepicker.FileUtils.getDataColumn(FileUtils.java:133)
E/AndroidRuntime( 6869): at com.mr.flutter.plugin.filepicker.FileUtils.getForApi19(FileUtils.java:114)
E/AndroidRuntime( 6869): at com.mr.flutter.plugin.filepicker.FileUtils.getPath(FileUtils.java:29)
E/AndroidRuntime( 6869): at com.mr.flutter.plugin.filepicker.FilePickerPlugin$1.onActivityResult(FilePickerPlugin.java:78)
E/AndroidRuntime( 6869): at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:204)
E/AndroidRuntime( 6869): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:132)
E/AndroidRuntime( 6869): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:142)
E/AndroidRuntime( 6869): at android.app.Activity.dispatchActivityResult(Activity.java:7121)
E/AndroidRuntime( 6869): at android.app.ActivityThread.deliverResults(ActivityThread.java:4175)
E/AndroidRuntime( 6869): ... 9 more
I/Process ( 6869): Sending signal. PID: 6869 SIG: 9
Lost connection to device.

@bayuramadeza thank you for you fast response. Just committed a new fix, can you flutter clean and build again and let me know if it's working now? Also, I would suggest you to remove the .pub_cache/git to make sure it is fetching the new version.

@bayuramadeza thank you for you fast response. Just committed a new fix, can you flutter clean and build again and let me know if it's working now? Also, I would suggest you to remove the .pub_cache/git to make sure it is fetching the new version.

Thank you @miguelpruivo , it's work now.

I thank you @bayuramadeza for your cooperation. Glad it鈥檚 working now.

Just let me know if you find any other issue. I鈥檒l deploy a new version on pub.dev with this and other fixed by the end of the week and close this afterwards.

Once more, thank you for reporting.

hai @miguelpruivo i think there is a new issues while we pick a file from (Oppo colorOS) Filemanager, it is happening now
Fatal Exception: java.lang.RuntimeException
Failure delivering result ResultInfo{who=null, request=39027, result=-1, data=Intent { act=android.intent.action.SEND dat=content://com.coloros.filemanager/file_share/storage/emulated/0/AGroupCompressPDF/2019_test.pdf flg=0x1 (has extras) }} to activity {com.topkarir.topkarir/com.topkarir.topkarir.MainActivity}: java.lang.IllegalArgumentException: column '_data' does not exist

@bayuramadeza this have happened before with some other custom rom and actually doubt if I can do anything about it as of now.

Those file managers from those roms handle the file in a way that don鈥檛 return a valid path of the picker file.

You can try to install a different file explorer and see if by using it, it works for you.

Thank you.

Fixed in 1.3.7.

Was this page helpful?
0 / 5 - 0 ratings