memories icon indicating copy to clipboard operation
memories copied to clipboard

Unable to Save Metadata in Memories After Update to NextCloud 31.0.0 and Memories 7.5.0

Open natural-chop opened this issue 1 year ago • 15 comments

Describe the bug

After updating to NextCloud 31.0.0 and Memories 7.5.0, I am unable to edit metadata. When I click the "Save" button, I get an error.

The NextCloud logs show the following:

[index] Error: No stream arrays were passed in file '/var/www/html/custom_apps/memories/lib/Util.php' line 539
	PATCH /apps/memories/api/image/set-exif/165347
	from 192.168.1.144 by truenas_admin at 27 февр. 2025 г., 14:47:15

Steps To Reproduce

  1. Open Memories in a browser
  2. Select a photo or video
  3. Click Edit metadata
  4. Enter any date and click Save

Platform

- OS: Docker on TrueNAS
- Browser: Edge
- Memories Version: 7.5.0
- Nextcloud Version: 31.0.0
- PHP Version: 8.3.17

Screenshots

Image Image Image Image Image

Additional context

The last two screenshots are not directly related to the error, but I attached them in the hope that they might help identify the issue.

natural-chop avatar Feb 27 '25 11:02 natural-chop

Are you able to run exiftool manually?

/tmp/exiftool-... -ver

pulsejet avatar Feb 28 '25 18:02 pulsejet

Nevermind, there does seem to be a regression here

pulsejet avatar Feb 28 '25 19:02 pulsejet

Please try v7.5.2 https://github.com/pulsejet/memories/releases/tag/v7.5.2

pulsejet avatar Feb 28 '25 19:02 pulsejet

Updated to 7.5.2, the issue seems to be resolved. Thank you.

natural-chop avatar Mar 01 '25 09:03 natural-chop

this error still happens for me on 7.5.2, the image gets updated, but no metadata is being saved (i only edited the geolocation)

This happens both on the android app, and in the webinterface

Nextcloud Hub 10 (31.0.0) Docker AIO memories 7.5.2


NVM, it was filesystempermissions, preventing write access......

NL-TCH avatar Mar 14 '25 07:03 NL-TCH

I came here having still issues editing EXIF, wanted to edit some old school photos from daughter. Single and mass edit EXIF fails. I hope I provided the right details to debug, this being my first entry on GitHub ;)

Name: Nextcloud (Docker in TrueNas Scale) App Version: 31.0.0 Version: 1.6.12 Memories: 7.5.2

[no app in context] Debug: OCA\Memories\Controller\ImageController::setExif uses the @NoAdminRequired annotation and should use the #[OCP\AppFramework\Http\Attribute\NoAdminRequired] attribute instead PATCH /apps/memories/api/image/set-exif/1070678 from xxx.xxx.xxx.xxx by UsernameHidden at 16 Mar 2025, 23:39:08

[no app in context] Debug: dirty table reads: SELECT filecache.fileid, storage, path, path_hash, filecache.parent, filecache.name, mimetype, mimepart, size, mtime, storage_mtime, encrypted, filecache.etag, filecache.permissions, checksum, unencrypted_size, metadata_etag, creation_time, upload_time, meta.json AS meta_json, meta.sync_token AS meta_sync_token FROM *PREFIX*filecache filecache LEFT JOIN *PREFIX*filecache_extended fe ON filecache.fileid = fe.fileid LEFT JOIN *PREFIX*files_metadata meta ON filecache.fileid = meta.file_id WHERE (path_hash = :dcValue1) AND (storage = :dcValue2) PATCH /apps/memories/api/image/set-exif/1070678 from xxx.xxx.xxx.xxx by UsernameHidden at 16 Mar 2025, 23:39:09

TomDesktop avatar Mar 16 '25 23:03 TomDesktop

It appears to be happening with the current store release as well https://help.nextcloud.com/t/does-nextcloud-memories-allow-modifying-the-coordinate-data-in-heic-files/226159/7

trajano avatar Jun 03 '25 15:06 trajano

@NL-TCH which filesystempermissions are you talking of?

trajano avatar Jun 03 '25 16:06 trajano

