nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
571 stars 62 forks source link

Image edits are saved but cannot see them again #1549

Open tio-trom opened 1 year ago

tio-trom commented 1 year ago

Describe the bug I edit a photo. I save. All good. But if I close the editor I see the original photo. I close the photo viewer, refresh the page, click the edited image and I still see the original one. If I then click the edit button I see the edited image. Is this how it supposed to work and not overwrite the original image?

Mind you it works if I save the edits under a different name (so a new image)

Desktop (please complete the following information):

GET https://files.trom.tf/apps/photos/api/v1/preview/193132?x=64&y=64 Status 404 Not Found VersionHTTP/1.1 Transferred2 B (2 B size) Referrer Policyno-referrer Request PriorityHigh

cache-control
    no-cache, no-store, must-revalidate
content-length
    2
content-security-policy
    upgrade-insecure-requests
content-type
    application/json; charset=utf-8
date
    Sat, 17 Dec 2022 14:31:53 GMT
expires
    Thu, 19 Nov 1981 08:52:00 GMT
feature-policy
    autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'
permissions-policy
    interest-cohort=()
pragma
    no-cache
referrer-policy
    no-referrer
server
    nginx
strict-transport-security
    max-age=15768000; includeSubDomains; preload;
x-content-type-options
    nosniff
x-download-options
    noopen
X-Firefox-Spdy
    h2
x-frame-options
    SAMEORIGIN
x-permitted-cross-domain-policies
    none
x-request-id
    YfCk4ArKIVQekYlE2Rw8
x-robots-tag
    none
x-sso-wat
    You've just been SSOed
x-xss-protection
    1; mode=block

Accept
    image/avif,image/webp,*/*
Accept-Encoding
    gzip, deflate, br
Accept-Language
    en-US,en;q=0.5
Connection
    keep-alive
Cookie
    __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; nc_username=tio; nc_token=uvVlc%2F3Zu6n2UA%2Bfx6udiuY5wyHQVCCE; nc_session_id=u8chbuaeptvlaej49ihmo9ri4j; ynh_overlay_top=950px; ynh_overlay_left=1791px; oc_sessionPassphrase=O2HR2DWB6kJHlGTYNMB%2FGs%2BnCTpJHpKQ946AKg%2B38joMNbASghGCOmZjYo4U0JpyND%2FIET5e0d4%2BQP92uqZP2T56799MFONXpouOyliKQ5dGQlshc2xUzbxhFzUAvbRL; ocl53be7f8r1=u8chbuaeptvlaej49ihmo9ri4j
DNT
    1
Host
    files.trom.tf
Sec-Fetch-Dest
    image
Sec-Fetch-Mode
    no-cors
Sec-Fetch-Site
    same-origin
Sec-GPC
    1
User-Agent
    Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0

Some Nextcloud Logs that I see:

[PHP] Error: Error: exif_read_data(): File not supported at /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59 at <>

  1. <> OC\Log\ErrorHandler::onError()
  2. /var/www/nextcloud/lib/private/Metadata/Provider/ExifProvider.php line 59 exif_read_data()
  3. /var/www/nextcloud/lib/private/Metadata/MetadataManager.php line 68 OC\Metadata\Provider\ExifProvider->execute()
  4. /var/www/nextcloud/lib/private/Metadata/FileEventListener.php line 101 OC\Metadata\MetadataManager->generateMetadata()
  5. /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 87 OC\Metadata\FileEventListener->handle()
  6. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251 OC\EventDispatcher\ServiceEventListener->__invoke()
  7. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73 Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
  8. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88 Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
  9. /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100 OC\EventDispatcher\EventDispatcher->dispatch()
  10. /var/www/nextcloud/lib/private/Files/Node/HookConnector.php line 118 OC\EventDispatcher\EventDispatcher->dispatchTyped()
    1. /var/www/nextcloud/lib/private/legacy/OC_Hook.php line 106 OC\Files\Node\HookConnector->postWrite()
    2. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 471 OC_Hook::emit()
    3. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 398 OCA\DAV\Connector\Sabre\File->emitPostHooks()
    4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137 OCA\DAV\Connector\Sabre\File->put()
    5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492 Sabre\DAV\Server->updateFile(" sensitive parameters replaced ")
    6. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 Sabre\DAV\CorePlugin->httpPut()
    7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472 Sabre\DAV\Server->emit()
    8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod()
    9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start()
    10. /var/www/nextcloud/apps/dav/lib/Server.php line 360 Sabre\DAV\Server->exec()
    11. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
    12. /var/www/nextcloud/remote.php line 171 require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/files/tio/Stuff/2022-11-05_00-27.png from 196.245.54.144 by tio at 2022-12-17T14:31:41+00:00


And

[index] Error: OCP\Files\NotPermittedException: Could not create folder at <>

  1. /var/www/nextcloud/lib/private/Files/AppData/AppData.php line 147 OC\Files\Node\Folder->newFolder()
  2. /var/www/nextcloud/lib/private/Preview/Storage/Root.php line 74 OC\Files\AppData\AppData->newFolder()
  3. /var/www/nextcloud/lib/private/Preview/Generator.php line 581 OC\Preview\Storage\Root->newFolder()
  4. /var/www/nextcloud/lib/private/Preview/Generator.php line 137 OC\Preview\Generator->getPreviewFolder()
  5. /var/www/nextcloud/lib/private/Preview/Generator.php line 114 OC\Preview\Generator->generatePreviews()
  6. /var/www/nextcloud/lib/private/PreviewManager.php line 185 OC\Preview\Generator->getPreview()
  7. /var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php line 162 OC\PreviewManager->getPreview()
  8. /var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php line 128 OCA\Photos\Controller\PreviewController->fetchPreview()
  9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225 OCA\Photos\Controller\PreviewController->index()
  10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133 OC\AppFramework\Http\Dispatcher->executeController()
    1. /var/www/nextcloud/lib/private/AppFramework/App.php line 172 OC\AppFramework\Http\Dispatcher->dispatch()
    2. /var/www/nextcloud/lib/private/Route/Router.php line 298 OC\AppFramework\App::main()
    3. /var/www/nextcloud/lib/base.php line 1047 OC\Route\Router->match()
    4. /var/www/nextcloud/index.php line 36 OC::handleRequest()

GET /apps/photos/api/v1/preview/227945?x=512&y=512 from 196.245.54.144 by tio at 2022-12-17T14:22:16+00:00



I use Nextcloud 25.0.2
tio-trom commented 1 year ago

I realized that the changes are eventually pushed properly, but it seems to be an issue with the browser cache....log in from a different browser or an incognito/private window seem to show the changes. Should this be addressed here? It is confusing to not see the changes immediately.

DavidMndz commented 11 months ago

I still can see this situation in the current version but I do no think it is related with the browser cache but with the preview image.

What I have realised is that is you edit a photo, for example rotating it, the preview is still the old one but if you download it, the real photo was edited as expected.