After upgrading from nextcloud 28 to 29, this error occurred when changing the theme

After upgrading from nextcloud 28 to 29, this error occurred when changing the theme

phpinfo has imagick

Because of the error application/x-empty i think the image has got the wrong format. Can you post the name of the image? I can not read it.

Please execute on the command line and maybe post:
file filename.suffix
(i think .suffix is not .jpg, .png, …)

You can also check it here:

Image format is ok, this is the background image I used before. In addition, I also tried other images, but they can’t be uploaded

If you have any questions, I can try to change it to English.

Please provide the requested image information which is shown if you execute the following commands:

file filename.suffix
file --mime filename.suffix

i trying run the with occ command ,but can not run it.
wraing :‘Command “file” is not defined’.
please tell to me where running these commands?

i try debug /apps/theming/lib/Controller/ThemingController.php

When debugging the $this->imageManager->updateImage function, I found the following error message

javascript is enabled


{"reqId":"rB5050MtrmVVWxLk9Dqn","level":3,"time":"2024-06-24T08:31:56+00:00","remoteAddr":"","user":"adam","app":"index","method":"POST","url":"/apps/theming/ajax/uploadImage","message":"Unsupported image type: application/x-empty","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36","version":"","exception":{"Exception":"Exception","Message":"Unsupported image type: application/x-empty","Code":0,"Trace":[{"file":"/Volumes/data/web/","line":282,"function":"updateImage","class":"OCA\\Theming\\ImageManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/Volumes/data/web/","line":232,"function":"uploadImage","class":"OCA\\Theming\\Controller\\ThemingController","type":"->"},{"file":"/Volumes/data/web/","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/Volumes/data/web/","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/Volumes/data/web/","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/Volumes/data/web/","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/Volumes/data/web/","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/Volumes/data/web/","Line":227,"message":"Unsupported image type: application/x-empty","exception":{},"CustomMessage":"Unsupported image type: application/x-empty"}}

You should improve your Linux knowledge. At some point you will get serious problems and will not be able to save your system. file is a Linux command and not an occ-command.

/usr/bin/file filename.suffix

I think the debug mode is not the same as the normal version. I think you get the error only because of the debug mode.