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

unified search - Call to a member function getLastModified() on null #2978

Closed
kinimodmeyer opened this issue Apr 13, 2021 · 3 comments
Closed
Assignees
Milestone

Comments

@kinimodmeyer
Copy link

kinimodmeyer commented Apr 13, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug
when i search in unified search i get "Es ist ein Fehler beim Suchen nach Deck aufgetreten" and also a error in the php log.
it´s not happening on every search-term. (in my case i get the error reproducible when i type "gr", i guess it depens what the search finds)

Client details:

  • NC 21 / Deck 1.4
Logs

Nextcloud log (data/nextcloud.log)

{"Exception":"Exception","Message":"Call to a member function getLastModified() on null","Code":0,"Trace":[{"file":"/var/www/.../lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\UnifiedSearchController"},"search"]},{"file":"/var/www/.../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":"deck","_route":"ocs.core.UnifiedSearch.search"}]},{"file":"/var/www/.../ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/search/providers/deck/search"]},{"file":"/var/www/.../ocs/v2.php","line":24,"args":["/var/www/.../ocs/v1.php"],"function":"require_once"}],"File":"/var/www/.../lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"Error","Message":"Call to a member function getLastModified() on null","Code":0,"Trace":[{"file":"/var/www/.../lib/private/Search/SearchComposer.php","line":162,"function":"search","class":"OCA\\Deck\\Search\\DeckProvider","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Search\\SearchQuery"}]},{"file":"/var/www/.../core/Controller/UnifiedSearchController.php","line":110,"function":"search","class":"OC\\Search\\SearchComposer","type":"->","args":[{"__class__":"OC\\User\\User"},"deck",{"__class__":"OC\\Search\\SearchQuery"}]},{"file":"/var/www/.../lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->","args":["deck","gr",null,null,null,"/apps/dashboard/"]},{"file":"/var/www/.../lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\UnifiedSearchController"},"search"]},{"file":"/var/www/.../lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\UnifiedSearchController"},"search"]},{"file":"/var/www/.../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":"deck","_route":"ocs.core.UnifiedSearch.search"}]},{"file":"/var/www/.../ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/search/providers/deck/search"]},{"file":"/var/www/.../ocs/v2.php","line":24,"args":["/var/www/.../ocs/v1.php"],"function":"require_once"}],"File":"/var/www/.../apps/deck/lib/Search/DeckProvider.php","Line":88},"CustomMessage":"--"},
@juliusknorr
Copy link
Member

I've also seen that happening today, but not sure yet how to reliably reproduce that, but i will give that some more tries.

@juliusknorr juliusknorr added this to the 2.0.0 milestone Apr 14, 2021
@juliusknorr juliusknorr self-assigned this Apr 14, 2021
@solracsf
Copy link
Member

solracsf commented Oct 3, 2021

Reproduced today on Nextcloud v21.0.5 and Deck v1.4.5.

{
  "reqId": "DwQtOYyTKJ3PuzlEYdFi",
  "level": 3,
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/search/providers/deck/search?term=SS&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2FDG%26fileid%3D64469",
  "message": {
    "Exception": "Exception",
    "Message": "Call to a member function getLastModified() on null",
    "Code": 0,
    "Trace": [
      {
        "file": "/public/lib/private/AppFramework/App.php",
        "line": 157,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
          },
          "search"
        ]
      },
      {
        "file": "/public/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": "deck",
            "_route": "ocs.core.UnifiedSearch.search"
          }
        ]
      },
      {
        "file": "/public/ocs/v1.php",
        "line": 63,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/search/providers/deck/search"
        ]
      },
      {
        "file": "/public/ocs/v2.php",
        "line": 24,
        "args": [
          "/public/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/public/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 159,
    "Previous": {
      "Exception": "Error",
      "Message": "Call to a member function getLastModified() on null",
      "Code": 0,
      "Trace": [
        {
          "file": "/public/lib/private/Search/SearchComposer.php",
          "line": 162,
          "function": "search",
          "class": "OCA\\Deck\\Search\\DeckProvider",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\User\\User"
            },
            {
              "__class__": "OC\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/public/core/Controller/UnifiedSearchController.php",
          "line": 116,
          "function": "search",
          "class": "OC\\Search\\SearchComposer",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\User\\User"
            },
            "deck",
            {
              "__class__": "OC\\Search\\SearchQuery"
            }
          ]
        },
        {
          "file": "/public/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 218,
          "function": "search",
          "class": "OC\\Core\\Controller\\UnifiedSearchController",
          "type": "->",
          "args": [
            "deck",
            "SS",
            null,
            null,
            null,
            "/apps/files/?dir=/DG&fileid=64469"
          ]
        },
        {
          "file": "/public/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 127,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
            },
            "search"
          ]
        },
        {
          "file": "/public/lib/private/AppFramework/App.php",
          "line": 157,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OC\\Core\\Controller\\UnifiedSearchController"
            },
            "search"
          ]
        },
        {
          "file": "/public/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": "deck",
              "_route": "ocs.core.UnifiedSearch.search"
            }
          ]
        },
        {
          "file": "/public/ocs/v1.php",
          "line": 63,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/search/providers/deck/search"
          ]
        },
        {
          "file": "/public/ocs/v2.php",
          "line": 24,
          "args": [
            "/public/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/public/apps/deck/lib/Search/DeckProvider.php",
      "Line": 88
    },
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36",
  "version": "21.0.5.1",
  "id": "615981c37f7e7"
}

@juliusknorr
Copy link
Member

Should be fixed by #3344

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