[Bug]: mime_content_type(): Icewind\\Streams\\CallbackWrapper::stream_cast is not implemented
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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