nextcloud / android

šŸ“± Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.25k stars 1.76k forks source link

no previews generated/shown for local images #10389

Closed svenb1234 closed 2 months ago

svenb1234 commented 2 years ago

Steps to reproduce

  1. Let the app upload and move images and videos to the app's folder
  2. Start the media view in the app

Expected behaviour

Actual behaviour

When swiping, the next local pictures are loaded as well. However, local videos are not loaded when opened via swiping. The display just shows "sorry". Opening the local videos directly from the thumbnail view plays them fine.

Environment data

Android version: 12

Device model: Pixel 6

Stock or customized system: stock

Nextcloud app version: 3.20.3

Nextcloud server version: 23

Tiam-Abderezai commented 2 years ago

@svenb1234 I reproduced the steps on a Pixel 2XL. I only see a picture preview, but not a video preview. Does your error look similar to the following:

image

Please provide screenshots if possible, would really help a lot.

svenb1234 commented 2 years ago

If you do not get a video preview that's probably because ffmpeg or similar is not installed. Also, you are not looking at pictures which are local, i.e. on your phone's nextcloud folder. At least I do not see any green ticks on your screenshot.

Screenshot_20220617-071805

Unfortunately I cannot show you any screenshot of the media view (not file view) since it crashes. But there one would see that those pictures which are only on the server get a preview, the local ones not.

As mentioned above, I use the "move to appp folder after upload feature" of the android app.

Tiam-Abderezai commented 2 years ago

@svenb1234 Thanks for the screenshot.

If you do not get a video preview that's probably because ffmpeg or similar is not installed

Ah that's right, our NC org doesn't have ffmpeg installed. The org I'm a member of isn't hosted by me so I can't add it.

Therefore I'm going to : 1) install a local NC server and join in as a member 2) install ffmpeg on it 3) test by reproducing the error again by following your steps

Also, you are not looking at pictures which are local, i.e. on your phone's nextcloud folder. At least I do not see any green ticks on your screenshot

But there one would see that those pictures which are only on the server get a preview, the local ones not. As mentioned above, I use the "move to appp folder after upload feature" of the android app.

Ok, I will take these in consideration as well as soon as I start testing and update you soon with my findings.

mlsxlist commented 2 years ago

For me previews in the media overview are also not shown anymore. Have the impression that this happens since the last Nextcloud android app update.

Once I tap on a symbol the picture or video is loaded correctly.

Huawei P30 pro Android 10 Nextcloud Android app 3.20.3

Screenshot_20220618_080413_com nextcloud client_edit_204666903772415

Tiam-Abderezai commented 2 years ago

@svenb1234 Question: When you say

However, local videos are not loaded when opened via swiping. The display just shows "sorry"

does it show this: image

Unfortunately I cannot show you any screenshot of the media view (not file view) since it crashes.

Can you crash the app like that by going to the media view and provide the logs here?

I tested this on an emulator for Android 10, NextCloud 23, and the current 3.20.3 app version:

image

