Hunting down issues in NC29RC1

I try to track down a few issues I have after upgrading my test instance to NC29RC1. This is a test instance, I had a few shares to other NC instances, over the time I tried many apps, so the database and everything might be a bit messed up, but if NC can make it work there, it can work anywhere…

I put everything together, it might be related …

{"reqId":"t19BgX6AkKSzlDOgmMKo","level":3,"time":"2024-04-01T23:17:34+00:00","remoteAddr":"2a02:8071::","user":"user1","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/user1/","message":"Undefined array key 1 at /usr/local/www/nextcloud-test/apps/files_sharing/lib/External/Cache.php#41","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0","version":"29.0.0.14","data":{"app":"PHP"}}
{"reqId":"eI1oSLMlJ3beHUsNvft4","level":1,"time":"2024-04-01T23:17:58+00:00","remoteAddr":"2a02:8071::","user":"user1","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Notification was not parsed by any notifier [app: survey_client, subject: updated]","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0","version":"29.0.0.14","data":[]}

I had more messages, that I thought might be related with expired shares or shares not working for some reason. I used the occ commands to remove orphaned shares. I few disappeared, some shares are still working. But these two messages don’t stop to pop up.

The last with the survey client is a bit strange, since the survey client is not enabled:

Enabled:
  - activity: 2.21.1
  - bookmarks: 13.1.3
  - calendar: 4.7.0-beta.4
  - checksum: 1.2.3
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0-rc.1
  - contactsinteraction: 1.10.0
  - cospend: 1.6.1
  - dashboard: 7.9.0
  - dav: 1.30.1
  - deck: 1.13.0-beta.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_accesscontrol: 1.19.0
  - files_automatedtagging: 1.19.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - flow_notifications: 1.9.0
  - forms: 4.2.0-alpha.1
  - integration_discourse: 2.0.6
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - mail: 3.6.0-beta.3
  - nextcloud_announcements: 1.18.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - polls: 7.0.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - radio: 1.0.3
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - systemtags: 1.19.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflow_script: 1.14.0
  - workflowengine: 2.11.0

For the moment, I don’t see any problems going through the web interface. However, before starting to look at apps and stuff, I’d like to check on the existing errors/warnings and try to get rid of them first.

I’ll try to dig deeper…

The first exception seems to come indeed from a federated share. It points to server/apps/files_sharing/lib/External/Cache.php at 93065b22c409f8ce980bae22c60ffd06f9326806 · nextcloud/server · GitHub which makes me wonder if there’s anything wrongly stored in the database. Can you check what you have in oc_share_external? (I think it’s there).

The second one comes from a notification that was generated from a background job in the survey_client: https://github.com/nextcloud/survey_client/blob/e85475734001ae136867f5db2286f24c4b012d3b/lib/BackgroundJobs/AdminNotification.php#L48-L52 Since the app is disabled, the notification can’t be parsed anymore, that’s what this message is about (the warning about this is new). You might want to check if there are notifications in oc_notifications from the survey app.

1 Like

Actually the first one is a regression, it’s fixed in https://github.com/nextcloud/server/pull/44625

Indeed there was an old notification, I activated the app, waited for the cronjob to deliver the notification and deleted it.

I manually cleaned a few shares I didn’t need any more. There is now just 1 left. Problem the federated share is on the same host (they use the same webserver, but different subdomains). If I call the ocm-provider with curl

{
   "enabled":true,
   "apiVersion":"1.0-proposal1",
   "endPoint":"https:\/\/host1.example.com\/ocm",
   "resourceTypes":[
      {
         "name":"file",
         "shareTypes":[
            "user",
            "group"
         ],
         "protocols":{
            "webdav":"\/public.php\/webdav\/"
         }
      }
   ]
}

Cool, ok I applied this patch manually (download the .patch file and applied it). However there are still messages:

