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

Argument 1 passed to OC\Files\Cache\Wrapper\CacheJail::getJailedPath() must be of the type string, null given #1605

Closed
solracsf opened this issue Jul 30, 2021 · 7 comments
Labels
1. to develop Issues that are ready for development bug feature: search Items related to the search needs info

Comments

@solracsf
Copy link
Member

I'm submiting this here as it seems related to GroupFolders, feel free to move to Server if it is not.


  • NC 21.0.3
  • GF 9.0.2
{
  "reqId": "PKc7sFRWGT1mF2TReaNK",
  "level": 3,
  "time": "2021-07-28T16:46:32+02:00",
  "remoteAddr": "2a01:cb00:80c:6600:a5c9:af47:613f:12d5",
  "user": "al-nextc",
  "app": "PHP",
  "method": "GET",
  "url": "/ocs/v2.php/search/providers/files/search?term=con&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2FDG_nextc%2Fnextc_RH%2FSALARIES%26fileid%3D74370",
  "message": {
    "Exception": "Error",
    "Message": "Trying to access array offset on value of type bool at /lib/private/Files/Cache/Wrapper/CacheJail.php#235",
    "Code": 0,
    "Trace": [
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
        "line": 235,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          8,
          "Trying to access array offset on value of type bool",
          "/lib/private/Files/Cache/Wrapper/CacheJail.php",
          235,
          {
            "entry": "*** sensitive parameter replaced ***"
          }
        ]
      },
      {
        "function": "OC\\Files\\Cache\\Wrapper\\{closure}",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
        "line": 234,
        "function": "array_map",
        "args": [
          {
            "__class__": "Closure"
          },
          [
            "*** sensitive parameter replaced ***"
          ]
        ]
      },
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
        "line": 323,
        "function": "formatSearchResults",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
        "type": "->",
        "args": [
          [
            "*** sensitive parameter replaced ***"
          ]
        ]
      },
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
        "line": 242,
        "function": "searchQuery",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
        "line": 242,
        "function": "searchQuery",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
        "line": 242,
        "function": "searchQuery",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/lib/private/Files/Node/Folder.php",
        "line": 302,
        "function": "searchQuery",
        "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/apps/files/lib/Search/FilesSearchProvider.php",
        "line": 139,
        "function": "search",
        "class": "OC\\Files\\Node\\Folder",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/lib/private/Search/SearchComposer.php",
        "line": 162,
        "function": "search",
        "class": "OCA\\Files\\Search\\FilesSearchProvider",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\User\\User"
          },
          {
            "__class__": "OC\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/core/Controller/UnifiedSearchController.php",
        "line": 110,
        "function": "search",
        "class": "OC\\Search\\SearchComposer",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\User\\User"
          },
          "files",
          {
            "__class__": "OC\\Search\\SearchQuery"
          }
        ]
      },
      {
        "file": "/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 218,
        "function": "search",
        "class": "OC\\Core\\Controller\\UnifiedSearchController",
        "type": "->",
        "args": [
          "files",
          "con",
          null,
          null,
          null,
          "/apps/files/?dir=/DG_nextc/nextc_RH/SALARIES&fileid=74370"
        ]
      },
      {
        "file": "/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 127,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
          },
          "search"
        ]
      },
      {
        "file": "/lib/private/AppFramework/App.php",
        "line": 157,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
          },
          "search"
        ]
      },
      {
        "file": "/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OC\\Core\\Controller\\UnifiedSearchController",
          "search",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "providerId": "files",
            "_route": "ocs.core.UnifiedSearch.search"
          }
        ]
      },
      {
        "file": "/ocs/v1.php",
        "line": 63,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/search/providers/files/search"
        ]
      },
      {
        "file": "/ocs/v2.php",
        "line": 24,
        "args": [
          "/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/lib/private/Log/ErrorHandler.php",
    "Line": 92,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36",
  "version": "21.0.3.1",
  "id": "6103ae33c3329"
}

Followed by:

{
  "reqId": "PKc7sFRWGT1mF2TReaNK",
  "level": 3,
  "time": "2021-07-28T16:46:32+02:00",
  "remoteAddr": "2a01:cb00:80c:6600:a5c9:af47:613f:12d5",
  "user": "al-nextc",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/search/providers/files/search?term=con&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2FDG_nextc%2Fnextc_RH%2FSALARIES%26fileid%3D74370",
  "message": {
    "Exception": "Exception",
    "Message": "Argument 1 passed to OC\\Files\\Cache\\Wrapper\\CacheJail::getJailedPath() must be of the type string, null given, called in /lib/private/Files/Cache/Wrapper/CacheJail.php on line 235",
    "Code": 0,
    "Trace": [
      {
        "file": "/lib/private/AppFramework/App.php",
        "line": 157,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
          },
          "search"
        ]
      },
      {
        "file": "/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OC\\Core\\Controller\\UnifiedSearchController",
          "search",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "providerId": "files",
            "_route": "ocs.core.UnifiedSearch.search"
          }
        ]
      },
      {
        "file": "/ocs/v1.php",
        "line": 63,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/search/providers/files/search"
        ]
      },
      {
        "file": "/ocs/v2.php",
        "line": 24,
        "args": [
          "/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 159,
    "Previous": {
      "Exception": "TypeError",
      "Message": "Argument 1 passed to OC\\Files\\Cache\\Wrapper\\CacheJail::getJailedPath() must be of the type string, null given, called in /lib/private/Files/Cache/Wrapper/CacheJail.php on line 235",
      "Code": 0,
      "Trace": [
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
          "line": 235,
          "function": "getJailedPath",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
          "type": "->",
          "args": [
            null,
            "__groupfolders/18"
          ]
        },
        {
          "function": "OC\\Files\\Cache\\Wrapper\\{closure}",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
          "line": 234,
          "function": "array_map",
          "args": [
            {
              "__class__": "Closure"
            },
            [
              "*** sensitive parameter replaced ***"
            ]
          ]
        },
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
          "line": 323,
          "function": "formatSearchResults",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
          "type": "->",
          "args": [
            [
              "*** sensitive parameter replaced ***"
            ]
          ]
        },
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
          "line": 242,
          "function": "searchQuery",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheJail",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
          "line": 242,
          "function": "searchQuery",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/lib/private/Files/Cache/Wrapper/CacheWrapper.php",
          "line": 242,
          "function": "searchQuery",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/lib/private/Files/Node/Folder.php",
          "line": 302,
          "function": "searchQuery",
          "class": "OC\\Files\\Cache\\Wrapper\\CacheWrapper",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/apps/files/lib/Search/FilesSearchProvider.php",
          "line": 139,
          "function": "search",
          "class": "OC\\Files\\Node\\Folder",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Files\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/lib/private/Search/SearchComposer.php",
          "line": 162,
          "function": "search",
          "class": "OCA\\Files\\Search\\FilesSearchProvider",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\User\\User"
            },
            {
              "__class__": "OC\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/core/Controller/UnifiedSearchController.php",
          "line": 110,
          "function": "search",
          "class": "OC\\Search\\SearchComposer",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\User\\User"
            },
            "files",
            {
              "__class__": "OC\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 218,
          "function": "search",
          "class": "OC\\Core\\Controller\\UnifiedSearchController",
          "type": "->",
          "args": [
            "files",
            "con",
            null,
            null,
            null,
            "/apps/files/?dir=/DG_nextc/nextc_RH/SALARIES&fileid=74370"
          ]
        },
        {
          "file": "/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 127,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
            },
            "search"
          ]
        },
        {
          "file": "/lib/private/AppFramework/App.php",
          "line": 157,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
            },
            "search"
          ]
        },
        {
          "file": "/lib/private/Route/Router.php",
          "line": 302,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OC\\Core\\Controller\\UnifiedSearchController",
            "search",
            {
              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
            },
            {
              "providerId": "files",
              "_route": "ocs.core.UnifiedSearch.search"
            }
          ]
        },
        {
          "file": "/ocs/v1.php",
          "line": 63,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/search/providers/files/search"
          ]
        },
        {
          "file": "/ocs/v2.php",
          "line": 24,
          "args": [
            "/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/lib/private/Files/Cache/Wrapper/CacheJail.php",
      "Line": 94
    },
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36",
  "version": "21.0.3.1",
  "id": "6103ae33c32ba"
}
@solracsf solracsf added bug 0. Needs triage Issues that need to be triaged labels Jul 30, 2021
@CarlSchwan
Copy link
Member

