Column 'last_modified' does not exist

During upload using native Gallery app and Nextcloud in logcat I have like below:
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: Exception while copying content://media/external/images/media/28757 to temporary file
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: java.lang.IllegalArgumentException: column ‘last_modified’ does not exist. Available columns: [instance_id, duration, description, picasa_id, latitude, orientation, height, is_drm, bucket_display_name, owner_package_name, volume_name, date_modified, date_expires, _display_name, datetaken, mime_type, _id, _data, _hash, _size, title, width, longitude, is_trashed, group_id, document_id, is_pending, date_added, mini_thumb_magic, primary_directory, secondary_directory, isprivate, original_document_id, bucket_id, relative_path]
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:352)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:91)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at com.owncloud.android.ui.asynctasks.CopyAndUploadContentUrisTask.doInBackground(CopyAndUploadContentUrisTask.java:156)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at com.owncloud.android.ui.asynctasks.CopyAndUploadContentUrisTask.doInBackground(CopyAndUploadContentUrisTask.java:49)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at android.os.AsyncTask$3.call(AsyncTask.java:378)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
12-28 14:05:29.904 20898 30079 E CopyAndUploadContentUrisTask: at java.lang.Thread.run(Thread.java:919)

Samsung Galaxy S10e, Android 10, Nextcloud ver 3.14.1

Hi, I just had the same error on a Samsung Galaxy S9, same app version (3.14.1):

12-29 13:50:17.125 12299 19630 E CopyAndUploadContentUrisTask: Exception while copying content://media/external/images/media/29876 to temporary file
12-29 13:50:17.125 12299 19630 E CopyAndUploadContentUrisTask: java.lang.IllegalArgumentException: column ‘last_modified’ does not exist. Available columns: [instance_id, duration, description
, picasa_id, latitude, orientation, height, is_drm, bucket_display_name, owner_package_name, volume_name, date_modified, date_expires, _display_name, datetaken, mime_type, _id, _data, _hash, _
size, title, width, longitude, is_trashed, group_id, document_id, is_pending, date_added, mini_thumb_magic, primary_directory, secondary_directory, isprivate, original_document_id, bucket_id,
relative_path]

Regards,

I tried different tests.

  1. From any application upload to Nextcloud (using Nextcloud app) gives this same issue like above.
  2. Using Nextcloud app I can upload files without any issues.

I tried to search source code of Nextcloud but coudn’t find out string ‘last_modified’. It can be related to android changes/upgrades.

Seems to be a know issue and there is a merged PR on GitHub https://github.com/nextcloud/android/pull/7649 which is also backported to the stable-3.14 branch so i expect the fix to be deployed with the next version.

Thanks for the information, let’s be patient, so. :wink: