Although I realize tons of topics on this subject have already been started and answered, for the life of me I can’t seem to get the .well-known links working on my environment. Could you please jump aboard my troubleshooting train? Thanks in advance!
First things first, my platform info:
Platform Info
- Nextcloud Server version (e.g., 29.x.x):
30.0.4
- Operating system and version (e.g., Ubuntu 24.04):
Linux kernel 4.18.0-513.18.1.el8_9.x86_64 x86_64
(unsure what distro, hosted on a webhosting package through Installatron in cPanel)
- Web server and version (e.g, Apache 2.4.25):
Apache 2.4.62
- Reverse proxy and version _(e.g. nginx 1.27.2)
Unknown
- PHP version (e.g, 8.3):
8.3.14
- Is this the first time you’ve seen this error? (Yes / No):
Yes
- When did this problem seem to first start?
After updating server to version 30.0.2
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Installatron through cPanel
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
Cloudflare DNS
Then for the details on my issue, configs and errors:
Issue info
Summary of the issue I am facing:
The issue I’m facing is that the “Files” app returns “folder not found” on every folder that I click on, except the “Shares” and “Tags” folders. The “Shares” folder loads normally where 1 file is shared with my account, and the “Tags” folder generates a different error: “Unexpected error: Failed to load tags”.
Checking the browser console when retrying to load the “all files” folder generates two errors:
- a PROPFIND error in “xhr-request.js” line 63: https://cloud.sjengkraftkompenei.nl/remote.php/dav/files/LucS 404 (Not Found)
- a 404 error in “FilesList.vue” line 371: 404 at Xe (https://cloud.sjengkraftkompenei.nl/dist/core-common.js)
Also worth noting is that every couple of seconds a heartbeat PUT request fails with a 404 error in “heartbeatService.js” line 17: PUT https://cloud.sjengkraftkompenei.nl/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json 404 (Not Found)
Of course the administration settings shows the error “Your web server is not properly set up to resolve .well-known
URLs, failed on: /.well-known/caldav
For more details see the documentation .” However, the resolution steps there don’t seem to fix my issues unless I vigorously overlook something.
Finally worth noting perhaps is that resetting the availability status on my user and deleting notifications also don’t work each with their own errors, but from my understanding these also rely on the .well-known resolution which is now broken.
Log entries (errors)
Nextcloud
Unfortunately nothing is reported in Nextcloud’s own logging regarding this issue.
Web Browser Console errors
* PROPFIND https://cloud.sjengkraftkompenei.nl/remote.php/dav/files/user/ 404 (Not Found)
* [ERROR] files: Error while fetching content
{app: 'files', uid: 'LucS', level: 2, error: Error: Invalid response: 404
at Xe (https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=…}
app
:
"files"
error
:
Error: Invalid response: 404 at Xe (https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4079291) at Ke (https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4079531) at https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4088528 at async https://cloud.sjengkraftkompenei.nl/dist/files-init.js?v=7b7ce260-24:1:12807
response
:
Response {type: 'basic', url: 'https://cloud.sjengkraftkompenei.nl/remote.php/dav/files/user/', redirected: false, status: 404, ok: false, …}
status
:
404
message
:
"Invalid response: 404 "
stack
:
"Error: Invalid response: 404 \n at Xe (https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4079291)\n at Ke (https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4079531)\n at https://cloud.sjengkraftkompenei.nl/dist/core-common.js?v=7b7ce260-24:1:4088528\n at async https://cloud.sjengkraftkompenei.nl/dist/files-init.js?v=7b7ce260-24:1:12807"
[[Prototype]]
:
Object
level
:
2
uid
:
"LucS"
[[Prototype]]
:
Object
Configuration
Contents .htaccess file in Nextclouds root folder
<IfModule mod_headers.c>
<IfModule mod_setenvif.c>
<IfModule mod_fcgid.c>
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
</IfModule>
<IfModule mod_proxy_fcgi.c>
SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<IfModule mod_lsapi.c>
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
</IfModule>
</IfModule>
<IfModule mod_env.c>
# Add security and privacy related headers
# Avoid doubled headers by unsetting headers in "onsuccess" table,
# then add headers to "always" table: https://github.com/nextcloud/server/pull/19002
Header onsuccess unset Referrer-Policy
Header always set Referrer-Policy "no-referrer"
Header onsuccess unset X-Content-Type-Options
Header always set X-Content-Type-Options "nosniff"
Header onsuccess unset X-Frame-Options
Header always set X-Frame-Options "SAMEORIGIN"
Header onsuccess unset X-Permitted-Cross-Domain-Policies
Header always set X-Permitted-Cross-Domain-Policies "none"
Header onsuccess unset X-Robots-Tag
Header always set X-Robots-Tag "noindex, nofollow"
Header onsuccess unset X-XSS-Protection
Header always set X-XSS-Protection "1; mode=block"
SetEnv modHeadersAvailable true
</IfModule>
# Add cache control for static resources
<FilesMatch "\.(css|js|mjs|svg|gif|png|jpg|webp|ico|wasm|tflite)$">
<If "%{QUERY_STRING} =~ /(^|&)v=/">
Header set Cache-Control "max-age=15778463, immutable"
</If>
<Else>
Header set Cache-Control "max-age=15778463"
</Else>
</FilesMatch>
# Let browsers cache OTF and WOFF files for a week
<FilesMatch "\.(otf|woff2?)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
<IfModule mod_php.c>
php_value mbstring.func_overload 0
php_value default_charset 'UTF-8'
php_value output_buffering 0
<IfModule mod_env.c>
SetEnv htaccessWorking true
</IfModule>
</IfModule>
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddType application/wasm wasm
AddEncoding gzip svgz
# Serve ESM javascript files (.mjs) with correct mime type
AddType text/javascript js mjs
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
<IfModule pagespeed_module>
ModPagespeed Off
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.*) remote.php [QSA,L]
RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
RewriteRule ^ocm-provider/?$ index.php [QSA,L]
RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>
# Clients like xDavv5 on Android, or Cyberduck, use chunked requests.
# When FastCGI or FPM is used with apache, requests arrive to Nextcloud without any content.
# This leads to the creation of empty files.
# The following directive will force the problematic requests to be buffered before being forwarded to Nextcloud.
# This way, the "Transfer-Encoding" header is removed, the "Content-Length" header is set, and the request content is proxied to Nextcloud.
# Here are more information about the issue:
# - https://docs.cyberduck.io/mountainduck/issues/fastcgi/
# - https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-webdav
<IfModule mod_setenvif.c>
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
</IfModule>
# Apache disabled the sending of the server-side content-length header
# in their 2.4.59 patch updated which breaks some use-cases in Nextcloud.
# Setting ap_trust_cgilike_cl allows to bring back the usual behaviour.
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=68973
<IfModule mod_env.c>
SetEnv ap_trust_cgilike_cl
</IfModule>
AddDefaultCharset utf-8
Options -Indexes
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
ErrorDocument 403 /index.php/error/403
ErrorDocument 404 /index.php/error/404
Nextcloud occ:list system
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloud.sjengkraftkompenei.nl",
"d.sjengkraftkompenei.nl"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.4.1",
"overwrite.cli.url": "https:\/\/cloud.sjengkraftkompenei.nl",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "vzmn_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "NL",
"default_language": "nl",
"default_locale": "nl_NL",
"installed": true,
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"maintenance_window_start": 1,
"defaultapp": "dashboard",
"maintenance": false,
"loglevel": 2,
"app_install_overwrite": [
"groupfolders",
"occweb",
"apporder",
"l10n_override",
"onlyoffice",
"side_menu"
],
"onlyoffice": {
"editors_check_interval": "0"
},
"theme": ""
}
}
Apps
Enabled:
- activity: 3.0.0
- app_api: 4.0.3
- bruteforcesettings: 3.0.0
- calendar: 5.0.8
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contacts: 6.1.1
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- deck: 1.14.2
- external: 5.5.2
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- groupfolders: 18.0.8
- impersonate: 1.17.0
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- nextcloud_announcements: 2.0.0
- notes: 4.11.0
- notifications: 3.0.0
- oauth2: 1.18.1
- onlyoffice: 9.5.0
- password_policy: 2.0.0
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- side_menu: 4.0.1
- snappymail: 2.38.2
- spreed: 20.1.0
- support: 2.0.0
- systemtags: 1.20.0
- tasks: 0.16.1
- text: 4.1.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0
- encryption: 2.18.0
- files_external: 1.22.0
- mail: 4.0.11 (installed 4.0.11)
- photos: 3.0.2 (installed 2.5.0)
- survey_client: 2.0.0 (installed 1.17.0)
- suspicious_login: 8.0.0
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0
- webhook_listeners: 1.1.0-dev (installed 1.1.0-dev)
- whiteboard: 1.0.4 (installed 1.0.4)
Please let me know if I need to supply any more info on the issue for you. In advance very thankful for any help on this issue!
~ Ravioli