nextcloud/files_photospheres

An error occurred trying to read xmp-data

Closed this issue ยท 31 comments

recently my NC 21 does not work anymore for panoramas.

I get the exact same issue as reported here:

nextcloud/server#25759

I will gladly assist in debugging this, if someone can tell me what else is needed to clarify

clarification: sometimes it does work, sometimes not. i cannot yet determine why and when the issue happens.

R0Wi commented

Hi @kadrim, thanks for reporting this. Could you please post some snippets of your serverside and clientside logs? Could you also give some information regarding your setup?

Thanks @R0Wi for your quick reply!

currently i cannot reproduce the issue. can it be related to some form of caching? i did rule out browser caching by using different browsers (always in-private-mode).

Or maybe it just happens with high io-load? my server (debian 10 VM on proxmox) was busy with backups today.

R0Wi commented

So the mentioned error message in the issue you provided (nextcloud/server#25759) can only be thrown at
https://github.com/nextcloud/files_photospheres/blob/master/lib/Service/ShareService.php#L59. Are you dealing with shared files and/or folders? The message comes from NC core telling that the shared link does not exist anymore for whatever reason.

in general yes, i use sharing. for the test i did perform yesterday, i just uploaded the file via the browser and tried to open it afterwards. so no sharing involved.

i also checked the NC logs, but nothing of relevance in there at the time of testing. maybe i would need more verbose output, but for that, the bug must be reproducible.

yesterday it happened 10 out of 9 attempts, but after my backup on the host-server finished (or some other coincidence) it worked again like a charm.

i even don't know if it is related to photosphere at all, i just reported it here, as this was suggested on the issue mentioned above.

what i will try next:

as my server is a VM, i will try to artifically limit the IOPS to see if this increases the chance to get the bug to reappear.

If you have any other suggestion, you are quite welcome :-)

R0Wi commented

Ok that sounds strange to my ears because i'm quite convinced that the error message can only be thrown at the point i mentioned. And that code is only executed if you access a file via a share link. But yes it seems like that if we have a look at the provided screenshots.

I'll provide a patch with extended logging, would be glad if you could check this one when it's finished. Also let me know your results regarding IO ๐Ÿ‘

will do, sir ;-)

R0Wi commented

@kadrim could you try the draft in #73 (maybe by patching via git curl https://patch-diff.githubusercontent.com/raw/nextcloud/files_photospheres/pull/73.patch | git apply while being inside the nextlcloud/apps/files_photospheres folder)? And please set the serverside loglevel to 1 for the time debugging.

Then please post your log snippets here if that's possible. What's really strange ist that the error message really can just come from the point where the app tries to read XMP metadata for a shared file. So currently i cannot say why this is done when viewing a "regular" file when being logged in. So i think we will have to clarify this first because that's really strange.

@R0Wi japp, will do. i am currently cloning my VM and will then enable the IOPS limiter to see if the bug will present itself again.

i tool the liberty to ask the original-bug-authors to participate aswell.

alright, i see this isn't an NC bug directly, and a photosphere bug. Thanks for linking to this issue from the Server issue @kadrim . So, the comment above about patching... can I do this to a production instance without messing up the App upgradeability?

I have now encountered it for 360 photos inside my NC 21 instance.

Edit: funny thing is... it only happens when the folder is not shared. Once you share the folder, the 360 photosphere comes up without error

R0Wi commented

@sylikc thanks for the additional information. The patch can be applies without messing up the app if you're using the latest app version. It basically only adds some logging at various points so no need to be afraid here :-)

I'd really be looking forward if you could share your server logs after applying the steps in #72 (comment).

One question: you're talking about sharing the folder which contains the photosphere image, not sharing the image directly, is this correct? Could be a important hint for me.

@R0Wi yes, I had the error when viewing from the NC21 files when logged in.

Then I went to SHARE the FOLDER to see if someone else could see the photosphere (from the shared folder link), and it worked.

Then I went back to my logged in instance, and i could view the photosphere 360 with no errors.

R0Wi commented

Super strange ๐Ÿ˜„ Thank's for the hint, could help me for further investigation ๐Ÿ‘

ok, what I did now was unshare the folder... as soon as I unshare the folder, the error comes up again (and the 360 photo becomes flat again).

I'll run the patch and check server logs in a bit

ok, so i ran the patch (had to remove the .vscode/launch.json stuff from the last commit)... i need some help getting you the applicable logs

