circles icon indicating copy to clipboard operation
circles copied to clipboard

Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.

Open dominiquefournier opened this issue 2 years ago • 1 comments

Nextcloud 23.0.4.1, circles 23.1.1 (up to date) The logs are filled with :

{
  "reqId": "QxfXCz52R7XLrPc4TlEc",
  "level": 1,
  "time": "2022-04-24T09:55:20+02:00",
  "remoteAddr": "",
  "user": "--",
  "app": "no app in context",
  "method": "",
  "url": "--",
  "message": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.",
  "userAgent": "--",
  "version": "23.0.4.1",
  "exception": {
    "Exception": "Symfony\\Component\\Routing\\Exception\\RouteNotFoundException",
    "Message": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/nextcloud/lib/private/Route/Router.php",
        "line": 365,
        "function": "generate",
        "class": "Symfony\\Component\\Routing\\Generator\\UrlGenerator",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Route/CachingRouter.php",
        "line": 59,
        "function": "generate",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/URLGenerator.php",
        "line": 91,
        "function": "generate",
        "class": "OC\\Route\\CachingRouter",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Model/ModelManager.php",
        "line": 558,
        "function": "linkToRoute",
        "class": "OC\\URLGenerator",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Model/Circle.php",
        "line": 733,
        "function": "generateLinkToCircle",
        "class": "OCA\\Circles\\Model\\ModelManager",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Model/Circle.php",
        "line": 855,
        "function": "getUrl",
        "class": "OCA\\Circles\\Model\\Circle",
        "type": "->"
      },
      {
        "function": "jsonSerialize",
        "class": "OCA\\Circles\\Model\\Circle",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Service/FederatedUserService.php",
        "line": 1287,
        "function": "json_encode"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Service/FederatedUserService.php",
        "line": 1061,
        "function": "cacheSingleCircle",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Service/FederatedUserService.php",
        "line": 973,
        "function": "getSingleCircle",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/Service/FederatedUserService.php",
        "line": 527,
        "function": "fillSingleCircleId",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/circles/lib/ShareByCircleProvider.php",
        "line": 553,
        "function": "getLocalFederatedUser",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Share20/Manager.php",
        "line": 1375,
        "function": "getSharedWith",
        "class": "OCA\\Circles\\ShareByCircleProvider",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/apps/files_sharing/lib/MountProvider.php",
        "line": 90,
        "function": "getSharedWith",
        "class": "OC\\Share20\\Manager",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Files/Config/MountProviderCollection.php",
        "line": 118,
        "function": "getMountsForUser",
        "class": "OCA\\Files_Sharing\\MountProvider",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Files/Filesystem.php",
        "line": 424,
        "function": "addMountForUser",
        "class": "OC\\Files\\Config\\MountProviderCollection",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Files/Filesystem.php",
        "line": 341,
        "function": "initMountPoints",
        "class": "OC\\Files\\Filesystem",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/legacy/OC_Util.php",
        "line": 342,
        "function": "init",
        "class": "OC\\Files\\Filesystem",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
        "line": 109,
        "function": "setupFS",
        "class": "OC_Util",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
        "line": 92,
        "function": "setupFS",
        "class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/User/Manager.php",
        "line": 656,
        "function": "OCA\\Files_Trashbin\\BackgroundJob\\{closure}",
        "class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php",
        "line": 97,
        "function": "callForSeenUsers",
        "class": "OC\\User\\Manager",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/BackgroundJob/Job.php",
        "line": 51,
        "function": "run",
        "class": "OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/BackgroundJob/TimedJob.php",
        "line": 58,
        "function": "execute",
        "class": "OC\\BackgroundJob\\Job",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/cron.php",
        "line": 150,
        "function": "execute",
        "class": "OC\\BackgroundJob\\TimedJob",
        "type": "->"
      }
    ],
    "File": "/var/www/html/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php",
    "Line": 143,
    "CustomMessage": "--"
  }
}

I have the user backend as LDAP.

Do you know what should I do ?

dominiquefournier avatar Apr 24 '22 08:04 dominiquefournier

