Unable to generate a URL for the named route \"contacts.contacts.directcircle"

Hello

I updated Nextcloud yesterday along with 4 apps to version 22.2.5 and since then, my log is filed with the following message “Unable to generate a URL for the named route “contacts.contacts.directcircle””.

I suspect that this is related to an App, but I have no idea how to correct this. Can anyone help?
Thank you
Stéphane

Nextcloud version (eg, 20.0.5): 22.2.5
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): nginx version: nginx/1.18.0 (Ubuntu)
PHP version (eg, 7.4): 8.0.16

The issue you are facing:

log is filed with the following message “Unable to generate a URL for the named route “contacts.contacts.directcircle”” after Nexcloud update / App update

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. No steps to reproduce, message is created by simply making a request to nextcloud instance

The output of your Nextcloud log in Admin > Logging:

{"reqId":"AWfMhCkk6os13pZvvuJi","level":1,"time":"2022-02-25T15:37:41-05:00","remoteAddr":"[IP removed]","user":"[user name removed]","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/[user name removed]/","message":"Unable to generate a URL for the named route \"contacts.contacts.directcircle\" as such route does not exist.","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"22.2.5.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":"/usr/share/nginx/nextcloud/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/Route/CachingRouter.php","line":59,"function":"generate","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/URLGenerator.php","line":85,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Model/ModelManager.php","line":539,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Model/Circle.php","line":679,"function":"generateLinkToCircle","class":"OCA\\Circles\\Model\\ModelManager","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Model/Circle.php","line":796,"function":"getUrl","class":"OCA\\Circles\\Model\\Circle","type":"->"},{"function":"jsonSerialize","class":"OCA\\Circles\\Model\\Circle","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":1218,"function":"json_encode"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":992,"function":"cacheSingleCircle","class":"OCA\\Circles\\Service\\FederatedUserService","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":904,"function":"getSingleCircle","class":"OCA\\Circles\\Service\\FederatedUserService","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/Service/FederatedUserService.php","line":482,"function":"fillSingleCircleId","class":"OCA\\Circles\\Service\\FederatedUserService","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/circles/lib/ShareByCircleProvider.php","line":553,"function":"getLocalFederatedUser","class":"OCA\\Circles\\Service\\FederatedUserService","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/Share20/Manager.php","line":1360,"function":"getSharedWith","class":"OCA\\Circles\\ShareByCircleProvider","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/files_sharing/lib/MountProvider.php","line":79,"function":"getSharedWith","class":"OC\\Share20\\Manager","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/Files/Config/MountProviderCollection.php","line":118,"function":"getMountsForUser","class":"OCA\\Files_Sharing\\MountProvider","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/Files/Filesystem.php","line":429,"function":"addMountForUser","class":"OC\\Files\\Config\\MountProviderCollection","type":"->"},{"file":"/usr/share/nginx/nextcloud/lib/private/Files/Filesystem.php","line":354,"function":"initMountPoints","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/usr/share/nginx/nextcloud/lib/private/legacy/OC_Util.php","line":325,"function":"init","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/usr/share/nginx/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":123,"function":"setupFS","class":"OC_Util","type":"::"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","line":103,"function":"validateUserPass","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/share/nginx/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":252,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":154,"function":"auth","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":182,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":137,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/dav/lib/Server.php","line":333,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/nginx/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/usr/share/nginx/nextcloud/remote.php","line":166,"args":["/usr/share/nginx/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/usr/share/nginx/nextcloud/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):
 <?php
 $CONFIG = array (
   'instanceid' => '[information removed]',
   'passwordsalt' => '[information removed]',
   'trusted_domains' => 
   array (
     0 => '[information removed]',
   ),
   'datadirectory' => '/mnt/owncloud-data',
   'dbtype' => 'mysql',
   'version' => '22.2.5.1',
   'installed' => true,
   'forcessl' => true,
   'maxZipInputSize' => 0,
   'allowZipDownload' => true,
   'loglevel' => '1',
   'theme' => '',
   'maintenance' => false,
   'singleuser' => false,
 
   'cron_log' => true,
   'cron.lockfile.location' => '/mnt/owncloud-data',
   'memcache.local' => '\\OC\\Memcache\\APCu',
   'logtimezone' => 'America/Montreal',
   'dbname' => '[information removed]',
   'dbhost' => '[information removed]',
   'dbuser' => '[information removed]',
   'dbpassword' => '[information removed]',
   'mail_smtpsecure' => 'tls',
   'trashbin_retention_obligation' => 'auto, 15',
   'overwrite.cli.url' => '[information removed]',
   'overwriteprotocol' => 'https',
   'overwritehost' => '[information removed]',
   'filelocking.enabled' => true,
   'mysql.utf8mb4' => true,
   'defaultapp' => 'files,dashboard',
   'default_phone_region' => 'CA',
   'updater.secret' => '[information removed]
 )

The output of your Apache/nginx/system log in `/var/log/____`:

No error in Nginx log

So I modified the log level from 1 to 2 to get rid of the log flooding… I suppose that since it is level 1 error I can safely ignore

Hello,

Maybe an Person how can do anything read this:
I have the exactliy same problem and the environment is almost the same.

Nextcloud version (eg, 20.0.5) : 22.2.5
Operating system and version (eg, Ubuntu 20.04) : Ubuntu 20.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25) : nginx version: nginx/1.21.6 (Ubuntu)
PHP version (eg, 7.4) : 8.0.15

Set log level to 2 dont remove the problem. Its more like “if i close my eyes you cant see me ;)”

Anybody else have a fix for that?

this is due to the app circle.

If you upgrade to NC23.0.3; some apps are upgraded automatically, including circles.

The error then goes away.