First run wizard: video does not play (HTTP 302)

Hi there i don’t see the video playing when the first run wizard runs, so i fear my configuration doesn’t work fully.

Nextcloud version: 18.0.3
Operating system: Ubuntu 18.04
Nginx version: 1.14.0
PHP version: 7.2.24
Tested with:
Firefox: 74.0
Chrome: 80.0.3987

The issue you are facing:
Video in first run wizard does not play. The first page is just a solid colour. For some reason when it video is requested via first run wizard the webserver returns 302. When clicking on the video file in the files app the video plays just fine.

Is this the first time you’ve seen this error?: No, it is reproducable.

Steps to replicate it:

  1. Create new user
  2. login
  3. Look at the screen / first page of first run wizard: is solid colour and the video does not play

Developers tools output for the Nextcloud.mp4 request:

Request URL: https://xxxxxxxxxxxxxx/apps/firstrunwizard/img/Nextcloud.webm
Request Method: GET
Status Code: 302 
Remote Address: xxxxxxxx:443
Referrer Policy: no-referrer
cache-control: no-store, no-cache, must-revalidate
content-security-policy: default-src 'self'; script-src 'self' 'nonce-xxxxxxST0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
content-type: text/html; charset=UTF-8
date: Wed, 25 Mar 2020 19:43:18 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
front-end-https: on
location: https://xxxxxxxxxxxxxx/apps/files/
pragma: no-cache
referrer-policy: no-referrer
server: nginx/1.14.0 (Ubuntu)
status: 302
strict-transport-security: max-age=31536000; includeSubDomains
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
:authority: xxxxxxxxxxxxxx
:method: GET
:path: /apps/firstrunwizard/img/Nextcloud.webm
:scheme: https
accept: */*
accept-encoding: identity;q=1, *;q=0
accept-language: de-DE,de;…
cache-control: no-cache
cookie: oc_sessionPassphrase=Axxxxxxo7; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocpdqbaho8li=86xxxxxxxjdsf4; nc_username=test3; nc_token=N8xxxxw; nc_session_id=86xxxxsf4
pragma: no-cache
range: bytes=0-
sec-fetch-dest: video
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (X11; Linux x86_64)…

The output of your nginx log in /var/log/nignx:

10.216.64.1 - - [25/Mar/2020:18:17:54 +0000] "GET /apps/firstrunwizard/wizard HTTP/1.0" 200 6889 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:18:17:57 +0000] "GET /apps/firstrunwizard/img/Nextcloud.webm HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:18:17:59 +0000] "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:18:18:22 +0000] "GET /apps/firstrunwizard/img/Nextcloud.webm HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:18:18:23 +0000] "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:18:18:25 +0000] "DELETE /apps/firstrunwizard/wizard HTTP/1.0" 200 2 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:13:50 +0000] "GET /apps/firstrunwizard/l10n/de.js?v=20cf6909-4 HTTP/1.0" 200 11719 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:13:50 +0000] "GET /apps/firstrunwizard/js/about.js?v=20cf6909-4 HTTP/1.0" 200 492 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:13:51 +0000] "GET /apps/firstrunwizard/img/info.svg?v=20cf6909 HTTP/1.0" 200 374 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:14:48 +0000] "GET /apps/firstrunwizard/js/about.js?v=20cf6909-4 HTTP/1.0" 200 492 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:14:48 +0000] "GET /apps/firstrunwizard/l10n/de.js?v=20cf6909-4 HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:14:49 +0000] "GET /apps/firstrunwizard/img/info.svg?v=20cf6909 HTTP/1.0" 200 374 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:15:34 +0000] "GET /apps/firstrunwizard/l10n/de.js?v=20cf6909-4 HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:15:34 +0000] "GET /apps/firstrunwizard/js/about.js?v=20cf6909-4 HTTP/1.0" 304 0 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:15:34 +0000] "GET /apps/firstrunwizard/img/info.svg?v=20cf6909 HTTP/1.0" 200 374 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0"
10.216.64.1 - - [25/Mar/2020:19:16:34 +0000] "GET /apps/firstrunwizard/js/activate.js?v=20cf6909-4 HTTP/1.0" 200 188 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:34 +0000] "GET /apps/firstrunwizard/js/about.js?v=20cf6909-4 HTTP/1.0" 200 492 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:34 +0000] "GET /apps/firstrunwizard/img/info.svg?v=20cf6909 HTTP/1.0" 200 374 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:44 +0000] "GET /apps/firstrunwizard/js/firstrunwizard.js HTTP/1.0" 200 338363 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:47 +0000] "GET /apps/firstrunwizard/wizard HTTP/1.0" 200 6889 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:50 +0000] "GET /apps/firstrunwizard/img/Nextcloud.webm HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:50 +0000] "DELETE /apps/firstrunwizard/wizard HTTP/1.0" 200 2 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:16:50 +0000] "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:17:04 +0000] "GET /apps/firstrunwizard/js/personalsettings.js?v=20cf6909-4 HTTP/1.0" 200 1772 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:17:04 +0000] "GET /css/firstrunwizard/b1d7-d551-personalsettings.css?v=fda597b6ffb1b23dc49386cfaa805a03-b1d71238-4 HTTP/1.0" 200 195 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:18:13 +0000] "GET /apps/firstrunwizard/wizard HTTP/1.0" 200 6889 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:18:14 +0000] "GET /apps/firstrunwizard/img/Nextcloud.webm HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:18:15 +0000] "GET /apps/firstrunwizard/img/Nextcloud.mp4 HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
10.216.64.1 - - [25/Mar/2020:19:18:19 +0000] "DELETE /apps/firstrunwizard/wizard HTTP/1.0" 200 2 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"

Nginx conf:

upstream php-handler {
    server unix:/var/run/php/php7.2-fpm.sock;
}

server {
    listen 80;
    listen [::]:80;
    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;

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

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

    location = /.well-known/carddav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host:$server_port/remote.php/dav;
    }

    # set max upload size
    client_max_body_size 512M;
    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/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;


    location / {
        rewrite ^ /index.php;
    }

  location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
        deny all;
    }
    location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }

    location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
        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;
        # Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        # Enable pretty urls
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

    location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
        try_files $uri/ =404;
        index index.php;
    }

    # Adding the cache control header for js, css and map files
    # Make sure it is BELOW the PHP block
    location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
        try_files $uri /index.php$request_uri;
        add_header Cache-Control "public, max-age=15778463";
        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;

    }

    location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
        try_files $uri /index.php$request_uri;
    }
}

I am having this same error on a Raspberry Pi 4 (4GB of RAM) running Ubuntu 20. I has also been occurring on machines running Raspbian.

Try adding “mp4|webm” to your config file:

  location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap|mp4|webm)$ {
        try_files $uri /index.php$request_uri;
    }
1 Like

Thank you that was it.
Just checked the documentation again and it was missing there:
https://docs.nextcloud.com/server/18/admin_manual/installation/nginx.html?highlight=nginx

But the change was already committed to github. So the next version of the manual will include it.

1 Like