nextcloud / nextcloud/nextcloud-talk-recording

HTTPError: 403 on call recording

Open
#30 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage
Dominant language
Python
Stars
34
Forks
16
Avg merge
5d 5h
Merged PRs (30d)
4

Description

Steps to reproduce
  1. Configure AIO
  2. Start a call from talk
  3. Record the call
Expected behavior

The call is recorded

Actual behavior

Call was not recorded

Other information
Host OS

Unraid

Output of sudo docker info
Click to expand!

Client:
Version: 27.0.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.15.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx

Server:
Containers: 66
Running: 65
Paused: 0
Stopped: 1
Images: 62
Server Version: 27.0.3
Storage Driver: btrfs
Btrfs:
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2 nvidia
Default Runtime: runc
Init Binary: docker-init
containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.6.56-Unraid
Operating System: Slackware 15.0 x86_64 (post 15.0 -current)
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 125.7GiB
Name: Param
ID: edcf8827-2444-4e1e-9394-14cdc31dd9a3
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support

Docker run command or docker-compose file that you used
Other valuable info
  1. docker logs nextcloud-aio-talk-recording
Click to expand!

docker logs nextcloud-aio-talk-recording

  • Serving Flask app 'nextcloud.talk.recording.Server'
  • Debug mode: off
    WARNING:selenium.webdriver.common.selenium_manager:The geckodriver version (0.34.0) detected in PATH at /usr/bin/geckodriver might not be compatible with the detected firefox version (131.0.2); currently, geckodriver 0.35.0 is recommended for firefox 131.*, so it is advised to delete the driver in PATH and retry
    ERROR:nextcloud.talk.recording.BackendNotifier:Failed to send message to backend, 3 retries left!
    Traceback (most recent call last):
    File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
    response.raise_for_status()

File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store
ERROR:nextcloud.talk.recording.BackendNotifier:Failed to send message to backend, 2 retries left!
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store
ERROR:nextcloud.talk.recording.BackendNotifier:Failed to send message to backend, giving up!
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store
ERROR:nextcloud.talk.recording.Server:Failed to stop recording: https://cloud.example.com/ z2m7j4i2
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/Server.py", line 231, in _stopRecordingService
service.stop(actorType, actorId)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/Service.py", line 297, in stop
BackendNotifier.uploadRecording(self.backend, self.token, self._fileName, self.owner)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 215, in uploadRecording
doRequest(backend, uploadRequest)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 76, in doRequest
doRequest(backend, request, retries - 1)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 76, in doRequest
doRequest(backend, request, retries - 1)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nextcloud/talk/recording/BackendNotifier.py", line 72, in doRequest
response.raise_for_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud.example.com/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store

2. Going to the URL from browser gives following error in nextcloud log:

{"reqId":"VDWC1nYewz9FOpNRn0p8","level":2,"time":"2024-11-23T05:07:40+00:00","remoteAddr":"192.168.1.154","user":"priyanku","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/recording/z2m7j4i2/store","message":"Request does not pass strict cookie check","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36","version":"30.0.2.2","data":[],"id":"674166b5f38e4"}

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 with nextcloud/talk/recording/BackendNotifier.py, especially doRequest and uploadRecording, then trace the call from nextcloud/talk/recording/Server.py::_stopRecordingService. Reproduce the recording flow using the provided Docker logs and verify that the upload to the recording endpoint completes without the 400/403 errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.