Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Strict errors breaking DAV Sync #1848

Closed
ssj4maiko opened this issue Oct 26, 2022 · 1 comment
Closed

PHP Strict errors breaking DAV Sync #1848

ssj4maiko opened this issue Oct 26, 2022 · 1 comment

Comments

@ssj4maiko
Copy link

ssj4maiko commented Oct 26, 2022

Yesterday I upgraded from 24 to 25 by pulling the latest image, then recreating the container, and of course, there were a bunch of changes and so on.

After updating, I did have some issues, but I have mostly dealt with them, however, File Sync has been showing me errors, although I can access the files.

Checking the logs I found out that PHP8.1 strict warnings seem to be interfering with the functions. From what I noticed, only the upload/sync functionality has this problem, I still have access to the files through Nextcloud Sync, it just doesn't update the source.:

{
  "reqId": "F0a8VHXSF9BqL6hrP8dA",
  "level": 3,
  "time": "2022-10-26T17:16:32+00:00",
  "remoteAddr": "172.22.0.13",
  "user": "ssj4maiko",
  "app": "webdav",
  "method": "PROPFIND",
  "url": "/remote.php/dav/files/ssj4maiko/",
  "message": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin::OCA\\DAV\\Connector\\Sabre\\{closure}(): Return value must be of type ?int, float returned",
  "userAgent": "Mozilla/5.0 (Macintosh) mirall/3.6.1git (build 11939) (Nextcloud, osx-21.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)",
  "version": "25.0.0.18",
  "exception": {
    "Exception": "TypeError",
    "Message": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin::OCA\\DAV\\Connector\\Sabre\\{closure}(): Return value must be of type ?int, float returned",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/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": "/var/www/html/apps/dav/lib/Connector/Sabre/FilesPlugin.php",
        "line": 356,
        "function": "handle",
        "class": "Sabre\\DAV\\PropFind",
        "type": "->",
        "args": [
          "{http://owncloud.org/ns}size",
          {
            "__class__": "Closure"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "handleGetProperties",
        "class": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\DAV\\Files\\FilesHome"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1052,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "propFind",
          [
            {
              "__class__": "Sabre\\DAV\\PropFind"
            },
            {
              "__class__": "OCA\\DAV\\Files\\FilesHome"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 984,
        "function": "getPropertiesByNode",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\DAV\\PropFind"
          },
          {
            "__class__": "OCA\\DAV\\Files\\FilesHome"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1662,
        "function": "getPropertiesIteratorForPath",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "files/ssj4maiko",
          [
            "{DAV:}resourcetype",
            "{DAV:}getlastmodified",
            "{DAV:}getcontentlength",
            "{DAV:}getetag",
            "{http://owncloud.org/ns}size",
            "{http://owncloud.org/ns}id",
            "{http://owncloud.org/ns}fileid",
            "{http://owncloud.org/ns}downloadURL",
            "{http://owncloud.org/ns}dDC",
            "{http://owncloud.org/ns}permissions",
            "{http://owncloud.org/ns}checksums",
            "{http://owncloud.org/ns}data-fingerprint",
            "{http://owncloud.org/ns}share-types"
          ],
          1
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1647,
        "function": "writeMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\Xml\\Writer",
            "elementMap": [],
            "contextUri": "/remote.php/dav/",
            "namespaceMap": {
              "DAV:": "d",
              "http://sabredav.org/ns": "s",
              "http://owncloud.org/ns": "oc",
              "http://nextcloud.org/ns": "nc"
            },
            "classMap": []
          },
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 346,
        "function": "generateMultiStatus",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Generator"
          },
          false
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpPropFind",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:PROPFIND",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 360,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 167,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/apps/dav/lib/Connector/Sabre/FilesPlugin.php",
    "Line": 355,
    "message": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin::OCA\\DAV\\Connector\\Sabre\\{closure}(): Return value must be of type ?int, float returned",
    "exception": {},
    "CustomMessage": "OCA\\DAV\\Connector\\Sabre\\FilesPlugin::OCA\\DAV\\Connector\\Sabre\\{closure}(): Return value must be of type ?int, float returned"
  }
}
@ssj4maiko
Copy link
Author

ssj4maiko commented Oct 26, 2022

While looking further, I found out this is a duplicate of nextcloud/server#34674

It's seemingly related to a problem with PHP 32bits

If you somehow found this issue, a temporary solution is here:
https://help.nextcloud.com/t/cannot-access-files-after-upgrade-to-nextcloud-25/147823/6

And it's quite easy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants