nextcloud / nextcloud/assistant
Transcription Fails using localai backend - Content security policy block
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 43
- Avg merge
- 18h 49m
- Merged PRs (30d)
- 3
Description
Which version of assistant are you using?
2.8.0
Which version of Nextcloud are you using?
v31.0.9.1
Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.
firefox on linux v142.0.1
Describe the Bug
The browser console shows:
Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at blob:https://my.server.fake/somelonghash because it violates the following directive: “connect-src 'self'”
Steps to reproduce:
Assistant->Work With Audio->Tanscribe Audio
Click allow microphone if needed.
(starts recording) ->click green check mark when done recording
Nothing happens
I am an amateur so keep that in mind but...
changing:
protected $allowedConnectDomains = [
'\'self\'',
];
to:
protected $allowedConnectDomains = [
'\'self\'',
'data:',
'blob:',
];
in:
lib/public/AppFramework/Http/ContentSecurityPolicy.php
does seem to fix.
Expected Behavior
The audio is saved and the button to transcribe is illuminated.
To Reproduce
Assistant->Work With Audio->Tanscribe Audio
Click allow microphone if needed.
(starts recording) ->click green check mark when done recording
Nothing happens
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
Reproduce the failure through Assistant → Work With Audio → Transcribe Audio and inspect the browser console for the connect-src violation. Read lib/public/AppFramework/Http/ContentSecurityPolicy.php, especially the allowedConnectDomains configuration, and verify that the recording completes, the audio is saved, and the transcription button becomes available without the CSP block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100