notes icon indicating copy to clipboard operation
notes copied to clipboard

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

Open js-d-coder opened this issue 1 year ago • 1 comments

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.

  • Notes app version: 4.10.1
  • Nextcloud version: 28.0.8
  • OS: Linux
  • Web server: Nginx
  • PHP version: 8.3
  • Database: Postgresql 16

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.

  • Browser (incl. version): Version 1.68.134 Chromium: 127.0.6533.88 (Official Build) (arm64)
  • OS: MacOS 14

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()

js-d-coder avatar Aug 07 '24 18:08 js-d-coder

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.

joshtrichards avatar Aug 07 '24 23:08 joshtrichards

Closing due to inability to reproduce, no further follow-up info received after >90 days, and no additional reports seen either.

joshtrichards avatar Mar 11 '25 17:03 joshtrichards