I had to install/enable the contacts app to get rid of this error. All my users are local though, not in LDAP.

I don't remember I had to install it manually in NextCloud 23, probably it was enabled by default but this has changed in NextCloud 24.

k-popov avatar May 18 '22 12:05 k-popov

I can confirm that this issue exists and the workaround from @k-popov works.

major-mayer avatar Feb 15 '23 13:02 major-mayer

https://github.com/nextcloud/circles/commit/efb49ce13dc2d4d41878469dc6dd2b24604cb8c7 should fix this.

However i am still seeing this even with contacts enabled.

trace
{
  "reqId": "4khbvmCJm0zNaexhDfYL",
  "level": 1,
  "time": "2023-04-13T07:05:52+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "no app in context",
  "method": "",
  "url": "--",
  "message": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.",
  "userAgent": "--",
  "version": "27.0.0.0",
  "exception": {
    "Exception": "Symfony\\Component\\Routing\\Exception\\RouteNotFoundException",
    "Message": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 380,
        "function": "generate",
        "class": "Symfony\\Component\\Routing\\Generator\\UrlGenerator",
        "type": "->",
        "args": [
          "contacts.contacts.directcircle",
          [
            "e3Z3liqKWRZjg8uU8ueH32LLaHNgq7u"
          ],
          1
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/CachingRouter.php",
        "line": 65,
        "function": "generate",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "contacts.contacts.directcircle",
          [
            "e3Z3liqKWRZjg8uU8ueH32LLaHNgq7u"
          ],
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/URLGenerator.php",
        "line": 103,
        "function": "generate",
        "class": "OC\\Route\\CachingRouter",
        "type": "->",
        "args": [
          "contacts.contacts.directcircle",
          [
            "e3Z3liqKWRZjg8uU8ueH32LLaHNgq7u"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Model/ModelManager.php",
        "line": 560,
        "function": "linkToRoute",
        "class": "OC\\URLGenerator",
        "type": "->",
        "args": [
          "contacts.contacts.directcircle",
          [
            "e3Z3liqKWRZjg8uU8ueH32LLaHNgq7u"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Model/Circle.php",
        "line": 733,
        "function": "generateLinkToCircle",
        "class": "OCA\\Circles\\Model\\ModelManager",
        "type": "->",
        "args": [
          "e3Z3liqKWRZjg8uU8ueH32LLaHNgq7u"
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Model/Circle.php",
        "line": 855,
        "function": "getUrl",
        "class": "OCA\\Circles\\Model\\Circle",
        "type": "->",
        "args": []
      },
      {
        "function": "jsonSerialize",
        "class": "OCA\\Circles\\Model\\Circle",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
        "line": 1293,
        "function": "json_encode",
        "args": [
          [
            "OCA\\Circles\\Model\\Circle"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
        "line": 1067,
        "function": "cacheSingleCircle",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->",
        "args": [
          [
            "OCA\\Circles\\Model\\FederatedUser"
          ],
          [
            "OCA\\Circles\\Model\\Circle"
          ]
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
        "line": 979,
        "function": "getSingleCircle",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->",
        "args": [
          [
            "OCA\\Circles\\Model\\FederatedUser"
          ],
          true
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/Service/FederatedUserService.php",
        "line": 533,
        "function": "fillSingleCircleId",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->",
        "args": [
          [
            "OCA\\Circles\\Model\\FederatedUser"
          ],
          true
        ]
      },
      {
        "file": "/var/www/html/apps/circles/lib/ShareByCircleProvider.php",
        "line": 543,
        "function": "getLocalFederatedUser",
        "class": "OCA\\Circles\\Service\\FederatedUserService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Share20/Manager.php",
        "line": 1409,
        "function": "getSharedWith",
        "class": "OCA\\Circles\\ShareByCircleProvider",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          7,
          null,
          -1,
          0
        ]
      },
      {
        "file": "/var/www/html/apps/files_sharing/lib/MountProvider.php",
        "line": 97,
        "function": "getSharedWith",
        "class": "OC\\Share20\\Manager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          7,
          null,
          -1
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Config/MountProviderCollection.php",
        "line": 89,
        "function": "getMountsForUser",
        "class": "OCA\\Files_Sharing\\MountProvider",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          [
            "OC\\Files\\Storage\\StorageFactory"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Config/MountProviderCollection.php",
        "line": 146,
        "function": "getMountsFromProvider",
        "class": "OC\\Files\\Config\\MountProviderCollection",
        "type": "->",
        "args": [
          [
            "OCA\\Files_Sharing\\MountProvider"
          ],
          "*** sensitive parameters replaced ***",
          [
            "OC\\Files\\Storage\\StorageFactory"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/SetupManager.php",
        "line": 228,
        "function": "addMountForUser",
        "class": "OC\\Files\\Config\\MountProviderCollection",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          [
            "OC\\Files\\Mount\\Manager"
          ],
          [
            "Closure"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/SetupManager.php",
        "line": 327,
        "function": "OC\\Files\\{closure}",
        "class": "OC\\Files\\SetupManager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/SetupManager.php",
        "line": 229,
        "function": "setupForUserWith",
        "class": "OC\\Files\\SetupManager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          [
            "Closure"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_Util.php",
        "line": 112,
        "function": "setupForUser",
        "class": "OC\\Files\\SetupManager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/User/Session.php",
        "line": 550,
        "function": "setupFS",
        "class": "OC_Util",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/User/Session.php",
        "line": 404,
        "function": "prepareUserLogin",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          true,
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/User/Session.php",
        "line": 621,
        "function": "completeLogin",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/User/Session.php",
        "line": 355,
        "function": "loginWithPassword",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Setup.php",
        "line": 436,
        "function": "login",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/core/Command/Maintenance/Install.php",
        "line": 104,
        "function": "install",
        "class": "OC\\Setup",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/console/Command/Command.php",
        "line": 255,
        "function": "execute",
        "class": "OC\\Core\\Command\\Maintenance\\Install",
        "type": "->",
        "args": [
          [
            "Symfony\\Component\\Console\\Input\\ArgvInput"
          ],
          [
            "Symfony\\Component\\Console\\Output\\ConsoleOutput"
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/console/Application.php",
        "line": 1009,
        "function": "run",
        "class": "Symfony\\Component\\Console\\Command\\Command",
        "type": "->",
        "args": [
          [
            "Symfony\\Component\\Console\\Input\\ArgvInput"
          ],
          [
            "Symfony\\Component\\Console\\Output\\ConsoleOutput"
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/console/Application.php",
        "line": 273,
        "function": "doRunCommand",
        "class": "Symfony\\Component\\Console\\Application",
        "type": "->",
        "args": [
          [
            "OC\\Core\\Command\\Maintenance\\Install"
          ],
          [
            "Symfony\\Component\\Console\\Input\\ArgvInput"
          ],
          [
            "Symfony\\Component\\Console\\Output\\ConsoleOutput"
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/console/Application.php",
        "line": 149,
        "function": "doRun",
        "class": "Symfony\\Component\\Console\\Application",
        "type": "->",
        "args": [
          [
            "Symfony\\Component\\Console\\Input\\ArgvInput"
          ],
          [
            "Symfony\\Component\\Console\\Output\\ConsoleOutput"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/Console/Application.php",
        "line": 215,
        "function": "run",
        "class": "Symfony\\Component\\Console\\Application",
        "type": "->",
        "args": [
          [
            "Symfony\\Component\\Console\\Input\\ArgvInput"
          ],
          [
            "Symfony\\Component\\Console\\Output\\ConsoleOutput"
          ]
        ]
      },
      {
        "file": "/var/www/html/console.php",
        "line": 100,
        "function": "run",
        "class": "OC\\Console\\Application",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/occ",
        "line": 11,
        "args": [
          "/var/www/html/console.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/3rdparty/symfony/routing/Generator/UrlGenerator.php",
    "Line": 143,
    "message": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.",
    "exception": {},
    "CustomMessage": "Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist."
  }
}

max-nextcloud avatar Apr 13 '23 07:04 max-nextcloud