-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Assistant on iOS always shows "Could not generate response" despite task completing successfully
Assistant version: 2.13.0
Nextcloud server version: 32.0.6
iOS app version: Nextcloud-iOS/33.0.3
OpenAI integration version: 3.10.1
Server setup: Docker (FPM + nginx), Raspberry Pi 5, aarch64, behind Cloudflare Tunnel
Summary
The Nextcloud Assistant always displays a red "Could not generate response. Please try again." error banner on iOS, even when the task has completed successfully on the server. The response is only visible after dismissing the error, closing the conversation, and reopening it.
This issue has taken multiple hours to diagnose across an extended troubleshooting session and remains unresolved from the user experience perspective.
Steps to reproduce
- Open Nextcloud iOS app (v33.0.3) connected to a Nextcloud 32.0.6 server
- Open the Assistant and send any chat message
- Observe red error banner: "Could not generate response. Please try again."
- Dismiss the banner, exit the conversation, and re-enter
- The response is present and correct — the task completed successfully
Server-side evidence that tasks are completing
Running occ taskprocessing:task:list confirms tasks complete in 1–9 seconds with STATUS_SUCCESSFUL and no error message:
- status: STATUS_SUCCESSFUL
- scheduledAt: 1774206834
- startedAt: 1774206834
- endedAt: 1774206843
- error_message:
nginx logs confirm the iOS app is making a valid check_session API call — but with a double slash:
"GET //ocs/v2.php/apps/assistant/chat/check_session?sessionId=17 HTTP/1.1" 200 101
Note the //ocs/ double slash, which may indicate a URL construction bug in the iOS client.
What has been investigated and ruled out
- ✅ OpenAI API connectivity confirmed working
- ✅
notify_pushinstalled, configured, and passing all self-tests - ✅ iOS app registered with push server (
POST /ocs/v2.php/apps/notifications/api/v2/pushreturns 201) - ✅ Background worker running (
OC\TaskProcessing\SynchronousBackgroundJob) - ✅ Cron mode set and
cron.phpfiring every 5 minutes - ✅ WebSockets enabled in Cloudflare
- ✅ notify_push self-test passes all 6 checks
- ❌ No websocket connections from iOS app appearing in notify_push logs despite push registration succeeding
Suspected root cause
The iOS app (v33.0.3) is one major version ahead of the server (NC 32.0.6). It appears the check_session polling behaviour and/or the task result handling API has changed between NC 32 and NC 33, causing the iOS app to misinterpret a pending/completed task response as a failure.
The double slash in //ocs/v2.php/apps/assistant/chat/check_session is also suspicious and may indicate a URL construction regression in the iOS client.
Expected behaviour
When a task completes successfully, the iOS app should display the response inline without requiring the user to dismiss an error banner and reopen the conversation.
Actual behaviour
Every single Assistant interaction on iOS shows a red error banner despite the task succeeding. The user must close and reopen the conversation to see the response. This makes the Assistant functionally unusable on mobile.
Additional context
This issue affects a self-hosted production instance serving 10 family users. The desktop experience (browser) works correctly. The issue appears specific to the iOS native app and the interaction between the NC33 iOS client and a NC32 server.
Please consider:
- Documenting the supported server version matrix for each iOS app release
- Fixing the double slash URL construction in the iOS
check_sessioncall - Adding a version compatibility check that warns users when the iOS app is ahead of the server
Happy to provide further logs or testing if needed.