It appears to be a transaction issue

 Debug    no app in context  Exception: dirty table reads: SELECT `path` FROM     2025-06-03T17:09:27+00:00
                              `*PREFIX*filecache` WHERE (`storage` = :dcValue1)
                              AND (`fileid` = :dcValue2) at
                              lib/private/DB/Connection.php line 406

                               0. .../ConnectionAdapter.php line 50
                                  OC\DB\Connection->executeQuery(
                                    "SELECT ... )",
                                    {dcValu ... "},
                                    {dcValu ... 1}
                                  )
                               1. .../QueryBuilder.php line 289
                                  OC\DB\ConnectionAdapter->executeQuery(
                                    ... )",
                                    ... "},
                                    ... 1}
                                  )
                               2. .../ExtendedQueryBuilder.php line 285
                                  OC\DB\QueryBuilder\QueryBuilder->executeQuery(
                                    OC\DB\ConnectionAd ... {}
                                  )
                               3. .../Cache.php line 1098
                                  OC\DB\QueryBuilder\ExtendedQueryBuilder->executeQuery(

                                  )
                               4. .../Cache.php line 398
                                  OC\Files\Cache\Cache->getPathById("*** ... *")
                               5. .../Scanner.php line 273
                                  OC\Files\Cache\Cache->update("*** sens ... *")
                               6. .../Scanner.php line 227
                                  OC\Files\Cache\Scanner->addToCache(
                                    "** ... *",
                                    "** ... *",
                                    "** ... *"
                                  )
                               7. .../Scanner.php line 320
                                  OC\Files\Cache\Scanner->scanFile(
                                    "***  ... *",
                                    3,
                                    14256,
                                    OC\Fi ... {},
                                    false
                                  )
                               8. .../Updater.php line 112
                                  OC\Files\Cache\Scanner->scan(
                                    "*** sens ... *",
                                    false,
                                    3,
                                    false
                                  )
                               9. .../View.php line 262
                                  OC\Files\Cache\Updater->update("*** se ... *")
                              10. .../View.php line 1230
                                  OC\Files\View->writeUpdate(
                                    OCA\Files_T ... }},
                                    "*** sensit ... *",
                                    "*** sensit ... *",
                                    "*** sensit ... *"
                                  )
                              11. .../View.php line 528
                                  OC\Files\View->basicOperation(
                                    "touch",
                                    "\/traja ... C",
                                    ["touch"],
                                    null
                                  )
                              12. .../Node.php line 145
                                  OC\Files\View->touch(
                                    "\/trajano\/files ... C",
                                    null
                                  )
                              13. .../Exif.php line 395
                                  OC\Files\Node\Node->touch(

                                  )
                              14. .../ImageController.php line 284
                                  OCA\Memories\Exif::setFileExif(
                                    OC\File ... {},
                                    {GPSLat ... "}
                                  )
                              15. .../UtilController.php line 20
                                  OCA\Memories\Controller\ImageController->OCA\Memories\Controller\{closure}(
                                    "* ... *"
                                  )
                              16. .../ImageController.php line 267
                                  OCA\Memories\Util::guardEx(Closure {})
                              17. .../Dispatcher.php line 200
                                  OCA\Memories\Controller\ImageController->setExif(
                                    "*** sensitive parameters re ... *",
                                    {GPSLatitude:"43.734190",GPSLongitude:"-79.358089",GPSLatitudeRef:"N",GPSLongitudeRef:"W",GPSCoordinates:"43.734190, - ... "}
                                  )
                              18. .../Dispatcher.php line 114
                                  OC\AppFramework\Http\Dispatcher->executeController(
                                    OCA\Memories\Controller\Image ... {},
                                    ... f"
                                  )
                              19. .../App.php line 161
                                  OC\AppFramework\Http\Dispatcher->dispatch(
                                    OCA\Memories\Controller\ImageControlle ... {},
                                    "setE ... f"
                                  )
                              20. .../Router.php line 307
                                  OC\AppFramework\App::main(
                                    "OCA\\Memori ... r",
                                    "setExif",
                                    OC\AppFramew ... {},
                                    {id:"14344", ... "}
                                  )
                              21. .../base.php line 1040
                                  OC\Route\Router->match("\/apps\/memori ... 4")
                              22. index.php line 24
                                  OC::handleRequest(

                                  )

trajano avatar Jun 03 '25 17:06 trajano

@NL-TCH which filesystempermissions are you talking of?

linux filesystem permissions (RWX), fixed by running: occ files scan all

NL-TCH avatar Jun 03 '25 20:06 NL-TCH

@NL-TCH which filesystempermissions are you talking of?

linux filesystem permissions (RWX), fixed by running: occ files scan all

occ files:scan --all

I got

+---------+-------+-----+---------+---------+--------+--------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
+---------+-------+-----+---------+---------+--------+--------------+
| 349     | 11270 | 0   | 227     | 0       | 0      | 00:00:28     |
+---------+-------+-----+---------+---------+--------+--------------+

So it may be a good thing

UPDATE: tried to edit an HEIC file, still not updating. :(

trajano avatar Jun 03 '25 21:06 trajano

Updated to 31.0.6 no luck yet.

trajano avatar Jun 12 '25 20:06 trajano

If this is a regression, how do I downgrade to the older version maybe it may fix my issue.

trajano avatar Jun 15 '25 02:06 trajano

Can you provide a sample for for which it fails?

pulsejet avatar Jul 12 '25 15:07 pulsejet

https://github.com/trajano/nextcloud-docker/blob/trajano-patch-1/IMG_1596.HEIC

Note one thing I noticed was this was part of a Live Photo, but attempting to download the "video" portion yielded a 404 for some odd reason.

The fact that it is LivePhoto may be the culprit, for some odd reason LivePhotos are not working for me with either the internal or external transcoder. The developer tools show requests for the memories livephoto api call to be 404

trajano avatar Jul 12 '25 21:07 trajano