Skip to content

OCA\\Circles\\Model\\ShareWrapper::getCircle(): Return value must be of type OCA\\Circles\\Model\\Circle, null returned in file 'apps/circles/lib/Model/ShareWrapper.php' line 272 #1714

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

Closed
kesselb opened this issue Oct 18, 2024 · 1 comment · Fixed by #1793

Comments

@kesselb
Copy link
Contributor

kesselb commented Oct 18, 2024

{
  "reqId": "123",
  "level": 3,
  "time": "2024-10-09T10:54:06+02:00",
  "remoteAddr": "",
  "user": "--",
  "app": "index",
  "method": "POST",
  "url": "/index.php/apps/richdocuments/wopi/files/123_xyz/contents?access_token=&access_token_ttl=0",
  "message": "Exception thrown: Exception",
  "userAgent": "COOLWSD HTTP Agent 23.05.15.1",
  "version": "27.1.11.8",
  "exception": {
    "Exception": "Exception",
    "Message": "OCA\\Circles\\Model\\ShareWrapper::getCircle(): Return value must be of type OCA\\Circles\\Model\\Circle, null returned in file 'apps/circles/lib/Model/ShareWrapper.php' line 272",
    "Code": 0,
    "Trace": [
      {
        "file": "lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "lib/base.php",
        "line": 1068,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "index.php",
        "line": 38,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 169,
    "Previous": {
      "Exception": "TypeError",
      "Message": "OCA\\Circles\\Model\\ShareWrapper::getCircle(): Return value must be of type OCA\\Circles\\Model\\Circle, null returned",
      "Code": 0,
      "Trace": [
        {
          "file": "apps/circles/lib/ShareByCircleProvider.php",
          "line": 694,
          "function": "getCircle",
          "class": "OCA\\Circles\\Model\\ShareWrapper",
          "type": "->"
        },
        {
          "file": "lib/private/Share20/Manager.php",
          "line": 1789,
          "function": "getAccessList",
          "class": "OCA\\Circles\\ShareByCircleProvider",
          "type": "->"
        },
        {
          "file": "lib/private/Share20/ShareHelper.php",
          "line": 51,
          "function": "getAccessList",
          "class": "OC\\Share20\\Manager",
          "type": "->"
        },
        {
          "file": "apps/activity/lib/FilesHooks.php",
          "line": 660,
          "function": "getPathsForAccessList",
          "class": "OC\\Share20\\ShareHelper",
          "type": "->"
        },
        {
          "file": "apps/activity/lib/FilesHooks.php",
          "line": 228,
          "function": "getUserPathsFromPath",
          "class": "OCA\\Activity\\FilesHooks",
          "type": "->"
        },
        {
          "file": "apps/activity/lib/FilesHooks.php",
          "line": 170,
          "function": "addNotificationsForFileAction",
          "class": "OCA\\Activity\\FilesHooks",
          "type": "->"
        },
        {
          "file": "apps/activity/lib/FilesHooksStatic.php",
          "line": 54,
          "function": "fileUpdate",
          "class": "OCA\\Activity\\FilesHooks",
          "type": "->"
        },
        {
          "file": "lib/private/legacy/OC_Hook.php",
          "line": 105,
          "function": "fileUpdate",
          "class": "OCA\\Activity\\FilesHooksStatic",
          "type": "::"
        },
        {
          "file": "lib/private/Files/View.php",
          "line": 609,
          "function": "emit",
          "class": "OC_Hook",
          "type": "::"
        },
        {
          "file": "lib/private/Files/View.php",
          "line": 668,
          "function": "emit_file_hooks_post",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "lib/private/Files/Node/File.php",
          "line": 73,
          "function": "file_put_contents",
          "class": "OC\\Files\\View",
          "type": "->"
        },
        {
          "file": "apps/richdocuments/lib/Controller/WopiController.php",
          "line": 528,
          "function": "putContent",
          "class": "OC\\Files\\Node\\File",
          "type": "->"
        },
        {
          "file": "apps/richdocuments/lib/Controller/WopiController.php",
          "line": 826,
          "function": "OCA\\Richdocuments\\Controller\\{closure}",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "apps/richdocuments/lib/Controller/WopiController.php",
          "line": 803,
          "function": "retryOperation",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->"
        },
        {
          "file": "lib/private/Files/Lock/LockManager.php",
          "line": 39,
          "function": "OCA\\Richdocuments\\Controller\\{closure}",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "apps/richdocuments/lib/Controller/WopiController.php",
          "line": 806,
          "function": "runInScope",
          "class": "OC\\Files\\Lock\\LockManager",
          "type": "->"
        },
        {
          "file": "apps/richdocuments/lib/Controller/WopiController.php",
          "line": 527,
          "function": "wrappedFilesystemOperation",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->"
        },
        {
          "file": "lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "putFile",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->"
        },
        {
          "file": "lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "lib/private/AppFramework/App.php",
          "line": 183,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "lib/base.php",
          "line": 1068,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "index.php",
          "line": 38,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "apps/circles/lib/Model/ShareWrapper.php",
      "Line": 272
    },
    "CustomMessage": "Exception thrown: Exception"
  }
}
@oleksandr-nc
Copy link

Unfortunately on Nextcloud 30, applying the patch from the PR backport(#1807), judging by the messages, does not completely fix the problem, still error appears when running occ circles:shares:files --all --by adm.grp:

An unhandled exception has been thrown:
TypeError: OCA\Circles\Model\ShareWrapper::getCircle(): Return value must be of type OCA\Circles\Model\Circle, null returned in /appli/nextcloud/apps/circles/lib/Model/ShareWrapper.php:252
Stack trace:
#0 /appli/nextcloud/apps/circles/lib/Command/SharesFiles.php(210): OCA\Circles\Model\ShareWrapper->getCircle()
#1 /appli/nextcloud/apps/circles/lib/Command/SharesFiles.php(106): OCA\Circles\Command\SharesFiles->displayShares()
#2 /appli/nextcloud/3rdparty/symfony/console/Command/Command.php(326): OCA\Circles\Command\SharesFiles->execute()
#3 /appli/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run()
#4 /appli/nextcloud/3rdparty/symfony/console/Application.php(1078): OC\Core\Command\Base->run()
#5 /appli/nextcloud/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#6 /appli/nextcloud/3rdparty/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#7 /appli/nextcloud/lib/private/Console/Application.php(183): Symfony\Component\Console\Application->run()
#8 /appli/nextcloud/console.php(87): OC\Console\Application->run()
#9 /appli/nextcloud/occ(11): require_once('...')
#10 {main}

Should I open a new issue for this or should we reopen this issue?

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

Successfully merging a pull request may close this issue.

2 participants