Preview error in NC 31

I’ve just signed up to comment on the (new) NC 31.
It has a major bug in it, which is causing lots of other bugs:

  • My previews don’t work anymore in hub 10:

XImg.vue:95 Failed to load XImg Error fetching single preview: {“message”:“Could not resolve OCP\ILogger! Class can not be instantiated”}

Also, this same error of OCP\Logger class not being instantiated causes lots of other (small) bugs throughout the application and is filling up my logs like no tomorrow.

I couldn’t find anything related to this specific bug online. Does Nextcloud know about this? where can I find a solution or discuss this ?

Forgive me if this is not the right section but unfortunately I have no time to dive and dig into forums and sections at this moment, and am desperately looking for a solution and/or waiting for a update to fix this as soon as possible.

These “small” bugs like no image previews is already pushing my users to go back to big tech services instead which destroys the whole goal of setting up nextcloud ( for me personally ).

Logs full of this same error :

"
Error no app in context
QueryException
Could not resolve OCP\ILogger! Class can not be instantiated "

Which is only happening in this hub 10 version for me.

1 Like

The general github repo is:

Not sure for your code, if that is more specifically from an app, you can find the corresponding repos in apps.nextcloud.com in the description box of the app.

Chances are this is coming from some force enabled app that isn’t compatible with v31.

But we can’t really say since you didn’t posted enough info.

Post the full raw log entry (which includes a stack trace), as requested in the support template.

Do you run Onlyoffice? Then you need to update the integration app :slight_smile: that’s what helped me.

That might def. be the case since I force installed/enabled apps which I was using in the previous version and not work in this new version.
The error might even be totally unrelated in this case.

It will take me some time to individually enable/disable some of the force-enabled apps to see which one is causing the Logger class error.

I’m still clueless as to what is causing the problem ( no previews of images inside “Memory” and “Talk” conversations, but I do see low quality previews of all my photos in the “photos” app.
Do these apps use different preview creators ? ( like Imaginary, imagick, etc ) ? if yes, That might give me a clue where this problem is coming from but I could not find anything useful in the official documentation regarding this.

I’m using Nextcloud AIO ( Hub 10 - 31.0.0)

  • On docker, using WSL 2 Ubuntu 22.04 running on windows 11

I had a previous AIO installation using desktop docker, and in that instance the preview generated with no problems.
I don’t think Docker Desktop is the problem here but who knows.

I will try to find some time later to post most if not all the information needed for debugging. I understand that it’s close to impossible to find out what is causing this weird bug without more information from my side :slight_smile:

No I don’t and I all my apps are updated. a day or 2 ago I received an update for the “Memories” app and was excited that this might finally solve my problems, but unforuntately it didn’t help much.

This Error comes from documentserver_community
do a
sudo -u www-data php8.3 occ app:disable documentserver_community
will solve your error

I don’t have any documentserver_community app enabled, so can’t be that.

Below some logs I get when I try to generate previews:

Failed to generate preview of 1146 with dimension 1024 with nextcloud preview manager: Could not resolve OCP\ILogger! Class can not be instantiated
generating preview of 1146 with dimension 1024 using gdlib
generating preview of 1147 with dimension 1024 using nextcloud preview manager
Failed to generate preview of 1147 with dimension 1024 with nextcloud preview manager: Could not resolve OCP\ILogger! Class can not be instantiated
generating preview of 1147 with dimension 1024 using gdlib
generating preview of 1148 with dimension 1024 using nextcloud preview manager
Failed to generate preview of 1148 with dimension 1024 with nextcloud preview manager: Could not resolve OCP\ILogger! Class can not be instantiated
generating preview of 1148 with dimension 1024 using gdlib
generating preview of 1149 with dimension 1024 using nextcloud preview manager
Failed to generate preview of 1149 with dimension 1024 with nextcloud preview manager: Could not resolve OCP\ILogger! Class can not be instantiated
generating preview of 1149 with dimension 1024 using gdlib
generating preview of 1150 with dimension 1024 using nextcloud preview manager
Failed to generate preview of 1150 with dimension 1024 with nextcloud preview manager: Could not resolve OCP\ILogger! Class can not be instantiated
generating preview of 1150 with dimension 1024 using gdlib
generating preview of 1151 with dimension 1024 using nextcloud preview manager

I’ve found the culprit in the most unexpected place.
I went and disabled most of the apps, and started re-enabling them one by one, looking at “memories” and " talk" app ( reloading them ) and see if preview will re-generate.

I disabled and re-enabled about 20 apps, but the most unexpected one was the cause of my preview generation misery:

Activities for shared file downloads

Version 1.17.0

I still have no idea how in the world this would affect preview generation but now it works. I have disabled/enabled this app about 3 times to double check, and yes. everytime this is turned on, I see no image preview inside Talk conversations or “Memories” app. as soon as I disable this app, reload the page, I see the previews and I also stop getting the weird Logger class error. Hope this can help anybody who is pulling their hair out trying to solve this weird bug.

1 Like

That’s not all that surprising since that app (files_downloadactivity) hasn’t been published for v31 yet. :wink:

Presumably it’s force enabled in your environment, which bypasses all compatibility checks whenever you upgrade Nextcloud Server, leading to breakage like this.

1 Like