Nextcloud version (eg, 18.0.2): 19.0.2.
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): NGINX latest
PHP version (eg, 7.1): 7.4
The issue you are facing:
When I log on to my NC instance I get the username/pass screen. Then the totp screen.
After login is successful I should get redirected to the normal landing page (files I think?), but instead the page is corrupted as shown below. It does not matter which browsers I test this with and whether I am remote or on my lan. Even on the phone it looks the same. When I click on one of the apps (files, email, etc.) I go through to the normal page and everything works fine from there. When I click on skip to main content or navigation of app I just get returned to the same corrupted page…
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Log in using user/pass
- Enter totp token
- Voilá
The output of your Nextcloud log in Admin > Logging:
{"reqId":"R5rOKG3BO3izGM8gjf2i","level":3,"time":"2020-09-01T14:38:21+00:00","remoteAddr":"143.179.26.129","user":"mark","app":"index","method":"POST","url":"/apps/text/session/sync","message":{"Exception":"Exception","Message":"Argument 1 passed to OCA\\Text\\Controller\\SessionController::sync() must be of the type int, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 170","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func"},{"file":"/var/www/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"TypeError","Message":"Argument 1 passed to OCA\\Text\\Controller\\SessionController::sync() must be of the type int, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 170","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"sync","class":"OCA\\Text\\Controller\\SessionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func"},{"file":"/var/www/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/text/lib/Controller/SessionController.php","Line":80},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Android 10; Mobile; rv:79.0) Gecko/79.0 Firefox/79.0","version":"19.0.2.2","id":"5f4f7f3435820"}
AND <<< I think the one below has been fixed, I had issues after upgrading to php 7.4, but I do not see this error anymore now.
{"reqId":"mmxphH3tFgpguh2IFHAS","level":3,"time":"2020-09-01T09:31:04+00:00","remoteAddr":"192.168.1.1","user":"--","app":"core","method":"GET","url":"/index.php/204","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":889,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":200,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[]]},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":216,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":331,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":109,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":287,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":883,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/nextcloud/lib/private/TemplateLayout.php","line":164,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":185,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":334,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/nextcloud/index.php","line":63,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[{"__class__":"Doctrine\\DBAL\\DBALException"},500]}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.12.1","version":"19.0.2.2","id":"5f4f7f3435c27"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
server {
if ($host = my.website.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name my.website.com;
#Your DDNS adress, (e.g. from desec.io or no-ip.com)
listen 80 default_server;
location ^~ /.well-known/acme-challenge {
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
}
location / {
return 301 https://$host$request_uri;
}
location ^~ /.well-known/webfinger {
rewrite ^/\.well-known/webfinger /public.php?service=webfinger last;
}
}
server {
server_name my.website.com;
listen 443 ssl http2 default_server;
root /var/www/nextcloud/;
access_log /var/log/nginx/nextcloud.access.log main;
error_log /var/log/nginx/nextcloud.error.log warn;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
client_max_body_size 10240M;
location / {
rewrite ^ /index.php;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
location ~ \.(?:flv|mp4|mov|m4a)$ {
mp4;
mp4_buffer_size 100m;
mp4_max_buffer_size 1024m;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
try_files $fastcgi_script_name =404;
include fastcgi_params;
include php_optimization.conf;
fastcgi_pass php-handler;
fastcgi_param HTTPS on;
}
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
include php_optimization.conf;
fastcgi_pass php-handler;
fastcgi_param HTTPS on;
}
location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}
location ~ \.(?:css|js|woff|svg|gif|png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
expires 30d;
}
ssl_certificate /etc/letsencrypt/live/my.website.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/my.website.com/privkey.pem; # managed by Certbot
}
The output of your Apache/nginx/system log in /var/log/____
:
2020/09/02 00:00:07 [error] 588#588: *1883 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "PROPFIND /.well-known/webfinger HTTP/1.1", host: "my.website.com", referrer: "https://my.website.com/settings/admin/overview"
2020/09/02 00:04:00 [error] 588#588: *1881 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "GET /.well-known/webfinger?resource=acct:name@my.website.com HTTP/1.1", host: "my.website.com"
2020/09/02 00:04:07 [error] 588#588: *1881 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "GET /.well-known/webfinger?resource=acct:name@my.website.com HTTP/1.1", host: "my.website.com"
2020/09/02 00:04:15 [error] 588#588: *1881 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "GET /.well-known/webfinger HTTP/1.1", host: "my.website.com"
2020/09/02 00:52:37 [error] 596#596: *121 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "PROPFIND /.well-known/webfinger HTTP/1.1", host: "my.website.com", referrer: "https://my.website.com/settings/admin/overview"
2020/09/02 04:14:32 [error] 596#596: *1973 FastCGI sent in stderr: "Access to the script '/var/www/nextcloud/apps/firstrunwizard/img/Nextcloud.mp4' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 192.168.1.1, server: my.website.com, request: "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "my.website.com", referrer: "https://my.website.com/apps/files/?dir=/&fileid=161"
2020/09/02 04:14:38 [error] 596#596: *1973 FastCGI sent in stderr: "Access to the script '/var/www/nextcloud/apps/firstrunwizard/img/Nextcloud.mp4' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 192.168.1.1, server: my.website.com, request: "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "my.website.com", referrer: "https://my.website.com/apps/files/?dir=/&fileid=161"
2020/09/02 04:15:06 [error] 596#596: *2068 access forbidden by rule, client: 192.168.1.1, server: my.website.com, request: "PROPFIND /.well-known/webfinger HTTP/1.1", host: "my.website.com", referrer: "https://my.website.com/settings/admin/overview"