it shows the image preview there (maybe cause it's only one picture) what's the size on your local folder? I'm not sure why yours isn't, but if you provide the crash logs from when you go to media view I can maybe figure out why.

Tiam-Abderezai commented 2 years ago

@mlsxlist what is the size of your media folder?

mlsxlist commented 2 years ago

@Tiam-Abderezai the media folder on my device has 45.6 GB. Photos+Videos on Nextcloud server are 51 GB.

Tiam-Abderezai commented 2 years ago

@mlsxlist @svenb1234 try clearing the nexcloud app cache on your phones' settings, see if that helps show the previews.

mlsxlist commented 2 years ago

@Tiam-Abderezai, this does not help.

AlvaroBrey commented 2 years ago

Reproduced (app master - emulator with sdk 31). Interestingly enough, when loading the same files in the main activity, the thumbnail is correctly generated, and is displayed correctly in the Media view afterwards.

So, in order to reproduce:

  1. Select a bunch of pictures to upload
  2. Select "move to nextcloud folder" as upload behaviour
  3. Immediately go into media view

This will show some image preview placeholders instead of the thumbnails. It will be corrected if you go to the main screen and back. Does this match your experience @svenb1234?

AlvaroBrey commented 2 years ago

@mlsxlist your problem looks different from the original issue. Please open a separate issue.

svenb1234 commented 2 years ago

What do you mean by "main view" for me switching to the normal "all files" view and returning to the media view does not help.

I have a folder in my user with the photos in it. That folder is shared to a second user. If I open the android app, all photos that are on my phone as well as on the server are not shown with previews. The second user's pictures are shown with a preview.

If I open the media view on the second user's phone, it is the same, just the other way around. The pictures on the second user's phone are not shown, while mine are shown fine.

In the web-ui, all pictures are shown with preview.

I do remember though that I did have situations where images were shown without preview and after changing to "all files" and back, they were shown. But currently it is as described. Previews are never shown for pictures which are also in the local device's nextcloud app folder.

Maybe unrelated: in the media view the green tick for local pictures is missing. That tick does show-up in the file view of the folder they are in.

Also, the peviews are not shown/generated in the file view either. But that might also be related to the folder having a lot of files and the file view only showing 155 of them, even when refreshing. LArge folders have been an issue for the app for a long time. I cannot find anything in the logs though only the double "//" irritates me a bit.

78.49.52.111 - - [22/Jun/2022:16:27:11 +0000] "PROPFIND /remote.php/dav/files/user//Familienfotos/user%20Telefon/Camera/ HTTP/1.1" 207 100763 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.20.3"

svenb1234 commented 2 years ago

If I use a third device, a tablet which belongs to the first user and has no pictures on it, it generates and shows all previews of user one and two. Generating again because they are larger?

In any case, after that third device which has no local pictures on it has opened the media view, the previews are also shown on the device of the first user with local pictures. The second user's device still does not show the previews for the pictures on the second user's device.

However, the first few times one opens the media view on the first user's device with the local pictures on it, one gets crashes of the attached type. After some crashes the it seems that whatever causes them is solved and everything works without these crashes. Until there are new pictures and the process begins all over. Some cache which is built?

Cause of error

Exception in thread "main" java.lang.IllegalStateException: Couldn't read row 709, col 3 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
    at android.database.CursorWindow.nativeGetString(Native Method)
    at android.database.CursorWindow.getString(CursorWindow.java:462)
    at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:54)
    at android.database.CursorWrapper.getString(CursorWrapper.java:141)
    at com.owncloud.android.datamodel.FileDataStorageManager.createFileInstance(FileDataStorageManager.java:957)
    at com.owncloud.android.datamodel.FileDataStorageManager.getGalleryItems(FileDataStorageManager.java:2224)
    at com.owncloud.android.datamodel.FileDataStorageManager.getAllGalleryItems(FileDataStorageManager.java:2169)
    at com.owncloud.android.ui.adapter.GalleryAdapter.showAllGalleryItems(GalleryAdapter.kt:149)
    at com.owncloud.android.ui.fragment.GalleryFragment.showAllGalleryItems(GalleryFragment.java:262)
    at com.owncloud.android.ui.asynctasks.GallerySearchTask.onPostExecute(GallerySearchTask.java:127)
    at com.owncloud.android.ui.asynctasks.GallerySearchTask.onPostExecute(GallerySearchTask.java:48)
    at android.os.AsyncTask.finish(AsyncTask.java:771)
    at android.os.AsyncTask.access$900(AsyncTask.java:199)
    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7870)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

App information

Device information

Firmware

AlvaroBrey commented 2 years ago

In any case, after that third device which has no local pictures on it has opened the media view, the previews are also shown on the device of the first user with local pictures. The second user's device still does not show the previews for the pictures on the second user's device.

Wow, this is very unexpected. Thanks for the detailed investigation.

However, the first few times one opens the media view on the first user's device with the local pictures on it, one gets crashes of the attached type.

This is the same crash detailed in #10213, can you reply there?

svenb1234 commented 2 years ago

does it show this: image

Yes, this is what I see when swiping through the pictures as soon as a locally stored video is "opened".

svenb1234 commented 2 years ago

In any case, after that third device which has no local pictures on it has opened the media view, the previews are also shown on the device of the first user with local pictures. The second user's device still does not show the previews for the pictures on the second user's device.

I cannot reproduce this anymore. Not sure why it worked before.

So I am back to: local pictures are not shown as preview.

pracovnik commented 2 years ago

Sony XA2 ... fdroid instance of nextcloud android application (newest). Issue is long-term with numerous updates + firmware refresh/clean.downgrade. I do not think this is related to server version.

