android
android copied to clipboard
no previews generated/shown for local images
Steps to reproduce
- Let the app upload and move images and videos to the app's folder
- Start the media view in the app
Expected behaviour
- previews for all pictures and videos should be generated and shown
Actual behaviour
- only previews for pictures that are not on the phone are generated and shown. Instead the app shows the grey static image/video icon - not the colour changing icon which is shown while the preview is loaded/generated. Opening the pictures works though.
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
@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:
Please provide screenshots if possible, would really help a lot.
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.
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.
@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 :
- install a local NC server and join in as a member
- install ffmpeg on it
- 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.
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
@svenb1234 Question: When you say
However, local videos are not loaded when opened via swiping. The display just shows "sorry"
does it show this:
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:
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.
@mlsxlist what is the size of your media folder?
@Tiam-Abderezai the media folder on my device has 45.6 GB. Photos+Videos on Nextcloud server are 51 GB.
@mlsxlist @svenb1234 try clearing the nexcloud app cache on your phones' settings, see if that helps show the previews.
@Tiam-Abderezai, this does not help.
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:
- Select a bunch of pictures to upload
- Select "move to nextcloud folder" as upload behaviour
- 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?
@mlsxlist your problem looks different from the original issue. Please open a separate issue.
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"
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
- ID:
com.nextcloud.client
- Version:
30200390
- Build flavor:
gplay
Device information
- Brand:
google
- Device:
oriole
- Model:
Pixel 6
- Id:
SQ3A.220605.009.B1
- Product:
oriole
Firmware
- SDK:
32
- Release:
12
- Incremental:
8650216
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?
does it show this:
Yes, this is what I see when swiping through the pictures as soon as a locally stored video is "opened".
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.
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.
https://help.nextcloud.com/t/android-app-no-thumbnails-in-media-view/139773
Forum thread with users that share the same issue.
The problem still occurs. Some pictures are showing up, others not.
logcatOutput.txt
The bug persists in One UI 5 (android 13). Only low resolutions pictures are shown.
I too have this issue.
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.
A reinstall of nextcloud app seems to fix it and previews are requested.
Does it fix it permanently?
A reinstall of nextcloud app seems to fix it and previews are requested.
Does it fix it permanently?
It seems working fine.
@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?
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 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.
Same behaviour on fairphone 4. Just to have a note on it...
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.
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?