Contacts not working, calendar ok

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 30.0.1
Operating system and version (eg, Ubuntu 24.04): MacOS
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.26.2
PHP version (eg, 8.3): 8.3

The issue you are facing:

When I open the Contacts app page, I get a wheel, which spins forever, independent of the user of the instance.

The JavaScript error is due to a “failed promise” and the reference to the code is here:

[contacts-main.mjs:3:483843]([URL]/apps/contacts/js/contacts-main.mjs?v=3c055797-22)

If I try to add a new Address Book I get an internal server error (500):

MKCOL [URL]/remote.php/dav/addressbooks/users/[USER]/[ADDRESSBOOK_NAME]   [http/2 500]
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
	<s:exception>Internal Server Error</s:exception>
	<s:message>
		The server was unable to complete your request.		If this happens again, please send the technical details below to the server administrator.		More details can be found in the server log.			</s:message>

	<s:technical-details>
		<s:remote-address>192.168.1.49</s:remote-address>
		<s:request-id>  5OgCREIkDblMFgMmRVIJ</s:request-id>

		</s:technical-details>
</d:error>`

Some more context:

  1. This is not a matter introduced by 30.0.1: the Contacts application stopped working on an earlier release. I kept it like that for a while and I am now trying to make it operational again.
  2. The issue concerns all users, old and new
  3. Everything else works fine, including Calendar
  4. Logs seem to point to errors in the Dav component.
  5. The installation uses Nginx and the default configuration file found on the Nextcloud documentation website

I browsed logs and could find any more relevant information.

I suspect it is an issue with sabre/nginx, but I have no idea why it shouldn’t work… of course :smile:

Any help on the matter really appreciated it.

1 Like

What is your loglevel set to? You may need to lower it a bit (or not), but there should be an associated log entry (or several) if you’re getting an internal server error. It usually will have the same request ID referenced.

Hi, thanks for the suggestion. Nextcloud’s log is at DEBUG level. I have to increase the log level in Nginx.

I will do that and will come back with more detailed information.

The above request-id should be in your nextcloud.log (or wherever you’re sending your Nextcloud log output). Can you grep for it?

the error is autoload path not allowed.

Here is the trace and log:

I tried to create a new address book =test_addd= (Odd name to make sure it was not there already)

The Ajax call returns the following error and response:

Headers:

Status
500
VersionHTTP/2
Transferred1.14 kB (529 B size)
Referrer Policyno-referrer
Request PriorityHighest
DNS ResolutionSystem

Response Headers
HTTP/2 500 
server: nginx
date: Sat, 09 Nov 2024 08:26:52 GMT
content-type: application/xml; charset=utf-8
content-security-policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self';media-src 'self';frame-ancestors 'self';form-action 'self'
referrer-policy: no-referrer
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-robots-tag: none
x-xss-protection: 1; mode=block
X-Firefox-Spdy: h2

Response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
	<s:exception>Internal Server Error</s:exception>
	<s:message>
		The server was unable to complete your request.		If this happens again, please send the technical details below to the server administrator.		More details can be found in the server log.			</s:message>

	<s:technical-details>
		<s:remote-address>192.168.1.49</s:remote-address>
		<s:request-id>Zibi9jpQjpZkEiff0pTF</s:request-id>

		</s:technical-details>
</d:error>

This is the entry in the Nextcloud log:

{
"reqId":"Zibi9jpQjpZkEiff0pTF",
"level":3,
"time":"2024-11-09T08:26:52+00:00",
"remoteAddr":"192.168.1.49",
"user":"[HIDDEN]",
"app":"webdav",
"method":"MKCOL",
"url":"/nc/remote.php/dav/addressbooks/users/[HIDDEN]/test_addd",
"message":"Autoload path not allowed: /srv/nextcloud/apps/federation/lib/trustedservers.php",
"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0",
"version":"30.0.1.2",
"exception": {
  "Exception":"OCP\\AutoloadNotAllowedException",
  "Message":"Autoload path not allowed: /srv/nextcloud/apps/federation/lib/trustedservers.php",
  "Code":0,
  "Trace": [
  {"file":"/srv/nextcloud/lib/autoloader.php","line":144,"function":"isValidPath","class":"OC\\Autoloader","type":"->"},{"function":"load","class":"OC\\Autoloader","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":104,"function":"__construct","class":"ReflectionClass","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/ServerContainer.php","line":155,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":42,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/srv/nextcloud/apps/dav/lib/CardDAV/UserAddressBooks.php","line":90,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"function":"OCA\\DAV\\CardDAV\\{closure}","class":"OCA\\DAV\\CardDAV\\UserAddressBooks","type":"->","args":["*** sensitive parameters replaced ***"]
  },
  {"file":"/srv/nextcloud/apps/dav/lib/CardDAV/UserAddressBooks.php","line":86,"function":"array_map"},
  {"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/CardDAV/AddressBookHome.php","line":126,"function":"getChildren","class":"OCA\\DAV\\CardDAV\\UserAddressBooks","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Collection.php","line":57,"function":"getChild","class":"Sabre\\CardDAV\\AddressBookHome","type":"->"},
  {"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":129,"function":"childExists","class":"Sabre\\DAV\\Collection","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAVACL/Plugin.php","line":834,"function":"nodeExists","class":"Sabre\\DAV\\Tree","type":"->"},
  {"file":"/srv/nextcloud/apps/dav/lib/Connector/Sabre/DavAclPlugin.php","line":100,"function":"beforeMethod","class":"Sabre\\DAVACL\\Plugin","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"OCA\\DAV\\Connector\\Sabre\\DavAclPlugin","type":"->"},
  {"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},
  {"file":"/srv/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":43,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/apps/dav/lib/Server.php","line":370,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/srv/nextcloud/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},
  {"file":"/srv/nextcloud/remote.php","line":146,"args":["/srv/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}
],
"File":"/srv/nextcloud/lib/autoloader.php",
"Line":119,
"message":"Autoload path not allowed: /srv/nextcloud/apps/federation/lib/trustedservers.php",
"exception":{},
"CustomMessage":"Autoload path not allowed: /srv/nextcloud/apps/federation/lib/trustedservers.php"
}
}

I don’t see why you’d be getting this error with the autoloader.

Can you elaborate a bit on your installation/installation method? Are you really running your Server on MacOS?

Also post the output of occ config:list system.

Hi -
thanks for the quick answer, I really appreciate your support!

… and yes, I am running on OSX; manual installation from sources. I am using macports for all the dependencies (php, php-fpm, redis, nginx,mariadb, …).

I think OSX is not officially supported, but everything works fine, with the exception of renaming files, when only the case of one or more chars is changed. So if i try to rename, say, foo.txt to FOO.txt, I get a conflict. This is because OSX’s filesystem is case insensitive and Nextcloud assumes a case-sensitive file system.

The installation is old: I started a few years ago and I regularly updated the installation over the years. In a couple of cases the update did not quite work (my bad) and I (re)installed from scratch.

Everything works fine:

  • File application is ok, I can manage both with the web interface and the desktop client; same with all the other apps.
  • I can also access the instance via davs from Nautilus, reading and writing files.

I was wondering whether I could maybe use davs access from Nautilus to try and manually create an address book?

Information you asked for:

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "ict4g.net",
            "www.ict4g.net",
            "nc.shair.tech"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "user": "nextcloud",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.1.2",
        "overwrite.cli.url": "https:\/\/nc.shair.tech\/nc",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "default_phone_region": "IT",
        "loglevel": 0,
        "maintenance": false,
        "maintenance_window_start": 1,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "trashbin_retention_obligation": "auto",
        "updater.release.channel": "stable",
        "app_install_overwrite": [
            "radio",
            "contacts",
            "polls",
            "dashboardcharts",
            "whiteboard",
            "collectives",
            "passwords",
            "appointments",
            "timemanager",
            "timetracker",
            "webhooks",
            "richdocumentscode",
            "mindmap_app",
            "files_mindmap",
            "integration_moodle",
            "spreed"
        ],
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\MP4",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF"
        ],
        "memories.db.triggers.fcu": true,
        "memories.exiftool_no_local": true,
        "memories.vod.path": "\/srv\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64"
    }
}