Large video playback issues on Firefox

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.8
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.2 LTS (Docker container: Debian 13.1)
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.65
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.29.1
  • PHP version (e.g, 8.3):
    • 8.3.25
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • For a while (minimum multiple months), can’t remember if it was always the case
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Playing back video files is broken in Firefox if a video is too large for the buffer to keep up, and even then it sometimes still breaks. On medium-sized videos I’ve noticed it stop, buffer, give up after almost filling the buffer enough, restart fetching the buffer, and do that for forever, making playing back videos impossible. It seems to try and create multiple connections at times. On Chrome it works fine every time, even if my internet connection makes it slow at times.

Steps to replicate it:

  1. Stream a video file from Firefox

Log entries

Apps

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - maps: 1.6.0
  - memories: 7.6.2
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.3
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - previewgenerator: 5.10.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recognize: 9.0.7
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.1.4
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflow_media_converter: 1.15.1
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - calendar: 5.3.1 (installed 5.3.1)
  - contacts: 7.1.3 (installed 7.1.3)
  - encryption: 2.19.0
  - files_external: 1.23.0
  - mail: 5.1.2 (installed 5.1.2)
  - photos: 4.0.0 (installed 4.0.0-dev.1)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0

hi, what is the value of client_max_body_size in your nginx config file ?

Here’s all the relevant nginx configs:

client_max_body_size 0;
proxy_max_temp_file_size 0;

ssl_prefer_server_ciphers on;

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;" always;

server {
    listen 80;
    server_name<<-->>;
    return 301 https://$host$request_uri;
}

#nextcloud
server {
    http2 on;
    listen 443 ssl;
    ssl_certificate <<-->>;
    ssl_certificate_key <<-->>;

    server_name <<-->>;

    location / {
        proxy_pass http://nextcloud:80;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        #fix client upload timeout for batched uploads
        fastcgi_send_timeout 3600;
        fastcgi_connect_timeout 3600;
        proxy_connect_timeout 3600;
        proxy_send_timeout 3600;
        proxy_read_timeout 3600;
        send_timeout 3600;
    }

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

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

    error_page 497 https://$host:$server_port$request_uri;
}

And here’s the Nextcloud config.php:

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'overwritehost' => '<<-->>',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'https://<<-->>',
  'trusted_proxies' =>
  array (
    0 => '172.18.0.2',
  ),
  'upgrade.disable-web' => true,
  'instanceid' => '<<-->>',
  'passwordsalt' => '<<-->>',
  'secret' => '<<-->>',
  'trusted_domains' =>
  array (
    0 => '<<-->>',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '31.0.8.1',
  'dbname' => '<<-->>',
  'dbhost' => 'nextcloud-postgres',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '<<-->>',
  'dbpassword' => '<<-->>',
  'installed' => true,
  'maintenance_window_start' => 1,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-redis',
    'port' => 6379,
  ),
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\HEIC',
    2 => 'OC\\Preview\\TIFF',
    3 => 'OC\\Preview\\Movie',
  ),
  'memories.gis_type' => 2,
  'memories.vod.disable' => false,
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'loglevel' => 1,
  'maintenance' => false,
  'app_install_overwrite' =>
  array (
    0 => 'maps',
  ),
  'memories.vod.external' => true,
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.connect' => 'nextcloud-go-vod:47788',
  'memories.vod.qf' => 25,
  'memories.vod.nvenc' => true,
  'memories.vod.use_gop_size' => true,
  'memories.vod.nvenc.temporal_aq' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '<<-->>',
  'mail_domain' => '<<-->>',
  'mail_smtpauth' => true,
  'mail_smtphost' => '<<-->>',
  'mail_smtpport' => '465',
  'mail_smtpname' => '<<-->>',
  'mail_smtppassword' => '<<-->>',
);

Nextcloud environmental variables:

  PHP_MEMORY_LIMIT: "1G"
  PHP_UPLOAD_LIMIT: "5G"
  PHP_OPCACHE_MEMORY_CONSUMPTION: "512M"
  TRUSTED_PROXIES: "172.18.0.2"
  OVERWRITEHOST: "<<-->>"
  OVERWRITEPROTOCOL: "https"
  NEXTCLOUD_TRUSTED_DOMAINS: "<<-->>"
  OVERWRITECLIURL: "https://<<-->>"

But I’m not sure it has to do with the config, since it works fine on Chrome but not on Firefox for me, as well as that I can download the file without issue on both, it’s only streaming (on Firefox) that breaks.

when you watch a video, at the moment when it lags, you do not have an error in the nginx logs?

you are using Firefox on Windows or Linux?

Do you have an extension that reloads web pages?

  1. No errors in the nginx logs
  2. Windows
  3. Nope, I ran all tests in incognito mode with no extensions

Here’s what the network logs look like when playing a medium-size video that I mentioned:

The connection seems to constantly start and stop, I don’t know why. Oftentimes, when it closes, the buffer resets. It very much feels like a client-side issue.

@Redex
You have the error NS_ERROR_NET_PARTIAL_TRANSFER

Common Causes and Fixes:

  1. Client Body Buffer Size
    If the file size is larger than the buffer size allocated by Nginx, it might cause partial transfer issues. Increase the buffer size with these settings in the http (nano /etc/nginx/nginx.conf) or server block (nano /etc/nginx/sites-available/default) of your Nginx configuration:
 client_body_buffer_size 16K;   # Increase buffer size (adjust as necessary)
 client_max_body_size 20M;      # Set max body size (adjust as necessary)
  1. Proxy Buffering
    If you’re using Nginx as a reverse proxy, and proxy buffering is misconfigured, it can cause incomplete file transfers.Add these to your proxy configuration to disable proxy buffering:
 location / {
 #.....   
     # Disable proxy buffering
     proxy_buffering off;
     proxy_request_buffering off;
 #.....
 }
  1. Timeouts
    Large files can take longer to transfer, so it’s important to adjust your timeout settings accordingly:
 proxy_connect_timeout 1200s;
 proxy_read_timeout 1200s;
 proxy_send_timeout 1200s;

I’m pretty sure that’s just Firefox being weird. You can see it occurs only once, every other request doesn’t have the NS_ERROR_NET_PARTIAL_TRANSFER. Oftentimes, none of the requests will even have the NS_ERROR_NET_PARTIAL_TRANSFER error. Here’s another instance of the same issue occurring, and this time the error doesn’t appear:

The “Blocked” errors are I’m pretty sure misnomers, I see similar errors in Chrome sometimes and they’re labeled “Canceled”, so I think these are probably also canceled requests that are just wrongly labeled in Firefox.

Secondly, I don’t think the fixes you provide will work, since I can download the files without issue, it’s only streaming that is problematic. Plus, the issue only occurs on Firefox, so one would assume that Chrome would be equally affected if it were due to backend misconfiguration. Also, most of those fixes I’m already using. I’ll try adding the settings I’m not using tho.

I tried it with all of the suggested changes and the issue remains the same.

Hi, I’ve done everything I can to help you, maybe you should report the problem on a Firefox forum, or someone else will help you on this forum.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.