Issue is the thumbnail in file picker as it doesn't get updated

(1) I make a 5 photos of triangle. Photo get name DSC001.jpg to DSC005.jpg . Via nextcloud android application ... I go to "all-files" in which in some (nexcloud) folder I click "upload files" with "delete after" option. So I go to picture directory on phone and see pictures, where I choose those 5 pictures DSC001.jpg (thumbnail is triangle on each) to upload. It get properly uploaded to nextcloud as I would expect.

(2) I make 6 new photos of a cube. Photo get name DSC001.jpg - DSC006.jpg , as file with that name don't exist in DCIM folder. Via nextcloud android application ... I go to a nextcloud folder(in application, different as above) and click "upload files" with "delete after" option. So I go to picture directory on phone and I see DSC001.jpg-DSC005.jpg with triangle thumbnail and DSC006.jpg with cube as thumbnail. I click upload, it get properly uploaded to nextcloud as I would expect. And the photos DSC001.jpg - DSC006.jpg show cube.

svenb1234 commented 2 years ago

https://help.nextcloud.com/t/android-app-no-thumbnails-in-media-view/139773

Forum thread with users that share the same issue.

SofianeLasri commented 2 years ago

The problem still occurs. Some pictures are showing up, others not. logcatOutput.txt Screenshot_20221020-123657_Nextcloud Screenshot_20221020-123641_Nextcloud Screenshot_20221020-123650_Nextcloud

SofianeLasri commented 1 year ago

The bug persists in One UI 5 (android 13). Only low resolutions pictures are shown.

photomatix18 commented 1 year ago

I too have this issue.

keesfluitman commented 1 year ago

I too have this issue for one user suddenly. Used to work. In memories it works and requests previews. Android, samsung galaxy s21 5g.

A reinstall of nextcloud app seems to fix it and previews are requested.

svenb1234 commented 1 year ago

A reinstall of nextcloud app seems to fix it and previews are requested.

Does it fix it permanently?

SofianeLasri commented 1 year ago

A reinstall of nextcloud app seems to fix it and previews are requested.

Does it fix it permanently?

It seems working fine.

svenb1234 commented 1 year ago

@AlvaroBrey so how is this "fix" coming to the many users that do have the app already installed and do not reinstall apps on a regular basis?

SofianeLasri commented 1 year ago

No in fact it only temporarily fixed the problem. It now occurs again. I suspect it to be related to the automatic folder sending but I'm not sure. Probably the problem came back after a reboot of my phone.

AlvaroBrey commented 1 year ago

@AlvaroBrey so how is this "fix" coming to the many users that do have the app already installed and do not reinstall apps on a regular basis?

I was able to reproduce this problem (or another with similar symptoms), but due to other priorities I am unable to work on debugging it. Unfortunately both the media view code AND the thumbnail generation code are a bit of a mess, so it's going to take some time to work through it, and I don't have that time right now.

work-flower commented 1 year ago

Same behaviour on fairphone 4. Just to have a note on it...

Kevinsky86 commented 1 year ago

Galaxy S22 Ultra on android 13, also seeing this issue... Auto upload is activated. Opening the empty thumbnails works just fine. Everything from before app install also previews fine, but all photo's taken after app install (and are thusly auto-uploaded) do not show preview/thumbnail.

PrzemekSkw commented 1 year ago

Hello, I reinstall app and see all photos but after I make new I don't see them. So it's not normal to reinstall app all the time I make new photos with smartphone šŸ˜• Any news when app will be fixed?

pbfreak commented 1 year ago

Hello, same Problem here. Preview of Photos are not Shows. After i switch to "Files" and reload a folder with Pictures i have preview pictures of this Photos in Files and Media

chrissi5120 commented 1 year ago

11431 pretty similar behavior for me, is anyone working on a solution?

svenb1234 commented 1 year ago

Check https://github.com/nextcloud/android/issues/10389#issuecomment-1346704653 This is currently not a priority for the product owner.

AxTech212 commented 1 year ago

I just want to metion - i have the same problem - only with androiddevices and i have the problem since more than one year - there seems to be a bigger problem.

chrissi5120 commented 1 year ago

I just want to metion - i have the same problem - only with androiddevices and i have the problem since more than one year - there seems to be a bigger problem.

