nextcloud / spreed

🗨️ Nextcloud Talk – chat, video & audio calls for Nextcloud
https://nextcloud.com/talk
GNU Affero General Public License v3.0
1.61k stars 428 forks source link

Uploading a image sometimes fails with exception #9681

Open SystemKeeper opened 1 year ago

SystemKeeper commented 1 year ago

How to use GitHub


Steps to reproduce

  1. Upload an image in talk-web

Expected behaviour

See the image preview after the message was loaded from the server

Actual behaviour

Most of the time the temporary message (which shows the preview) is replaced by a placeholder. An internal server error can be observed. Not seeing this when doing an upload from a mobile client.

https://github.com/nextcloud/spreed/assets/1580193/5b135c97-baea-4f00-9f1f-1e2dfb302b36

Talk app

Talk app version: Talk 17 RC2

Browser

Operating system: MacOS 13.2

Browser name: Chrome

Browser version: 112

Exception

```json { "reqId": "LYanVxDqemp9114LexKr", "level": 3, "time": "2023-06-02T07:41:48+00:00", "remoteAddr": "...", "user": "...", "app": "index", "method": "GET", "url": "/core/preview?fileId=7538715&x=-1&y=768&a=1", "message": "Could not create folder \"/appdata_.../preview/7/0/b/f/f/2/4/7538715\"", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", "version": "27.0.0.6", "exception": { "Exception": "OCP\\Files\\NotPermittedException", "Message": "Could not create folder \"/appdata_.../preview/7/0/b/f/f/2/4/7538715\"", "Code": 0, "Trace": [ { "file": "/var/www/.../nextcloud/lib/private/Files/AppData/AppData.php", "line": 147, "function": "newFolder", "class": "OC\\Files\\Node\\Folder", "type": "->", "args": [ "7/0/b/f/f/2/4/7538715" ] }, { "file": "/var/www/.../nextcloud/lib/private/Preview/Storage/Root.php", "line": 74, "function": "newFolder", "class": "OC\\Files\\AppData\\AppData", "type": "->", "args": [ "7/0/b/f/f/2/4/7538715" ] }, { "file": "/var/www/.../nextcloud/lib/private/Preview/Generator.php", "line": 643, "function": "newFolder", "class": "OC\\Preview\\Storage\\Root", "type": "->", "args": [ "7538715" ] }, { "file": "/var/www/.../nextcloud/lib/private/Preview/Generator.php", "line": 139, "function": "getPreviewFolder", "class": "OC\\Preview\\Generator", "type": "->", "args": [ [ "OC\\Files\\Node\\File" ] ] }, { "file": "/var/www/.../nextcloud/lib/private/Preview/Generator.php", "line": 116, "function": "generatePreviews", "class": "OC\\Preview\\Generator", "type": "->", "args": [ [ "OC\\Files\\Node\\File" ], [ [ -1, 768, false, "fill" ] ], "image/jpeg" ] }, { "file": "/var/www/.../nextcloud/lib/private/PreviewManager.php", "line": 192, "function": "getPreview", "class": "OC\\Preview\\Generator", "type": "->", "args": [ [ "OC\\Files\\Node\\File" ], -1, 768, false, "fill", null ] }, { "file": "/var/www/.../nextcloud/core/Controller/PreviewController.php", "line": 144, "function": "getPreview", "class": "OC\\PreviewManager", "type": "->", "args": [ [ "OC\\Files\\Node\\File" ], -1, 768, false, "fill" ] }, { "file": "/var/www/.../nextcloud/core/Controller/PreviewController.php", "line": 113, "function": "fetchPreview", "class": "OC\\Core\\Controller\\PreviewController", "type": "->", "args": [ [ "OC\\Files\\Node\\File" ], -1, 768, true, true, "fill" ] }, { "file": "/var/www/.../nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 230, "function": "getPreviewByFileId", "class": "OC\\Core\\Controller\\PreviewController", "type": "->", "args": [ 7538715, -1, 768, true, true, "fill" ] }, { "file": "/var/www/.../nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 137, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OC\\Core\\Controller\\PreviewController" ], "getPreviewByFileId" ] }, { "file": "/var/www/.../nextcloud/lib/private/AppFramework/App.php", "line": 183, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OC\\Core\\Controller\\PreviewController" ], "getPreviewByFileId" ] }, { "file": "/var/www/.../nextcloud/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OC\\Core\\Controller\\PreviewController", "getPreviewByFileId", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "core.Preview.getPreviewByFileId" ] ] }, { "file": "/var/www/.../nextcloud/lib/base.php", "line": 1064, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/core/preview" ] }, { "file": "/var/www/.../nextcloud/index.php", "line": 36, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/.../nextcloud/lib/private/Files/Node/Folder.php", "Line": 166, "CustomMessage": "--" } } ```
Antreesy commented 1 year ago

Possibly related with server/core issue: