nextcloud browser view broken

Problems with packages? Post here, using [tags] of the package name.

nextcloud browser view broken

Postby loki279 » Thu Mar 24, 2022 1:34 pm

Hi,

I don't know if this is since the last update, I'm running nextcloud 23.0.2-1 on a Pi3.
Anyway, the view of the browsers interface looks messed up, the login screen look normal but when I login as user or root, the interface is broken:

Screenshot_20220324_142844.png
Screenshot_20220324_142844.png (63.28 KiB) Viewed 1066 times


I tried different browsers (firefox and chrome) and also tried linux and windows machines, it's the same everywhere.
nextcloud itself works normal, just the browser interface is unusable.
I do not run any custom theme on nextcloud, just standard settings.

Thanks for your help!
loki279
 
Posts: 54
Joined: Tue Mar 07, 2017 7:59 am

Re: nextcloud browser view broken

Postby loki279 » Fri Mar 25, 2022 8:15 am

I did some reasearch by myself. The problem seems related to scc and js content. In the developer console I can see that files are missing:

$this->bbcode_second_pass_code('', '
GEThttps://servername/css/core/9568-3ffa-server.css?v=b92d206521717ac032f8aa58d3c7ff2f-4072dd3e-0
[HTTP/2 404 Not Found 6ms]

GEThttps://servername/css/icons/icons-vars.css?v=1648193853
[HTTP/2 404 Not Found 4ms]

GEThttps://servername/css/core/9568-3ffa-css-variables.css?v=b92d206521717ac032f8aa58d3c7ff2f-4072dd3e-0
[HTTP/2 404 Not Found 5ms]

GEThttps://servername/css/dashboard/baf6-3ffa-dashboard.css?v=b92d206521717ac032f8aa58d3c7ff2f-baf661bc-0
[HTTP/2 404 Not Found 7ms]

GEThttps://servername/css/activity/96db-3ffa-style.css?v=b92d206521717ac032f8aa58d3c7ff2f-96dba882-0
[HTTP/2 404 Not Found 8ms]

GEThttps://servername/css/text/83e2-3ffa-icons.css?v=b92d206521717ac032f8aa58d3c7ff2f-83e266cb-0
[HTTP/2 404 Not Found 7ms]

GEThttps://servername/css/notifications/7a5a-3ffa-styles.css?v=b92d206521717ac032f8aa58d3c7ff2f-7a5a3468-0
[HTTP/2 404 Not Found 12ms]

GEThttps://servername/css/user_status/54ac-3ffa-user-status-menu.css?v=b92d206521717ac032f8aa58d3c7ff2f-54acb57a-0
[HTTP/2 404 Not Found 11ms]

GEThttps://servername/js/core/merged-template-prepend.js?v=4072dd3e-0
[HTTP/2 404 Not Found 37ms]

GEThttps://servername/js/activity/activity-sidebar.js?v=4072dd3e-0
[HTTP/2 404 Not Found 75ms]

Loading failed for the <script> with source “https://servername/js/core/merged-template-prepend.js?v=4072dd3e-0”. dashboard:31:1
Loading failed for the <script> with source “https://servername/js/activity/activity-sidebar.js?v=4072dd3e-0”. dashboard:42:1
GEThttps://servername/css/icons/icons-vars.css?v=1648193853
')

I replaced the actual server address with "servername".

I cannot find these files in the webroot of the server, actually the css and js folders are not even there. Shouldn't these folders and files be part of the provided package? I just updated the package to version 23.0.3-1 and this did not change anything.

Also the integrity problems are not resolved with this package: viewtopic.php?f=15&t=15892

Can someone confirm this problem with the arch linux arm package? I'm running on a Pi3 32bit:

$this->bbcode_second_pass_code('', '
Name : nextcloud
Version : 23.0.3-1
Description : A cloud server to store your files centrally on a hardware controlled by you
Architecture : any
URL : https://nextcloud.com
Licenses : AGPL3
Groups : None
Provides : None
Depends On : php>=8.0.0 php<8.2.0 php-gd
Optional Deps : curl: for webcron jobs from within uwsgi [installed]
ffmpeg: for preview generation [installed]
libreoffice: for preview generation
mariadb: to use a local MariaDB server [installed]
memcached: to use a local memcached server
php-apcu: for caching with APCU [installed]
php-apache: to use the Apache web server
mod_itk: to use the Apache web server
php-fpm: to run in fastCGI process manager [installed]
php-imagick: for preview generation
php-imap: for external user authentication
php-intl: to increase language translation performance and fix sorting [installed]
php-memcached: for caching with memcached
php-pgsql: to use the PostgreSQL database backend
php-redis: for caching with redis
php-sqlite: to use the SQLite database backend [installed]
postgresql: to use a local PostgreSQL server
redis: to use a local Redis server
smbclient: for SMB/CIFS integration [installed]
sudo: for privilege elevation in occ command when not run as root [installed]
uwsgi-plugin-php: run as application container
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 416,94 MiB
Packager : Arch Linux ARM Build System <builder+xu3@archlinuxarm.org>
Build Date : Do 24 Mär 2022 23:38:43 UTC
Install Date : Fr 25 Mär 2022 07:15:19 UTC
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature
')

If this is not related to the package provided, I'll try to extract the missing files from the files provided by nextcloud. Also maybe someone could check by which package the related files are owned?

Thanks!
loki279
 
Posts: 54
Joined: Tue Mar 07, 2017 7:59 am

Re: nextcloud browser view broken

Postby loki279 » Fri Mar 25, 2022 8:29 am

I could solve the issue by addapting to the new nginx configuration from the lastest nextcloud installtion guide:

https://docs.nextcloud.com/server/lates ... nginx.html

$this->bbcode_second_pass_code('', '
upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php/php7.4-fpm.sock;
}

# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default "immutable";
}


server {
listen 80;
listen [::]:80;
server_name cloud.example.com;

# Enforce HTTPS
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name cloud.example.com;

# Path to the root of your installation
root /var/www/nextcloud;

# Use Mozilla's guidelines for SSL/TLS settings
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;

# HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;

# set max upload size and increase upload timeout:
client_max_body_size 512M;
client_body_timeout 300s;
fastcgi_buffers 64 4K;

# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
#pagespeed off;

# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;

# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;

# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists
# on the server. In particular, if that directory contains an index.php file,
# that file is correctly served; if it doesn't, then the request is passed to
# the front-end controller. This consistent behaviour means that we don't need
# to specify custom rules for certain paths (e.g. images and other assets,
# `/updater`, `/ocm-provider`, `/ocs-provider`), and thus
# `try_files $uri $uri/ /index.php$request_uri`
# always provides the desired behaviour.
index index.php index.html /index.php$request_uri;

# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.

location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }

location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }

# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}

# Rules borrowed from `.htaccess` to hide certain paths from clients
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }

# Ensure this block, which passes PHP files to the PHP process, is above the blocks
# which handle static assets (as seen below). If this block is not declared first,
# then Nginx will encounter an infinite rewriting loop when it prepends `/index.php`
# to the URI, resulting in a HTTP 500 error response.
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;

fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;

try_files $fastcgi_script_name =404;

include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;

fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass php-handler;

fastcgi_intercept_errors on;
fastcgi_request_buffering off;

fastcgi_max_temp_file_size 0;
}

location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463, $asset_immutable";
access_log off; # Optional: Don't log access to assets

location ~ \.wasm$ {
default_type application/wasm;
}
}

location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}

# Rule borrowed from `.htaccess`
location /remote {
return 301 /remote.php$request_uri;
}

location / {
try_files $uri $uri/ /index.php$request_uri;
}
}
')

There must have been some changes internaly that moved css and js content to a different place.
loki279
 
Posts: 54
Joined: Tue Mar 07, 2017 7:59 am


Return to Packages

Who is online

Users browsing this forum: No registered users and 9 guests