Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no previews generated/shown for local images #10389

Closed
svenb1234 opened this issue Jun 14, 2022 · 51 comments · Fixed by #13158
Closed

no previews generated/shown for local images #10389

svenb1234 opened this issue Jun 14, 2022 · 51 comments · Fixed by #13158

Comments

@svenb1234
Copy link

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

  • 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 svenb1234 added the bug label Jun 14, 2022
@Tiam-Abderezai
Copy link
Contributor

Tiam-Abderezai commented Jun 17, 2022

@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
Copy link
Author

svenb1234 commented Jun 17, 2022

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
Copy link
Contributor

@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
Copy link

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
Copy link
Contributor

Tiam-Abderezai commented Jun 19, 2022

@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
Copy link
Contributor

@mlsxlist what is the size of your media folder?

@mlsxlist
Copy link

mlsxlist commented Jun 19, 2022

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

@Tiam-Abderezai

This comment was marked as off-topic.

@mlsxlist

This comment was marked as off-topic.

@AlvaroBrey
Copy link
Member

AlvaroBrey commented Jun 20, 2022

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
Copy link
Member

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

@svenb1234
Copy link
Author

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
Copy link
Author

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

@AlvaroBrey
Copy link
Member

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
Copy link
Author

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
Copy link
Author

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
Copy link

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
Copy link
Author

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

Forum thread with users that share the same issue.

@SofianeLasri
Copy link

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
Copy link

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

@photomatix18
Copy link

I too have this issue.

@AlvaroBrey AlvaroBrey self-assigned this Nov 21, 2022
@keesfluitman
Copy link

keesfluitman commented Nov 23, 2022

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.

@AlvaroBrey AlvaroBrey removed their assignment Nov 23, 2022
@svenb1234
Copy link
Author

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

Does it fix it permanently?

@SofianeLasri
Copy link

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

Does it fix it permanently?

It seems working fine.

@svenb1234 svenb1234 mentioned this issue Jan 20, 2023
4 tasks
@PrzemekSkw
Copy link

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
Copy link

pbfreak commented Jan 23, 2023

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
Copy link

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

@svenb1234
Copy link
Author

Check #10389 (comment) This is currently not a priority for the product owner.

@AxTech212
Copy link

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
Copy link

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
Copy link

MartinFialka commented Apr 5, 2023

@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
Copy link

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

@fuzunspm
Copy link

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

@joshtrichards joshtrichards added the performance: SBTBE/SQL related 🗄️ SQLiteBlobTooBigException / SQLite Blob Too Big Exception label Dec 20, 2023
@francescotili
Copy link

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

@pbfreak
Copy link

pbfreak commented Jun 23, 2024

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

@SofianeLasri
Copy link

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
Copy link

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
Copy link

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
Copy link
Contributor

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
Copy link

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

OMG yes thank you 😊

@camillo-positano
Copy link
Contributor

camillo-positano commented Jun 27, 2024

It has been merged, we'll see if it fixes this issue when it gets released ❤️‍🔥

@joshtrichards joshtrichards added this to the Nextcloud App 3.30.0 milestone Jul 5, 2024
@chrissi5120
Copy link

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

@marvinnitz18
Copy link

3.30 release for android, when ❓

@francescotili
Copy link

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
Copy link
Contributor

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

@joshtrichards
Copy link
Member

Fixed in #13158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.