{
   "reqId":"3ObC0Zxbe4vdbHFuVnz4",
   "level":2,
   "time":"2024-04-03T08:28:21+00:00",
   "remoteAddr":"1.2.3.4",
   "user":"user1",
   "app":"no app in context",
   "method":"PROPFIND",
   "url":"/remote.php/dav/files/user1/",
   "message":"error while discovering ocm provider",
   "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0",
   "version":"29.0.0.14",
   "exception":{
      "Exception":"OCP\\Http\\Client\\LocalServerException",
      "Message":"Could not detect any host",
      "Code":0,
      "Trace":[
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Http/Client/Client.php",
            "line":229,
            "function":"preventLocalAddress",
            "class":"OC\\Http\\Client\\Client",
            "type":"->",
            "args":[
               "host1.example.com/ocm-provider/",
               [
                  10,
                  true,
                  10
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/OCM/OCMDiscoveryService.php",
            "line":86,
            "function":"get",
            "class":"OC\\Http\\Client\\Client",
            "type":"->",
            "args":[
               "host1.example.com/ocm-provider/",
               [
                  10,
                  true,
                  10
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/files_sharing/lib/External/Storage.php",
            "line":87,
            "function":"discover",
            "class":"OC\\OCM\\OCMDiscoveryService",
            "type":"->",
            "args":[
               "host1.example.com"
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Mount/MountPoint.php",
            "line":168,
            "function":"__construct",
            "class":"OCA\\Files_Sharing\\External\\Storage",
            "type":"->",
            "args":[
               [
                  "https://host1.example.com/",
                  "ff08RaxNEHDAgrM",
                  "",
                  "/user1/files/key-db (2).kdbx",
                  "user1",
                  "And 5 more entries, set log level to debug to see all entries"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Mount/MountPoint.php",
            "line":193,
            "function":"createStorage",
            "class":"OC\\Files\\Mount\\MountPoint",
            "type":"->",
            "args":[
               "*** sensitive parameters replaced ***"
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Mount/MountPoint.php",
            "line":294,
            "function":"getStorage",
            "class":"OC\\Files\\Mount\\MountPoint",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Config/UserMountCache.php",
            "line":90,
            "function":"getStorageRootId",
            "class":"OC\\Files\\Mount\\MountPoint",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/SetupManager.php",
            "line":299,
            "function":"registerMounts",
            "class":"OC\\Files\\Config\\UserMountCache",
            "type":"->",
            "args":[
               [
                  "OC\\User\\User"
               ],
               [
                  [
                     "OCA\\Files_External\\Config\\SystemMountPoint"
                  ],
                  [
                     "OCA\\Files_Sharing\\External\\Mount"
                  ]
               ],
               [
                  "OC\\Files\\Mount\\CacheMountProvider",
                  "OCA\\Files_External\\Config\\ConfigAdapter",
                  "OCA\\Files_Sharing\\MountProvider",
                  "OCA\\Files_Sharing\\External\\MountProvider"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/SetupManager.php",
            "line":223,
            "function":"afterUserFullySetup",
            "class":"OC\\Files\\SetupManager",
            "type":"->",
            "args":[
               [
                  "OC\\User\\User"
               ],
               [
                  "OC\\Files\\Mount\\LocalHomeMountProvider"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/SetupManager.php",
            "line":400,
            "function":"setupForUser",
            "class":"OC\\Files\\SetupManager",
            "type":"->",
            "args":[
               [
                  "OC\\User\\User"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Mount/Manager.php",
            "line":139,
            "function":"setupForPath",
            "class":"OC\\Files\\SetupManager",
            "type":"->",
            "args":[
               "/user1/files",
               true
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/View.php",
            "line":1417,
            "function":"findIn",
            "class":"OC\\Files\\Mount\\Manager",
            "type":"->",
            "args":[
               "/user1/files"
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Node/Node.php",
            "line":117,
            "function":"addSubMounts",
            "class":"OC\\Files\\View",
            "type":"->",
            "args":[
               [
                  "OC\\Files\\FileInfo"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Node/Node.php",
            "line":244,
            "function":"getFileInfo",
            "class":"OC\\Files\\Node\\Node",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "function":"getEtag",
            "class":"OC\\Files\\Node\\Node",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Node/LazyFolder.php",
            "line":84,
            "function":"call_user_func_array",
            "args":[
               [
                  [
                     "OC\\Files\\Node\\Folder"
                  ],
                  "getEtag"
               ],
               [
                  
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/lib/private/Files/Node/LazyFolder.php",
            "line":260,
            "function":"__call",
            "class":"OC\\Files\\Node\\LazyFolder",
            "type":"->",
            "args":[
               "getEtag",
               [
                  
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/dav/lib/Connector/Sabre/Node.php",
            "line":208,
            "function":"getEtag",
            "class":"OC\\Files\\Node\\LazyFolder",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/dav/lib/Connector/Sabre/FilesPlugin.php",
            "line":335,
            "function":"getETag",
            "class":"OCA\\DAV\\Connector\\Sabre\\Node",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/PropFind.php",
            "line":95,
            "function":"OCA\\DAV\\Connector\\Sabre\\{closure}",
            "class":"OCA\\DAV\\Connector\\Sabre\\FilesPlugin",
            "type":"->",
            "args":[
               "*** sensitive parameters replaced ***"
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/dav/lib/Connector/Sabre/FilesPlugin.php",
            "line":334,
            "function":"handle",
            "class":"Sabre\\DAV\\PropFind",
            "type":"->",
            "args":[
               "{DAV:}getetag",
               [
                  "Closure"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "line":89,
            "function":"handleGetProperties",
            "class":"OCA\\DAV\\Connector\\Sabre\\FilesPlugin",
            "type":"->",
            "args":[
               [
                  "Sabre\\DAV\\PropFind"
               ],
               [
                  "OCA\\DAV\\Files\\FilesHome"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":1052,
            "function":"emit",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               "propFind",
               [
                  [
                     "Sabre\\DAV\\PropFind"
                  ],
                  [
                     "OCA\\DAV\\Files\\FilesHome"
                  ]
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":984,
            "function":"getPropertiesByNode",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               [
                  "Sabre\\DAV\\PropFind"
               ],
               [
                  "OCA\\DAV\\Files\\FilesHome"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":1662,
            "function":"getPropertiesIteratorForPath",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               "files/user1",
               [
                  "{DAV:}getcontentlength",
                  "{DAV:}getcontenttype",
                  "{DAV:}getetag",
                  "{DAV:}getlastmodified",
                  "{DAV:}quota-available-bytes",
                  "And 21 more entries, set log level to debug to see all entries"
               ],
               1
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":1647,
            "function":"writeMultiStatus",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               [
                  "Sabre\\Xml\\Writer",
                  [
                     
                  ],
                  "/remote.php/dav/",
                  [
                     "d",
                     "s",
                     "oc",
                     "nc"
                  ],
                  [
                     
                  ]
               ],
               [
                  "Generator"
               ],
               false
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "line":346,
            "function":"generateMultiStatus",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               [
                  "Generator"
               ],
               false
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "line":89,
            "function":"httpPropFind",
            "class":"Sabre\\DAV\\CorePlugin",
            "type":"->",
            "args":[
               [
                  "Sabre\\HTTP\\Request"
               ],
               [
                  "Sabre\\HTTP\\Response"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":472,
            "function":"emit",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               "method:PROPFIND",
               [
                  [
                     "Sabre\\HTTP\\Request"
                  ],
                  [
                     "Sabre\\HTTP\\Response"
                  ]
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":253,
            "function":"invokeMethod",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               [
                  "Sabre\\HTTP\\Request"
               ],
               [
                  "Sabre\\HTTP\\Response"
               ]
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/3rdparty/sabre/dav/lib/DAV/Server.php",
            "line":321,
            "function":"start",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/dav/lib/Server.php",
            "line":374,
            "function":"exec",
            "class":"Sabre\\DAV\\Server",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/apps/dav/appinfo/v2/remote.php",
            "line":35,
            "function":"exec",
            "class":"OCA\\DAV\\Server",
            "type":"->",
            "args":[
               
            ]
         },
         {
            "file":"/usr/local/www/nextcloud-test/remote.php",
            "line":172,
            "args":[
               "/usr/local/www/nextcloud-test/apps/dav/appinfo/v2/remote.php"
            ],
            "function":"require_once"
         }
      ],
      "File":"/usr/local/www/nextcloud-test/lib/private/Http/Client/Client.php",
      "Line":192,
      "message":"error while discovering ocm provider",
      "exception":{
         
      },
      "remote":"host1.example.com",
      "CustomMessage":"error while discovering ocm provider"
   }
}

I’m wondering about the LocalServerException. Does it trigger a this exception because it is on the same machine? The two setups have different subdomains but share the same ip addresses (using different vhosts in nginx). Not sure if that is a special case. I didn’t try to setup on a different host. I remember I tried to look into this in the past, so it is nothing new.

You might want to try to enable local remote servers: Configuration Parameters — Nextcloud latest Administration Manual latest documentation

1 Like

Thanks, I didn’t notice that this option was added. Now all these errors are gone. Thanks a lot.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.