nextcloud / nextcloud/assistant
Generated images appear as empty white squares in Nextcloud Assistant app previews due to MIME detection error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 43
- Avg merge
- 18h 49m
- Merged PRs (30d)
- 3
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Install and enable the
text2image_stablediffusion2ExApp in Nextcloud (via AppAPI, manual install daemon). - In the Nextcloud Assistant app, select "Work with images" > "Generate image", enter a prompt (e.g., "sun"), and submit.
- Wait for the task to complete (ExApp logs show successful generation and upload with 201 Created).
Expected behaviour
The generated image should display as a preview in the Assistant UI, showing the AI-generated content based on the prompt (e.g., an image of the sun).
Actual behaviour
The Assistant UI shows an empty white square (or placeholder) instead of the generated image. Server logs show the error: mime_content_type(): Icewind\\Streams\\CallbackWrapper::stream_cast is not implemented! at /var/www/nextcloud/apps/assistant/lib/Service/AssistantService.php#661. The file uploads successfully (201 Created in ExApp logs), but previews fail due to MIME detection issues on the task output stream.
Screenshot:
Server configuration
Web server: Apache
Database: MariaDB (via ProxySQL)
PHP version: 8.3
Nextcloud version: 32.0.0.13
ExApp Logs
HP_SHARED_KEY is set, creating /frpc.toml configuration file...
Found /certs/frp directory. Creating configuration with TLS certificates.
Starting frpc in the background...
Starting application: python3 main.py
2025-10-15 00:16:05.592 [I] [sub/root.go:142] start frpc service for config file [/frpc.toml]
2025-10-15 00:16:05.593 [I] [client/service.go:295] try to connect to server...
2025-10-15 00:16:05.603 [I] [client/service.go:287] [257b8d8dfee1d874] login to server success, get run id [257b8d8dfee1d874]
2025-10-15 00:16:05.603 [I] [proxy/proxy_manager.go:173] [257b8d8dfee1d874] proxy added: [text2image_stablediffusion2]
2025-10-15 00:16:05.605 [I] [client/control.go:168] [257b8d8dfee1d874] [text2image_stablediffusion2] start proxy success
INFO: Started server process [1]
INFO: Waiting for application startup.
TRACE: ASGI [1] Started scope={'type': 'lifespan', 'asgi': {'version': '3.0', 'spec_version': '2.0'}, 'state': {}}
TRACE: ASGI [1] Receive {'type': 'lifespan.startup'}
TRACE: ASGI [1] Send {'type': 'lifespan.startup.complete'}
INFO: Application startup complete.
INFO: Uvicorn running on unix socket /tmp/exapp.sock (Press CTRL+C to quit)
Loading pipeline components...: 100%|██████████| 7/7 [00:02<00:00, 2.43it/s]
2025-10-15 00:16:25,312 - main - INFO - Next task: 323
2025-10-15 00:16:25,312 - main - INFO - generating image
100%|██████████| 4/4 [00:23<00:00, 5.86s/it]
2025-10-15 00:16:56,493 - main - INFO - image generated: 31.18096158299886s
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 in apps/assistant/lib/Service/AssistantService.php around line 661 and reproduce the image-generation flow described in the issue, checking the server error and ExApp logs. Trace the task output stream used for MIME detection; done means generated images uploaded by text2image_stablediffusion2 display correctly in the Assistant preview instead of as white placeholders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100