nextcloud / nextcloud/ios

Missing metadata for chunked upload. The distributed cache does not hold the information of previous requests.

Open
#2,720 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

Steps to reproduce
  1. Try to upload videos >512 mb from iPhone
Actual behaviour

I got the following error message:

Missing metadata for chunked upload. The distributed cache does not hold the information of previous requests.

Screenshots

https://imgur.com/3EEbuvc

Logs

docker-compose log

nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:25 +0000] "PROPFIND /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 404 990 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:26 +0000] "MKCOL /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 201 606 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:26 +0000] "PUT /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61/1 HTTP/1.1" 412 865 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - - [01/Jan/2024:14:00:35 +0000] "GET /apps/files/api/v1/stats HTTP/1.1" 200 913 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
nextcloud-app-1    | XXX - - [01/Jan/2024:14:00:35 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 766 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
nextcloud-app-1    | XXX - - [01/Jan/2024:14:00:35 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 922 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:35 +0000] "PROPFIND /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 207 1456 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:35 +0000] "PUT /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61/1 HTTP/1.1" 412 865 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:40 +0000] "PROPFIND /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 207 1456 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:40 +0000] "PUT /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61/1 HTTP/1.1" 412 865 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:45 +0000] "PROPFIND /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 207 1456 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:45 +0000] "PUT /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61/1 HTTP/1.1" 412 865 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"
nextcloud-app-1    | XXX - XXX [01/Jan/2024:14:00:50 +0000] "PROPFIND /remote.php/dav/uploads/XXX/835B7240-482E-4988-822B-2FF3F588BD61 HTTP/1.1" 207 1456 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/4.9.6"

application communication.log

Additional information

I'm using Vultr Object Storage (S3) as primary storage. Single server with docker-compose.

What I tried, some config
   PHP_UPLOAD_LIMIT=100G
   APACHE_BODY_LIMIT=0
   NEXTCLOUD_UPLOAD_LIMIT=100G
  • apache2 config
   LimitRequestBody 0
  • finetune.ini
  pm = dynamic
  pm.max_children = 36
  pm.start_servers = 18
  pm.min_spare_servers = 1
  pm.max_spare_servers = 12
  
  opcache.enable=1
  opcache.enable_cli=1
  opcache.memory_consumption=128
  opcache.max_accelerated_files=10000
  opcache.huge_code_pages=1
  opcache.enable_file_override=1
  opcache.jit_buffer_size=128M
  opcache.jit=1255
  • docker-compose.yml
version: '3'

services:
  db:
    image: postgres:16.0-alpine3.18
    restart: always
    volumes:
      - /srv/nextcloud/data:/var/lib/postgresql/data:Z
    env_file:
      - .env
    networks:
      - internal

  redis:
    image: redis:7.2.1-alpine3.18
    restart: always
    volumes:
      - /srv/nextcloud/redis:/data
    networks:
      - internal

  app:
    image: nextcloud:27.1.5-apache
    restart: always
    hostname: 'XXX'
    expose:
      - 80
    volumes:
      - /srv/nextcloud/app:/var/www/html
      - ./finetune.ini:/usr/local/etc/php/conf.d/finetune.ini:ro
      - /opt/nextcloud/nextcloud-apache.conf:/etc/apache2/conf-enabled/nextcloud-apache.conf:ro
    env_file:
      - .env
    depends_on:
      - db
      - redis
    labels:
      - traefik.http.routers.nextcloud.rule=Host(`XXX`)
      - traefik.http.routers.nextcloud.tls=true
      - traefik.http.routers.nextcloud.tls.certresolver=lets-encrypt
      - traefik.http.services.nextcloud.loadbalancer.server.port=80
      - traefik.port=80
    networks:
      - web
      - internal

  cron:
    image: nextcloud:27.1.5-apache
    restart: always
    volumes:
      - /srv/nextcloud/app:/var/www/html:z
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis
    networks:
      - internal

networks:
    web:
        external: true
    internal:
        external: false
Environment data

iOS version: iOS 17.1.2

Nextcloud iOS app version: 4.9.6.1

Server operating system: linux (docker)

Web server: Apache

Database: Postgres

PHP version: latest docker image from dockerhub

Nextcloud version: 27.1.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the iOS 4.9.6 upload of a video over 512 MB against the documented Docker Compose setup, focusing on the DAV upload endpoint and repeated PUT 412 responses. Review the distributed-cache, S3 primary-storage, and chunked-upload paths; no source file or test is named. Done means the upload completes without the missing-metadata error and regression coverage is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, docker, ios, postgres, redis, swift
Domain
backend, databases, infrastructure, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.