nextcloud / notes

✎ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
623 stars 133 forks source link

ImageNotWritableException: Controller failed with OCA\Notes\Service\ImageNotWritableException #1339

Open js-d-coder opened 3 months ago

js-d-coder commented 3 months ago

Steps to reproduce

  1. Open existing note in Notes app in browser
  2. Add an image by uploading it

Expected behaviour

Image should be uploaded and added in the note

Actual behaviour

Image upload fails with 500 error: {"errorType":"OCA\\Notes\\Service\\ImageNotWritableException"}

Server

Please complete the following information.

Nextcloud configuration:

{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "" ], "enable_previews": "false", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "28.0.8.1", "overwrite.cli.url": "", "forcessl": true, "overwriteprotocol": "https", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "5432", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "theme": "", "loglevel": 1, "log_type": "file", "logfile": "\/var\/www\/nextcloud-data\/nextcloud.log", "logfilemode": 416, "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "updater.release.channel": "stable", "filelocking.enabled": "true", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379 }, "has_rebuilt_cache": true, "twofactor_enforced": "true", "twofactor_enforced_groups": [ "admin" ], "twofactor_enforced_excluded_groups": [], "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "tls", "mail_smtpauthtype": "PLAIN", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "default_phone_region": "IN", "defaultapp": "dashboard", "app_install_overwrite": [ "mindmap_app", "files_videoplayer" ], "maintenance_window_start": 1, "memories.exiftool": "\/var\/www\/html\/nxc\/apps\/memories\/bin-ext\/exiftool-amd64-glibc", "memories.vod.path": "\/var\/www\/html\/nxc\/apps\/memories\/bin-ext\/go-vod-amd64", "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg", "memories.vod.ffprobe": "\/usr\/bin\/ffprobe", "preview_max_x": 512, "preview_max_y": 512, "memories.db.triggers.fcu": true } }

Client

Please complete the following information.

Log files

Server Logs:

ImageNotWritableException
Controller failed with OCA\Notes\Service\ImageNotWritableException
/var/www/html/nxc/apps/notes/lib/Controller/NotesController.php
line 347
OCA\Notes\Service\NotesService->createImage(
  "*** sensitive parameters replaced ***"
)
/var/www/html/nxc/apps/notes/lib/Service/Util.php
line 26
OCA\Notes\Controller\NotesController->OCA\Notes\Controller\{closure}(
  "*** sensitive parameters replaced ***"
)
/var/www/html/nxc/apps/notes/lib/Controller/Helper.php
line 140
OCA\Notes\Service\Util::retryIfLocked()
/var/www/html/nxc/apps/notes/lib/Controller/NotesController.php
line 346
OCA\Notes\Controller\Helper->handleErrorResponse()
/var/www/html/nxc/lib/private/AppFramework/Http/Dispatcher.php
line 230
OCA\Notes\Controller\NotesController->uploadFile()
/var/www/html/nxc/lib/private/AppFramework/Http/Dispatcher.php
line 137
OC\AppFramework\Http\Dispatcher->executeController()
/var/www/html/nxc/lib/private/AppFramework/App.php
line 184
OC\AppFramework\Http\Dispatcher->dispatch()
/var/www/html/nxc/lib/private/Route/Router.php
line 315
OC\AppFramework\App::main()
/var/www/html/nxc/lib/base.php
line 1069
OC\Route\Router->match()
/var/www/html/nxc/index.php
line 39
OC::handleRequest()
joshtrichards commented 3 months ago

I can't reproduce this problem.

Anything unusual about your environments tmp directory configuration or file ownership? Or any warnings or errors listed under Administration settings->Overview?

This failing within a fairly basic PHP upload mechanism.