Edit: I pulled something from nextcloud.log, might be what you're looking for but I'm not sure... (I redacted private info)

{"reqId":"1gJIe1qb8zlPHQWS6pl5","level":0,"time":"2021-05-05T07:51:00+00:00","remoteAddr":"10.10.10.10","user":"DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF","app":"camerarawpreviews","method":"GET","url":"/nc/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=test360.jpg&path=/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.1.1"}
{"reqId":"1gJIe1qb8zlPHQWS6pl5","level":0,"time":"2021-05-05T07:51:00+00:00","remoteAddr":"10.10.10.10","user":"DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF","app":"serverDI","method":"GET","url":"/nc/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=test360.jpg&path=/","message":"The requested alias \"PreviewManager\" is deprecated. Please request \"OCP\\IPreview\" directly. This alias will be removed in a future Nextcloud version.","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.1.1"}
{"reqId":"1gJIe1qb8zlPHQWS6pl5","level":0,"time":"2021-05-05T07:51:00+00:00","remoteAddr":"10.10.10.10","user":"DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF","app":"files_sharing","method":"GET","url":"/nc/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=test360.jpg&path=/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.1.1"}
{"reqId":"1gJIe1qb8zlPHQWS6pl5","level":1,"time":"2021-05-05T07:51:00+00:00","remoteAddr":"10.10.10.10","user":"DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF","app":"files_photospheres","method":"GET","url":"/nc/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=test360.jpg&path=/","message":"Reading XMP data for shared file with token undefined, filename: test360.jpg, path: /","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.1.1"}
{"reqId":"1gJIe1qb8zlPHQWS6pl5","level":3,"time":"2021-05-05T07:51:00+00:00","remoteAddr":"10.10.10.10","user":"DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF","app":"files_photospheres","method":"GET","url":"/nc/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=test360.jpg&path=/","message":{"Exception":"OCP\\Share\\Exceptions\\ShareNotFound","Message":"Share not found: The requested share does not exist anymore","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_photospheres/lib/Controller/SharefilesController.php","line":55,"function":"getXmpData","class":"OCA\\Files_PhotoSpheres\\Service\\ShareService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"getXmpData","class":"OCA\\Files_PhotoSpheres\\Controller\\SharefilesController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/files_photospheres/lib/Service/ShareService.php","Line":59,"Hint":"Share not found: The requested share does not exist anymore","CustomMessage":"Share not found: The requested share does not exist anymore"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36","version":"21.0.1.1"}

odd... ok, so more information... currently the folder is NOT SHARED.

  1. I'm using latest Chrome on Windows 10 at the moment...
  2. I click a file, and it gives me that error (An error occured while trying to read xmp-data: Share not found: The requested share does not exist anymore)
  3. I press F5 to refresh and it gives me that error
  4. I press F5 to refresh and it gives me that error again
  5. and sometimes when I mash F5, it loads it ... actually I can't reliably reproduce this behavior

@sylikc i still suspect some kind of IO-Load to be responsible, but had no time yet to prepare my VM with an IOPS limit.

could you create some artificial IO on your NC-Server like copying large files while testing? And try to see if then the error is persistant?

otherway around: can you reduce the IO-Load on your system somehow and see if the error vanishes?

@kadrim I'll try a large file sync test later .... but unfortunately my environment is kinda wonky.

I'm running inside a virtual environment on relatively budget hardware... on top of that, the data folder is on an NFS share to a NAS. Network is blazing fast though with LACP link on the virtual host.

I don't know how that would affect the way photospheres works, but my environment is probably not ideal to do IOPS limit testing, as there's lots more variables

R0Wi commented

Thank you all guys for sharing your information. @sylikc i can see in your logs that there is a request made to the endpoint which normally handles shared directories but this one shouldn't be triggered at all because you are in a "usual" login session which is handled differently under the hood. Currently i'm suspecting the javascript frontend function here which decides which endpoint to use for the current page, depending on whether it is a usual login session, a direcory share or a single file share (the latter two should only be used when accessing a share as an external user via share link).

So the error seems to be that this function detects a directory share even though you're logged in and you do not have a share token on the current page. Since i cannot reproduce the issue on my NC21 instance i'd add some additional frontend logging and would kindly ask you, @sylikc and @kadrim , to patch again and share the browser logs?

of course, will do as soon as you release the more verbose logging, i will apply it.

still struggling to reproduce the issue at all, and had no time yet to implement the iops limiter (will be doing that this weekend!)

Browser logs? Like from inspecting? Need some quick tutorial on how lol

R0Wi commented

Thanks guys. @sylikc that's no problem, i'll inform you as soon as the new patch is available and help you to access the necessary logs ๐Ÿ‘

R0Wi commented

I provided some additional logging output. Please try to patch again (see #72 (comment)) or use the artifact from https://github.com/nextcloud/files_photospheres/suites/2680011030/artifacts/59083216 .

For getting the browser logs please open the devtools via ctrl + shift + I (or right click -> inspect). Then change to the network tab on the top and make sure the Disable cache checkbox is checked.
image

Then reload the page. Filter your console output to just show Info. You should be able to see log outputs like the ones shown below:
image

Please try to reproduce the error and share your browser logs if possible. Please let me know if you need further assistance.

Hi. I have a fresh install of NextcloudVM. It's Nextcloud 21.0.1. I have had the same error with xmp-data. If I create a public link it worked with no issue. When logged in as the Nextcloud admin I would see the error.

If I cleared my browser cache and then used the Nextcloud App manager inside a browser, removed photosphere app, purged, and then reinstalled it would work normally UNTIL....I deleted a 360 photo. Error appears again. I cleared browser cache, restarted browser, restarted Nextcloud server and still the error persisited. If I created a shared public link it worked fine but logged in to my Nextcloud the error persisted.

I installed the patch, cleared the browser cache, rebooted my nextcloud server, logged in to my nextcloud, viewed 360 photos fine, deleted a photo, still could view fine, added a photo, viewed fine, deleted again, viewed fine. Since the patch was installed I haven't been able to recreate the error. Thanks!

The patch from #73 worked for me. Left a post over there, too.

I'm not exactly sure what's going on, but I went and did an inspect, and then did a disable cache... then it the XMP error happened twice....

then I refreshed a few times and I can no longer get it to trigger again (I had ran patched artifact, then even tried reverting it to the last patch)

It's pretty slow to load without cache though.

I can no longer get things to trigger the xmp error with the artifact attached in #72 (comment)

I think I saved this when there was an error... but doesn't look particularly interesting

jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 3.3.2
fileAction.js:431 isSharedViewer: false
fileAction.js:432 isDirectoryShare: false
fileAction.js:433 sharingToken:  undefined
fileAction.js:437 Init regular user view
session-heartbeat.js:97 session heartbeat polling started
VM9607 three.min.js:174 THREE.WebGLRenderer 93

got the same error message with ### NC 21.0.1 - but i saw different outputs on different browsers:

  • MS Edge - working fine (no errors at all on the same content !)
  • FireFox got the "An error occurred trying to read xmp-data" messages, too .. but only the first time
    (when you forward/backward your pics, then the 2nd time .. no errors will be shown anymore).

short Output from FireFox:

jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21.
In later versions of Nextcloud it might be removed completely. Please ship your own. 4 globals.js:60:15
$ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21.
In later versions of Nextcloud it might be removed completely. Please ship your own. 13 globals.js:60:15
jQuery is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21.
In later versions of Nextcloud it might be removed completely. Please ship your own. 4 globals.js:60:15
XHRGEThttps://www.www.xxx.xxx/apps/files_photospheres/sharefiles/xmpdata/undefined?filename=IMG_5117.JPG&path=/
[HTTP/2 200 OK 286ms]

OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment 10 util.js:133:11
$ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21.
In later versions of Nextcloud it might be removed completely. Please ship your own. 77 globals.js:60:15
Opening viewer for file /Documents/path/path/path/IMG_5117.JPG Viewer.vue:248
XHRPROPFINDhttps://www.www.xxx.xxx/remote.php/dav/files/Name/Documents/path/path/path/IMG_5117.JPG
[HTTP/2 207 Multi-Status 173ms]

XHRPROPFINDhttps://www.www.xxx.xxx/remote.php/dav/files/Name/Documents/path/path/path/

i'm on Windows 10, all the Browers + Windows are on the newest versions.

R0Wi commented

@Githopp192 did you try to patch like stated #72 (comment) ?

R0Wi commented

Should be fixed with files_photospheres v1.21.1. Thank you all for participating! Please feel free to reopen this issue if the problem is still present.

lftsy commented

Official app files_photospheres 1.21.1 reinstalled from app store and I am not able to reproduce the problem anymore / yet
Thank you very much for the fix !

Best Regards

yes, seems to be fixed. Thx for fixing.