Skip to content

[Bug]: basicOperation(): Argument #2 ($path) must be of type string, null given #40090

Closed
nextcloud/groupfolders
#3538

Description

@simonspa

⚠️ This issue respects the following points: ⚠️

Bug description

Yesterday, the below stack trace appeared several hundred times in my Nextcloud 27.0.2 log. From the trace I infer that user BBBB shared an ODS file with user AAAA and the latter is trying to open it (or save it? The user agent is "COOLWSD".)

Whatever is happening, in the end a method requests a string but obtains null.

Steps to reproduce

(log entries)

Expected behavior

The requested operation succeeds.

Installation method

Community Manual installation with Archive

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my.domain.tld"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "data-fingerprint": "58897020af7835d5d5eebe9f70033c28",
        "dbtype": "mysql",
        "version": "27.0.2.1",
        "overwrite.cli.url": "https:\/\/my.domain.tld",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "3306",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "mail_smtpsecure": "ssl",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "log_rotate_size": "104857600",
        "mail_smtpauthtype": "LOGIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "timeout": 0
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false,
        "preview_max_y": 2048,
        "preview_max_x": 2048,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "mail_smtpauth": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "knowledgebaseenabled": false,
        "loglevel": 2,
        "filelocking.enabled": "true",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "activity_expire_days": 90,
        "mail_smtpmode": "smtp",
        "theme": "",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "files_downloadactivity"
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - bookmarks: 13.1.1
  - bruteforcesettings: 2.7.0
  - calendar: 4.4.4
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.3.2
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - event_update_notification: 2.2.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_downloadactivity: 1.16.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - metadata: 0.19.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - notify_push: 0.6.3
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - passwords: 2023.8.31
  - photos: 2.3.0
  - previewgenerator: 5.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - quota_warning: 1.17.0
  - richdocuments: 8.1.1
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - spreed: 17.0.3
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - theming_customcss: 1.14.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0
  - twofactor_webauthn: 1.2.0
  - updatenotification: 1.17.0
  - user_migration: 4.0.1
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - circles: 27.0.1 (installed 25.0.0)
  - encryption: 2.15.0
  - files_external: 1.19.0 (installed 1.10.0)
  - firstrunwizard: 2.16.0 (installed 2.9.0)
  - nextcloud_announcements: 1.16.0 (installed 1.5.0)
  - recommendations: 1.6.0 (installed 0.4.0)
  - related_resources: 1.2.0 (installed 1.0.3)
  - support: 1.10.0 (installed 1.0.0)
  - survey_client: 1.15.0 (installed 0.1.5)
  - systemtags: 1.17.0 (installed 1.15.0)
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
    "reqId": "PoA62VVnraMBqx6nXJ1e",
    "level": 3,
    "time": "2023-08-28T22:49:24+02:00",
    "remoteAddr": "2a03:4000:2:bc5::1",
    "user": "AAAA",
    "app": "index",
    "method": "POST",
    "url": "/index.php/apps/richdocuments/wopi/files/5040041_oc0e7rzi20xo/contents?access_token=MCqDcyRRHu2FoEazjmUCoxqKnLEVgh4G&access_token_ttl=1693289762000",
    "message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 518 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1110",
    "userAgent": "COOLWSD HTTP Agent 23.05.2.2",
    "version": "27.0.2.1",
    "exception":
    {
        "Exception": "Exception",
        "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 518 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1110",
        "Code": 0,
        "Trace":
        [
            {
                "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
                "line": 183,
                "function": "dispatch",
                "class": "OC\\AppFramework\\Http\\Dispatcher",
                "type": "->",
                "args":
                [
                    [
                        "OCA\\Richdocuments\\Controller\\WopiController"
                    ],
                    "putFile"
                ]
            },
            {
                "file": "/var/www/nextcloud/lib/private/Route/Router.php",
                "line": 315,
                "function": "main",
                "class": "OC\\AppFramework\\App",
                "type": "::",
                "args":
                [
                    "OCA\\Richdocuments\\Controller\\WopiController",
                    "putFile",
                    [
                        "OC\\AppFramework\\DependencyInjection\\DIContainer"
                    ],
                    [
                        "5040041_oc0e7rzi20xo",
                        "richdocuments.wopi.putFile"
                    ]
                ]
            },
            {
                "file": "/var/www/nextcloud/lib/base.php",
                "line": 1071,
                "function": "match",
                "class": "OC\\Route\\Router",
                "type": "->",
                "args":
                [
                    "/apps/richdocuments/wopi/files/5040041_oc0e7rzi20xo/contents"
                ]
            },
            {
                "file": "/var/www/nextcloud/index.php",
                "line": 36,
                "function": "handleRequest",
                "class": "OC",
                "type": "::",
                "args":
                []
            }
        ],
        "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "Line": 169,
        "Previous":
        {
            "Exception": "TypeError",
            "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 518",
            "Code": 0,
            "Trace":
            [
                {
                    "file": "/var/www/nextcloud/lib/private/Files/View.php",
                    "line": 518,
                    "function": "basicOperation",
                    "class": "OC\\Files\\View",
                    "type": "->",
                    "args":
                    [
                        "file_exists",
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/Filesystem.php",
                    "line": 545,
                    "function": "file_exists",
                    "class": "OC\\Files\\View",
                    "type": "->",
                    "args":
                    [
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/files_versions/lib/Storage.php",
                    "line": 189,
                    "function": "file_exists",
                    "class": "OC\\Files\\Filesystem",
                    "type": "::",
                    "args":
                    [
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
                    "line": 210,
                    "function": "store",
                    "class": "OCA\\Files_Versions\\Storage",
                    "type": "::",
                    "args":
                    [
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
                    "line": 107,
                    "function": "write_hook",
                    "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
                    "type": "->",
                    "args":
                    [
                        [
                            "OC\\Files\\Node\\File"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
                    "line": 86,
                    "function": "handle",
                    "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                    "line": 251,
                    "function": "__invoke",
                    "class": "OC\\EventDispatcher\\ServiceEventListener",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ],
                        "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
                        [
                            "Symfony\\Component\\EventDispatcher\\EventDispatcher"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                    "line": 73,
                    "function": "callListeners",
                    "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                    "type": "->",
                    "args":
                    [
                        [
                            [
                                "Closure"
                            ]
                        ],
                        "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
                    "line": 94,
                    "function": "dispatch",
                    "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ],
                        "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
                    "line": 106,
                    "function": "dispatch",
                    "class": "OC\\EventDispatcher\\EventDispatcher",
                    "type": "->",
                    "args":
                    [
                        "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
                    "line": 112,
                    "function": "dispatchTyped",
                    "class": "OC\\EventDispatcher\\EventDispatcher",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
                    "line": 105,
                    "function": "write",
                    "class": "OC\\Files\\Node\\HookConnector",
                    "type": "->",
                    "args":
                    [
                        [
                            "/Documents/SomeDocuments.ods",
                            true
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/View.php",
                    "line": 588,
                    "function": "emit",
                    "class": "OC_Hook",
                    "type": "::",
                    "args":
                    [
                        "OC_Filesystem",
                        "write",
                        [
                            "/Documents/SomeDocument.ods",
                            true
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/View.php",
                    "line": 629,
                    "function": "emit_file_hooks_pre",
                    "class": "OC\\Files\\View",
                    "type": "->",
                    "args":
                    [
                        true,
                        "/BBBB/files/Documents/SomeDocument.ods",
                        true
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/Node/File.php",
                    "line": 73,
                    "function": "file_put_contents",
                    "class": "OC\\Files\\View",
                    "type": "->",
                    "args":
                    [
                        "/BBBB/files/Documents/SomeDocument.ods",
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                    "line": 504,
                    "function": "putContent",
                    "class": "OC\\Files\\Node\\File",
                    "type": "->",
                    "args":
                    [
                        null
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                    "line": 786,
                    "function": "OCA\\Richdocuments\\Controller\\{closure}",
                    "class": "OCA\\Richdocuments\\Controller\\WopiController",
                    "type": "->",
                    "args":
                    [
                        "*** sensitive parameters replaced ***"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                    "line": 763,
                    "function": "retryOperation",
                    "class": "OCA\\Richdocuments\\Controller\\WopiController",
                    "type": "->",
                    "args":
                    [
                        [
                            "Closure"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Files/Lock/LockManager.php",
                    "line": 29,
                    "function": "OCA\\Richdocuments\\Controller\\{closure}",
                    "class": "OCA\\Richdocuments\\Controller\\WopiController",
                    "type": "->",
                    "args":
                    [
                        "*** sensitive parameters replaced ***"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                    "line": 766,
                    "function": "runInScope",
                    "class": "OC\\Files\\Lock\\LockManager",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCP\\Files\\Lock\\LockContext"
                        ],
                        [
                            "Closure"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                    "line": 505,
                    "function": "wrappedFilesystemOperation",
                    "class": "OCA\\Richdocuments\\Controller\\WopiController",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCA\\Richdocuments\\Db\\Wopi",
                            308
                        ],
                        [
                            "Closure"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 230,
                    "function": "putFile",
                    "class": "OCA\\Richdocuments\\Controller\\WopiController",
                    "type": "->",
                    "args":
                    [
                        "5040041",
                        "MCqDcyRRHu2FoEazjmUCoxqKnLEVgh4G"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                    "line": 137,
                    "function": "executeController",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCA\\Richdocuments\\Controller\\WopiController"
                        ],
                        "putFile"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
                    "line": 183,
                    "function": "dispatch",
                    "class": "OC\\AppFramework\\Http\\Dispatcher",
                    "type": "->",
                    "args":
                    [
                        [
                            "OCA\\Richdocuments\\Controller\\WopiController"
                        ],
                        "putFile"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/private/Route/Router.php",
                    "line": 315,
                    "function": "main",
                    "class": "OC\\AppFramework\\App",
                    "type": "::",
                    "args":
                    [
                        "OCA\\Richdocuments\\Controller\\WopiController",
                        "putFile",
                        [
                            "OC\\AppFramework\\DependencyInjection\\DIContainer"
                        ],
                        [
                            "5040041_oc0e7rzi20xo",
                            "richdocuments.wopi.putFile"
                        ]
                    ]
                },
                {
                    "file": "/var/www/nextcloud/lib/base.php",
                    "line": 1071,
                    "function": "match",
                    "class": "OC\\Route\\Router",
                    "type": "->",
                    "args":
                    [
                        "/apps/richdocuments/wopi/files/5040041_oc0e7rzi20xo/contents"
                    ]
                },
                {
                    "file": "/var/www/nextcloud/index.php",
                    "line": 36,
                    "function": "handleRequest",
                    "class": "OC",
                    "type": "::",
                    "args":
                    []
                }
            ],
            "File": "/var/www/nextcloud/lib/private/Files/View.php",
            "Line": 1110
        },
        "CustomMessage": "--"
    },
    "id": "64ed996b3fa81"
}

Additional info

No response

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Aug 29, 2023
  2. bjo81 commented on Sep 4, 2023

    @bjo81

    @simonspa Do you also expierence the issue that COOL is unable to save the document then? In our case a user creates a file in COOL, but when he want's to save it, the issue appears.

  3. simonspa commented on Sep 5, 2023

    @simonspa
    ContributorAuthor

    That's a good question @bjo81 that I unfortunately cannot really answer. This only happened in other user sessions so far and I have only observed the above message in the log. I don't know how the UX is in that moment. I will try to inquire with them but since it's been a few days they might not remember.

  4. SystemKeeper commented on Sep 10, 2023

    @SystemKeeper
    Contributor

    I've seen this as well and thought it was an issue in the richdocuments app at first (see nextcloud/richdocuments#3169), but it looks like it's something with the files_version app.

    In my case the file in question was shared from a groupfolder, but looking at the enabled apps above, groupfolders are not enabled on your installation, is that correct? So in that case, I can remove groupfolders as the responsible app in my thinking.

    The error does appear when the user tries to save a (shared with him) document. Sometimes a message pops up saying something about missing permissions and unable to save. The changes are then lost.

    I've seen this on 27.0.2 and also on 27.1 RC2.

    Also CC @artonge

  5. simonspa commented on Sep 10, 2023

    @simonspa
    ContributorAuthor

    I can definitely confirm that I do not have the group folders app enabled.

  6. SystemKeeper commented on Sep 11, 2023

    @SystemKeeper
    Contributor

    I am wondering if the try-catch is enough here:

    try {
    return $this->rootFolder
    ->getUserFolder(\OC_User::getUser())
    ->getRelativePath($node->getPath());
    } catch (\Throwable $ex) {
    return $this->rootFolder
    ->getUserFolder($node->getOwner()->getUid())
    ->getRelativePath($node->getPath());
    }

    if I understand correctly, this calls getRelativePath from OC\Files\Utils\PathHelper (?) but this can return null instead of throwing an exception?

    if ($path === $root) {
    return '/';
    } elseif (!str_starts_with($path, $root . '/')) {
    return null;
    } else {
    $path = substr($path, strlen($root));
    return self::normalizePath($path);
    }

    But that's just blind guessing on my end since I am not familiar with the code. On my testinstance I have disabled files_versions app for now and it seems to work fine now... Let's see.

  7. AIlkiv commented on Oct 2, 2023

    @AIlkiv
    Contributor

    @artonge Hi. Can you please take a look?

    There is a method OCA\Files_Versions\Listener\FileEventsListener::getPathForNode, and it appears that you have created it (commit: 3da63f4).

    I have studied the operation of this method, and I believe it would make sense to remove the exception handling from it.

    Why?

    Example 1

    Alice has the file Alice\files\study\homework.odt (file in folder).
    She shared this file with Bob.
    Bob is editing this file.
    When saved, $node->getPath() in the getPathForNode method will have the value "Bob\files\homework.odt".
    If it was not possible to connect to the Bob folder.
    Will try to get RelativePath from Bob\files\homework.odt relative to Alice\files and it will return null
    As a result, we will get the error that the author of this issue complains about.

    Example 2

    I thought it would make sense to rewrite the exception handling:

    $ownerFolder = $this->rootFolder->getUserFolder($node->getOwner()->getUid());
    $ownerNode = $ownerFolder->getById($node->getId());
    
    return $ownerFolder->getRelativePath($ownerNode ->getPath());
    

    \study\homework.odt will then be returned

    And then in the OCA\Files_Versions\Store::store method there is a Filesystem::file_exists($filename) check against Bob (he has \homework.odt, not \study\homework.odt). As a result, Store::store will not work correctly.

    Based on these two cases, I have the impression that the system will work more smoothly without handling this exception.

    } catch (\Throwable $ex) {
        return $this->rootFolder
            ->getUserFolder($node->getOwner()->getUid())
            ->getRelativePath($node->getPath());
    }
    

    But I have relatively recently started studying Nextcloud, so I would be very grateful if you could evaluate the correctness of these conclusions.

  8. jolly-jump commented on Oct 5, 2023

    @jolly-jump

    Hi @AIlkiv
    I do barely understand, what you are doing. But I was desperately in need of a solution and used your rewrite: it works for me (!).
    You don't need the second line, though? $ownerNode will not be used in the following lines.
    Cheers,
    Tobias

  9. jolly-jump commented on Oct 5, 2023

    @jolly-jump

    I've seen this on 27.0.2 and also on 27.1 RC2.

    Also CC @artonge

    Beside myself having the problem: see here I found another user from long time/version ago: https://help.nextcloud.com/t/collabora-on-mobile-cant-save-edited-documents-in-shared-folders/69272/2
    Even if the bug is not that old, is there a chance to get this fixed without having to disable files_versions ?

  10. AIlkiv commented on Oct 6, 2023

    @AIlkiv
    Contributor

    I do barely understand, what you are doing. But I was desperately in need of a solution and used your rewrite: it works for me (!).
    You don't need the second line, though? $ownerNode will not be used in the following lines.

    This is not a solution. It should not be used.

    There was a mistake, I corrected the comment return $ownerFolder->getRelativePath($ownerNode->getPath());.

  11. jolly-jump commented on Oct 6, 2023

    @jolly-jump

    Hi @AIlkiv ,
    thanks for the correction.
    However, I tried a couple of things and the main problem is indeed that getRelativePath() is empty - iff the path of the node does not fit to the current user.

    So, from where my problem comes: $node->getPath() is already Alice\files\study\homework.odt . This seems to be a problem steming from the richdocuments-App.... the same thing in the browser, and $node->getPath() is Bob\...

    And one more thing: your proposal does not work, since $ownerFolder->getById($node->getId()) returns an array of possible Nodes/Folders. One would have to adjust this atleast.

    I have used this workaround now:

            private function getPathForNode(Node $node): ?string {
                    $ownerFolder = $this->rootFolder->getUserFolder($node->getOwner()->getUid());
                    try {   
                            $relativepath = $this->rootFolder
                                    ->getUserFolder(\OC_User::getUser())
                                    ->getRelativePath($node->getPath());
                            if ($relativepath === null) {
                                    $this->logger->error('Relative Path null of Node Path: ' . $node->getPath() . '; User: ' . \OC_User::getUser());
                                    $relativepath = $ownerFolder->getRelativePath($node->getPath());
                            }
                    } catch (\Throwable $ex) {
                            $relativepath = $ownerFolder->getRelativePath($node->getPath());
                    }
                    return $relativepath;
            }
    
  12. AIlkiv commented on Oct 6, 2023

    @AIlkiv
    Contributor

    @jolly-jump In which case path may not be from the current user?

    I checked the following situations:

    1. when editing its own file.
    2. when editing a shared file.

    In both cases, I had the correct path.

  13. 35 remaining items

  14. ClundXIII commented on Apr 28, 2024

    @ClundXIII

    And then to trigger the error again, and to post the generated logs here.

    We have the same issue, latest version of Collabora (coolwsd 24.04.1.4) and Nextcloud v28.0.5:

    Failed to find relative path for file for /<user name 1>/files/<group folder>/<file path inside group folder>.docx and owner <user name 2>

    user name 1: the user who I presume created the document
    user name 2: myself when I try to edit the file

  15. SystemKeeper commented on May 5, 2024

    @SystemKeeper
    Contributor

    I am also seeing the exception again. Here is the log as requested:

    {
        "reqId": "dzYhDuN388vLllOuTTuc",
        "level": 3,
        "time": "2024-05-05T15:19:33+02:00",
        "remoteAddr": "172.30.150.2",
        "user": "test",
        "app": "files_versions",
        "method": "POST",
        "url": "/index.php/apps/richdocuments/wopi/files/..../contents?access_token=....&access_token_ttl=0",
        "message": "Failed to find relative path for file for /marcel.mueller/files/<Folder>/<Subfolder>/2024.xlsx and owner test",
        "userAgent": "COOLWSD HTTP Agent 24.04.1.4",
        "version": "29.0.0.19",
        "data": {
            "app": "files_versions"
        }
    }
    

    Notes:

    • <Folder> is a groupfolder
    • User marcel.mueller shared the folder <Subfolder> with user test
    • User test tries to edit the file via the iOS files app

    When I add an additional log to the beginning of the getPathForNode function and try the same via the Web (so not iOS), like this:

    $this->logger->error('Trying to find relative path for file for ' . $node->getPath() . ' and owner ' . $node->getOwner()->getUID());
    

    I get:

    Trying to find relative path for file for /test/files/<Subfolder>/2024.xlsx and owner marcel.mueller
    

    and a version is created (so user and owner are swapped).

    What works for me is to still try to get the owner based on the path:

    diff --git a/apps/files_versions/lib/Listener/FileEventsListener.php b/apps/files_versions/lib/Listener/FileEventsListener.php
    index 3273f1f9c40..b3254b0e424 100644
    --- a/apps/files_versions/lib/Listener/FileEventsListener.php
    +++ b/apps/files_versions/lib/Listener/FileEventsListener.php
    @@ -403,6 +403,22 @@ class FileEventsListener implements IEventListener {
                            }
                    }
     
    +               // Try to get the owner of the file based on the path as a fallback
    +               $parts = explode('/', $node->getPath(), 4);
    +               if (count($parts) === 4) {
    +                       $owner = $parts[1];
    +
    +                       $path = $this->rootFolder
    +                               ->getUserFolder($owner)
    +                               ->getRelativePath($node->getPath());
    +
    +                       if ($path !== null) {
    +                               return $path;
    +                       }
    +               }
    +

    What I still don't get, why is the user/owner swapped when editing the file on the iOS app in the first place?

  16. SystemKeeper commented on May 5, 2024

    @SystemKeeper
    Contributor

    What I still don't get, why is the user/owner swapped when editing the file on the iOS app in the first place?

    Judging from #44294 (comment) that seems expected.

    Also nextcloud/richdocuments#3558 recently changed the user when editing, which could also make a difference here I guess.

    @juliushaertl Maybe there’s a better way to get the path in this scenario with Collabora ?

  17. juliusknorr commented on May 8, 2024

    @juliusknorr
    Member

    I worked on a better approach for storages that do not have a dedicated owner with #44294 nextcloud/groupfolders#2872 That way we would no longer need to get the path but could just use the storage provided user id

  18. SystemKeeper commented on Aug 26, 2024

    @SystemKeeper
    Contributor

    @juliushaertl I upgraded to 30 RC, both PRs are included, still I am unable to edit shared richdocuments files. The only way to make it work is to apply the patch I posted at #40090 (comment).

    Is there still something missing or should it work?

    Here's the log:

    {
      "Exception": "Exception",
      "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
          "line": 161,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Route/Router.php",
          "line": 309,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "/var/www/nextcloud/lib/base.php",
          "line": 996,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/index.php",
          "line": 24,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
      "Line": 146,
      "Previous": {
        "Exception": "TypeError",
        "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492",
        "Code": 0,
        "Trace": [
          {
            "file": "/var/www/nextcloud/lib/private/Files/View.php",
            "line": 492,
            "function": "basicOperation",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/Filesystem.php",
            "line": 516,
            "function": "file_exists",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/apps/files_versions/lib/Storage.php",
            "line": 158,
            "function": "file_exists",
            "class": "OC\\Files\\Filesystem",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
            "line": 174,
            "function": "store",
            "class": "OCA\\Files_Versions\\Storage",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
            "line": 80,
            "function": "write_hook",
            "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
            "line": 68,
            "function": "handle",
            "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
            "line": 230,
            "function": "__invoke",
            "class": "OC\\EventDispatcher\\ServiceEventListener",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
            "line": 59,
            "function": "callListeners",
            "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
            "line": 67,
            "function": "dispatch",
            "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
            "line": 79,
            "function": "dispatch",
            "class": "OC\\EventDispatcher\\EventDispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
            "line": 74,
            "function": "dispatchTyped",
            "class": "OC\\EventDispatcher\\EventDispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
            "line": 82,
            "function": "write",
            "class": "OC\\Files\\Node\\HookConnector",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/View.php",
            "line": 560,
            "function": "emit",
            "class": "OC_Hook",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/View.php",
            "line": 603,
            "function": "emit_file_hooks_pre",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/Node/File.php",
            "line": 52,
            "function": "file_put_contents",
            "class": "OC\\Files\\View",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
            "line": 467,
            "function": "putContent",
            "class": "OC\\Files\\Node\\File",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
            "line": 756,
            "function": "OCA\\Richdocuments\\Controller\\{closure}",
            "class": "OCA\\Richdocuments\\Controller\\WopiController",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
            "line": 733,
            "function": "retryOperation",
            "class": "OCA\\Richdocuments\\Controller\\WopiController",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Files/Lock/LockManager.php",
            "line": 68,
            "function": "OCA\\Richdocuments\\Controller\\{closure}",
            "class": "OCA\\Richdocuments\\Controller\\WopiController",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
            "line": 736,
            "function": "runInScope",
            "class": "OC\\Files\\Lock\\LockManager",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
            "line": 466,
            "function": "wrappedFilesystemOperation",
            "class": "OCA\\Richdocuments\\Controller\\WopiController",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 208,
            "function": "putFile",
            "class": "OCA\\Richdocuments\\Controller\\WopiController",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 114,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
            "line": 161,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Route/Router.php",
            "line": 309,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/lib/base.php",
            "line": 996,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/index.php",
            "line": 24,
            "function": "handleRequest",
            "class": "OC",
            "type": "::"
          }
        ],
        "File": "/var/www/nextcloud/lib/private/Files/View.php",
        "Line": 1103
      },
      "message": "Uncaught error: OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103",
      "exception": {},
      "CustomMessage": "Uncaught error: OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103"
    }
    
  19. juliusknorr commented on Aug 26, 2024

    @juliusknorr
    Member

    Indeed, i could reproduce that, could you check the patch in nextcloud/richdocuments#3948 and see if that does the trick for you?

  20. SystemKeeper commented on Aug 26, 2024

    @SystemKeeper
    Contributor

    and see if that does the trick for you?

    Works fine and resolves this issue for me!

  21. PaulosV commented on Aug 27, 2024

    @PaulosV

    On Nextcloud 30.0.0RC2, with the PRs applied, I am still getting the error. I am however using group folders, and the file I am trying to open is through a public link. I have R/W access to that file, and it works fine when accessing it through the group folder directly, and it is also okay to open in a private browser (not logged in).

    The only workaround that still works reliably in my scenario is this: #40090 (comment)

    Should I open a new bug for this, maybe?

  22. juliusknorr commented on Aug 28, 2024

    @juliusknorr
    Member

    Please read the last 2 messages, there is a fix coming with the next richdocuments release

  23. PaulosV commented on Aug 28, 2024

    @PaulosV

    My bad for not mentioning, but I have applied the patch from nextcloud/richdocuments#3948 and it did not resolve the issue for me. (edit: I have also manually checked all the other files mentioned in this bug, and they already have the modifications from the patches. With the added logging from #40090 (comment), I can see the same pattern as this person. Maybe I am missing something, but I cannot see it at the moment.)

  24. PaulosV commented on Sep 21, 2024

    @PaulosV

    After updating to Nextcloud 30.0.0, and richdocuments to v8.5.0, I still experience the issue.

    What we are using, and I feel is relevant (feel free to request more)

    Failed to find relative path for file for /<sharing user>/files/SIN admins/Nova AP/KdoKdyMuze.xlsx and owner <my username> 
    

    Log below.

    {
        "reqId": "Zp645B8Y96zQNWRCNYn2",
        "level": 3,
        "time": "2024-09-21T10:21:40+00:00",
        "remoteAddr": "2001:718:2:880::110:40",
        "user": "--",
        "app": "richdocuments",
        "method": "POST",
        "url": "/index.php/apps/richdocuments/wopi/files/2271184_oc8lvg07l31z/contents?access_token=<secret>&access_token_ttl=0",
        "message": "Uncaught error: OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103",
        "userAgent": "COOLWSD HTTP Agent 24.04.6.1",
        "version": "30.0.0.14",
        "exception": {
            "Exception": "Exception",
            "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103",
            "Code": 0,
            "Trace": [
                {
                    "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
                    "line": 161,
                    "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": 1001,
                    "function": "match",
                    "class": "OC\\Route\\Router",
                    "type": "->"
                },
                {
                    "file": "/var/www/nextcloud/index.php",
                    "line": 24,
                    "function": "handleRequest",
                    "class": "OC",
                    "type": "::"
                }
            ],
            "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "Line": 146,
            "Previous": {
                "Exception": "TypeError",
                "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492",
                "Code": 0,
                "Trace": [
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/View.php",
                        "line": 492,
                        "function": "basicOperation",
                        "class": "OC\\Files\\View",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/Filesystem.php",
                        "line": 516,
                        "function": "file_exists",
                        "class": "OC\\Files\\View",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/files_versions/lib/Storage.php",
                        "line": 158,
                        "function": "file_exists",
                        "class": "OC\\Files\\Filesystem",
                        "type": "::"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
                        "line": 174,
                        "function": "store",
                        "class": "OCA\\Files_Versions\\Storage",
                        "type": "::"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php",
                        "line": 80,
                        "function": "write_hook",
                        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
                        "line": 68,
                        "function": "handle",
                        "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                        "line": 230,
                        "function": "__invoke",
                        "class": "OC\\EventDispatcher\\ServiceEventListener",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
                        "line": 59,
                        "function": "callListeners",
                        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
                        "line": 67,
                        "function": "dispatch",
                        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
                        "line": 79,
                        "function": "dispatch",
                        "class": "OC\\EventDispatcher\\EventDispatcher",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
                        "line": 74,
                        "function": "dispatchTyped",
                        "class": "OC\\EventDispatcher\\EventDispatcher",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
                        "line": 82,
                        "function": "write",
                        "class": "OC\\Files\\Node\\HookConnector",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/View.php",
                        "line": 560,
                        "function": "emit",
                        "class": "OC_Hook",
                        "type": "::"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/View.php",
                        "line": 603,
                        "function": "emit_file_hooks_pre",
                        "class": "OC\\Files\\View",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/Node/File.php",
                        "line": 52,
                        "function": "file_put_contents",
                        "class": "OC\\Files\\View",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                        "line": 467,
                        "function": "putContent",
                        "class": "OC\\Files\\Node\\File",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                        "line": 756,
                        "function": "OCA\\Richdocuments\\Controller\\{closure}",
                        "class": "OCA\\Richdocuments\\Controller\\WopiController",
                        "type": "->",
                        "args": [
                            "*** sensitive parameters replaced ***"
                        ]
                    },
                    {
                        "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                        "line": 733,
                        "function": "retryOperation",
                        "class": "OCA\\Richdocuments\\Controller\\WopiController",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/Files/Lock/LockManager.php",
                        "line": 58,
                        "function": "OCA\\Richdocuments\\Controller\\{closure}",
                        "class": "OCA\\Richdocuments\\Controller\\WopiController",
                        "type": "->",
                        "args": [
                            "*** sensitive parameters replaced ***"
                        ]
                    },
                    {
                        "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                        "line": 736,
                        "function": "runInScope",
                        "class": "OC\\Files\\Lock\\LockManager",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/apps/richdocuments/lib/Controller/WopiController.php",
                        "line": 466,
                        "function": "wrappedFilesystemOperation",
                        "class": "OCA\\Richdocuments\\Controller\\WopiController",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                        "line": 208,
                        "function": "putFile",
                        "class": "OCA\\Richdocuments\\Controller\\WopiController",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
                        "line": 114,
                        "function": "executeController",
                        "class": "OC\\AppFramework\\Http\\Dispatcher",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
                        "line": 161,
                        "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": 1001,
                        "function": "match",
                        "class": "OC\\Route\\Router",
                        "type": "->"
                    },
                    {
                        "file": "/var/www/nextcloud/index.php",
                        "line": 24,
                        "function": "handleRequest",
                        "class": "OC",
                        "type": "::"
                    }
                ],
                "File": "/var/www/nextcloud/lib/private/Files/View.php",
                "Line": 1103
            },
            "message": "Uncaught error: OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103",
            "exception": [],
            "CustomMessage": "Uncaught error: OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/nextcloud/lib/private/Files/View.php on line 492 in file '/var/www/nextcloud/lib/private/Files/View.php' line 1103"
        },
        "id": "66eea08ba7ee2"
    }
    
  25. juliusknorr commented on Jan 16, 2025

    @juliusknorr
    Member

    @PaulosV Thanks for those steps. I pushed a fix candidate for this case in the groupfolders app at nextcloud/groupfolders#3538, testing is very welcome

  26. PaulosV commented on Jan 16, 2025

    @PaulosV

    @PaulosV Thanks for those steps. I pushed a fix candidate for this case in the groupfolders app at nextcloud/groupfolders#3538, testing is very welcome

    I tested the fix with NC 30.0.4, manually applied it to groupfolders 18.0.8, and it indeed fixes the issue for me. Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions