jitsi/jitsi-upload-integrations

Upload to Dropbox

Closed this issue · 1 comments

I followed
https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-web-integrations
to get the Dropbox App running. Authentication and starting the recording works fine.

I installed the two scripts on a dedicated jibri server by

curl https://raw.githubusercontent.com/jitsi/jitsi-upload-integrations/master/dropbox/dropbox_uploader.sh > /usr/bin/dropbox_uploader.sh
curl https://raw.githubusercontent.com/jitsi/jitsi-upload-integrations/master/jitsi_uploader.sh > /usr/bin/jitsi_uploader.sh
chmod +x /usr/bin/jitsi_uploader.sh
chmod +x /usr/bin/dropbox_uploader.sh
edit /etc/jitsi/jibri/jibri.conf
...
    finalize-script = "/usr/bin/jitsi_uploader.sh"	
...
systemctl restart jibri.service

When stopping the recording

I get a 400 Bad Request.
@damencho can you give advice?

2021-08-09 16:18:34.309 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Mon 09 Aug 2021 04:18:33 PM CEST START Uploader tool received path "/var/jibri-recordings/zkyvqpogclfzztga"
2021-08-09 16:18:34.309 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Mon 09 Aug 2021 04:18:33 PM CEST total 248 -rw-r--r-- 1 jibri jibri 247283 Aug 9 16:18 foobarbassdfsdfsdfsdfsdf_2021-08-09-16-18-18.mp4 -rw-r--r-- 1 jibri jibri 283 Aug 9 16:18 metadata.json
2021-08-09 16:18:34.309 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Upload method: dropbox
2021-08-09 16:18:34.309 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Upload Candidate foobarbassdfsdfsdfsdfsdf_2021-08-09-16-18-18.mp4
2021-08-09 16:18:34.309 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Uploading file /var/jibri-recordings/zkyvqpogclfzztga/foobarbassdfsdfsdfsdfsdf_2021-08-09-16-18-18.mp4 to path /Recordings/foobarbassdfsdfsdfsdfsdf on 2021-08-09 16-18.mp4
2021-08-09 16:18:34.334 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log()  > Uploading "/var/jibri-recordings/zkyvqpogclfzztga/foobarbassdfsdfsdfsdfsdf_2021-08-09-16-18-18.mp4" to "/Recordings/foobarbassdfsdfsdfsdfsdf on 2021-08-09 16-18.mp4"... FAILED
2021-08-09 16:18:34.334 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() An error occurred requesting /upload: HTTP/1.1 400 Bad Request
2021-08-09 16:18:34.335 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Some error occured. Please check the log.
2021-08-09 16:18:34.335 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() skipping metadata
2021-08-09 16:18:34.335 INFO: [113] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Mon 09 Aug 2021 04:18:34 PM CEST END FAILURE Moving remaining upload files in "/var/jibri-recordings/zkyvqpogclfzztga" to "/tmp/failed"
2021-08-09 16:18:34.335 INFO: [99] org.jitsi.jibri.service.impl.FileRecordingJibriService.log() Recording finalize script finished with exit value 1
2021-08-09 16:18:34.336 INFO: [99] org.jitsi.jibri.status.JibriStatusManager.log() Busy status has changed: BUSY -> IDLE
2021-08-09 16:18:34.336 FINE: [99] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status
2021-08-09 16:18:34.336 INFO: [99] org.jitsi.jibri.api.xmpp.XmppApi.log() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections
2021-08-09 16:18:34.336 INFO: [114] org.jitsi.jibri.JibriManager.log() No service active, ignoring stop
2021-08-09 16:18:37.323 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status
2021-08-09 16:19:37.323 FINE: [17] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status

Fixed it.

Reason for the 401 Bad Gateway error was a missing permission in the dropbox app setting.

The permission setting cannot be found in the dropbox account but under developer apps:

https://www.dropbox.com/developers/apps

After setting read and write permissions for "Files and folders" and "Collaboration" (for files and sharing) uploading the video after stopping the recording worked out.