The code referenced in this strack trace has received quite a bit of change in NC 22, so it hopefully got fixed. Feel free to reopen if this still happen in NC22 or later.

@CarlSchwan
Copy link
Member

It seems that the fix for this issue wasn't backported in the NC21. I will investigate.

@CarlSchwan CarlSchwan reopened this Nov 19, 2021
@fschrempf fschrempf added 1. to develop Issues that are ready for development and removed 0. Needs triage Issues that need to be triaged labels Nov 26, 2021
@fschrempf fschrempf added the feature: search Items related to the search label Nov 26, 2021
@JMoVS
Copy link

JMoVS commented Nov 29, 2021

@CarlSchwan The issue mentioned in 1563 is still occuring on our NC22 instance - is it still correctly marked as duplicate?

@solracsf
Copy link
Member Author

@JMoVS can you paste a full stack trace of this error with NC 22.2.3 and GF 10.0.0?

@JMoVS
Copy link

JMoVS commented Jan 3, 2022

I will monitor and see if search still throws errors for my colleagues.

@JMoVS
Copy link

JMoVS commented Jan 4, 2022

seems like it's still happening:
grafik
grafik

or is this something else? @acsfer

@CarlSchwan
Copy link
Member

CarlSchwan commented Apr 20, 2022

This should be fixed with nextcloud/server#29509 that was released with Nextcloud 22.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug feature: search Items related to the search needs info
Projects
None yet
Development

No branches or pull requests

4 participants