Yeah, this is going on ā€œforeverā€ on my side, sorry for this gloss-over descriptionā€¦ I got so used to switch back to the folders and check media tab again, that I could not name a point in time when this all started.

One weird thing is, that it lately seems to work fine 90% of the time on my wives Galaxy Tab S7. This is my only tablet-device and the only difference I see immediately, is that there is the bigger screen and the propable different preview being used here?

All other android devices "in service" for my family fail, right now Pixel 6a, Galaxy S8, Galaxy A 53, Moto G 12-something..

This is the number on topic of discussion in my family regarding this app.

MartinFialka commented 1 year ago

@AlvaroBrey so how is this "fix" coming to the many users that do have the app already installed and do not reinstall apps on a regular basis?

I was able to reproduce this problem (or another with similar symptoms), but due to other priorities I am unable to work on debugging it. Unfortunately both the media view code AND the thumbnail generation code are a bit of a mess, so it's going to take some time to work through it, and I don't have that time right now.

It would be very nice to clean that up. I'm also having the same issue on android 13, pixel 7.

chrissi5120 commented 1 year ago

Hey @AlvaroBrey any chance you could look into that? Issue is persisting for all my Android devices.

fuzunspm commented 11 months ago

I have the same issue. Previews are working on web browser but on android app they are missing. Clicking on an image correctly displays full quality image

francescotili commented 4 months ago

So it's now June 2024, the issue is still open. Are there any news on this??

pbfreak commented 4 months ago

Still having the Problem. Switched to Photopris Works perfectly. If you want to only sync Photos/Videos have a look

SofianeLasri commented 4 months ago

So it's now June 2024, the issue is still open. Are there any news on this??

I think you can still wait several months, they prefer to focus on adding futile AI-based features, rather than fixing bugs.

chrissi5120 commented 4 months ago

My workflow for Android:

Donā€™t use the gallery, itā€™s useless. I gave up.

IOS:

all fine, except stuff is not uploading in background and I have to ask people to keep the app open for that to happen. Probably apples fault.

Desktop/Laptop/Tablet:

just use memories, it is better in every way.

I would like to contribute good money specifically for that feature to work normally, it is that big of a pain in theā€¦

SofianeLasri commented 4 months ago

If it were possible, I would not use Nextcloud at all. The problem is that it is literally the only self-hostable solution that is mature enough to store all my files while being able to access them from all my devices. If there was another similar paid solution, I would have used it with pleasure.

I've been using Nextcloud for several years (2016, at the time it was Owncloud), and I still can't convince my family and friends to use it despite the fact that I manage the server, and therefore the storage space. It must be said that the platform is not a dream, quite the contrary! The web interface still looks cheap (I even have the impression that it gets worse year after year), the mobile application is still full of bugs, and the desktop application seems to come straight from the early 2000s. They much prefer to hurt themselves by trying not to exceed the storage space provided for free by Google, Apple or Microsoft, rather than using this "abomination" that Nextcloud represents for them.

And the worst part is that with each major update, Nextcloud doesn't seem to fix many bugs, but on the contrary, seems to add a ton of features that are almost useless.

"You didn't ask for face recognition? Well, we added one, and it works very badly! :D You didn't ask for a totally useless integration with the famous "Artificial Intelligence"? Well, we added one too! But since that wasn't enough, it's up to you to create the applications to make it work. And yes, we couldn't be bothered to do it (it would have been too bad anyway, so we might as well do nothing :) )".

camillo-positano commented 4 months ago

Hello i've had this issue for a while as well. i created a pull request (#13158 ) that will fix this issue. Got a first approval and waiting on a merge!

Hope it fixes it for everybody

francescotili commented 4 months ago

i created a pull request (#13158 ) that will fix this issue.

OMG yes thank you šŸ˜Š

camillo-positano commented 3 months ago

It has been merged, we'll see if it fixes this issue when it gets released ā¤ļøā€šŸ”„

chrissi5120 commented 3 months ago

is there a build of 3.30 available which contains the fix?

marvinnitz18 commented 2 months ago

3.30 release for android, when ā“

francescotili commented 2 months ago

3.30 release for android, when ā“

I am interested too, the update release speed is extremely slow, is this normal? It's been two months and it's still not in production?

camillo-positano commented 2 months ago

I dont think before september/october because august (at least in italy) is vacation month. Dont know if its in all europe tho