nextcloud / nextcloud/server

[Bug]: mime_content_type(): Icewind\\Streams\\CallbackWrapper::stream_cast is not implemented

Open
#54,669 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug feature: TaskProcessing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

I'm getting this error where requesting /ocs/v2.php/taskprocessing/tasks_provider/{task}/file/{fileid}

{
  "reqId": "**REDACTED**",
  "level": 2,
  "time": "2025-08-26T15:19:52+00:00",
  "remoteAddr": "10.9.0.200",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/ocs/v2.php/taskprocessing/tasks_provider/1469/file/992499?format=json",
  "message": "mime_content_type(): Icewind\\Streams\\CallbackWrapper::stream_cast is not implemented! at /var/www/nextcloud/core/Controller/TaskProcessingApiController.php#411",
  "userAgent": "ExApp/stt_whisper2/2.2.1 (httpx/0.28.1)",
  "version": "31.0.8.1",
  "data": {
    "app": "PHP"
  }

The file is an opus ogg audio file, manually running mime_content_type('file.opus'); returns audio/ogg

Steps to reproduce

HTTP GET to /ocs/v2.php/taskprocessing/tasks_provider/{task}/file/{fileid} where file is an opus file.

Expected behavior

mime_content_type() should return 'audio/ogg' without any error or warning.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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 at core/Controller/TaskProcessingApiController.php line 411 and reproduce the GET request for an opus file at the task-processing file endpoint. Trace the stream passed to mime_content_type(); done means the request identifies the file as audio/ogg without the stream_cast warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.