HLS transcoding fail with: Cannot read properties of undefined (reading 'prefix')

My uploaded videos stuck with tag « TO TRANSCODE » and in the API: "waitTranscoding": true

When I click on « Run HLS transcoding » button I have this log in /var/www/peertube/storage/logs :

{"level":"info","message":"Creating hls transcoding job for https://video.mydomain.com/videos/watch/0d4e8f58-93fe-4ccc-8f36-9e6c62406915.","label":"video.mydomain.com:443","tags":["api","video"],"timestamp":"2024-10-02T12:57:56.888Z"}

{"level":"info","message":"Manually creating transcoding jobs for hls.","label":"video.mydomain.com:443","childrenResolutions":[],"maxResolution":608,"tags":["transcoding","0d4e8f58-93fe-4ccc-8f36-9e6c62406915"],"timestamp":"2024-10-02T12:57:56.938Z"}

{"level":"info","message":"Processing transcoding job bf45f0ea-41a5-4161-93c3-cb12e0a8dad4.","label":"video.mydomain.com:443","tags":["transcoding","0d4e8f58-93fe-4ccc-8f36-9e6c62406915"],"timestamp":"2024-10-02T12:57:56.948Z"}

{"tags":["http"],"level":"info","message":"2a01:cb00:149:4200:95c1:9745:5a9a:ff0a - - [02/Oct/2024:12:57:56 +0000] \"POST /api/v1/videos/0d4e8f58-93fe-4ccc-8f36-9e6c62406915/transcoding HTTP/1.0\" 204 - \"https://video.mydomain.com/admin/videos/list?search=isLocal:true\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36\"","label":"video.mydomain.com:443","timestamp":"2024-10-02T12:57:56.957Z"}

{"level":"info","message":"Handling HLS transcoding job for 0d4e8f58-93fe-4ccc-8f36-9e6c62406915.","label":"video.mydomain.com:443","tags":["transcoding","0d4e8f58-93fe-4ccc-8f36-9e6c62406915"],"payload":{"type":"new-resolution-to-hls","videoUUID":"0d4e8f58-93fe-4ccc-8f36-9e6c62406915","resolution":608,"fps":30,"copyCodecs":false,"isNewVideo":false,"separatedAudio":false,"deleteWebVideoFiles":false,"hasChildren":true},"timestamp":"2024-10-02T12:57:56.997Z"}

{"tags":["http"],"level":"info","message":"2a01:cb00:149:4200:95c1:9745:5a9a:ff0a - - [02/Oct/2024:12:57:57 +0000] \"GET /api/v1/videos?sort=-publishedAt&nsfw=both&start=0&count=10&isLocal=true&include=111&privacyOneOf=1&privacyOneOf=4&privacyOneOf=3&privacyOneOf=2&privacyOneOf=5 HTTP/1.0\" 304 - \"https://video.mydomain.com/admin/videos/list?search=isLocal:true\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36\"","label":"video.mydomain.com:443","timestamp":"2024-10-02T12:57:57.026Z"}

{"level":"info","message":"Creating torrent /var/www/peertube/storage/torrents/3a607cab-f269-46a0-89aa-5b25fd792c75-608-hls.torrent.","label":"video.mydomain.com:443","timestamp":"2024-10-02T12:57:59.480Z"}

{"tags":["hls","0d4e8f58-93fe-4ccc-8f36-9e6c62406915"],"level":"info","message":"Updated master playlist file /var/www/peertube/storage/streaming-playlists/hls/0d4e8f58-93fe-4ccc-8f36-9e6c62406915/96e97d16-fe96-411c-99f9-585f3b68a567-master.m3u8 of video 0d4e8f58-93fe-4ccc-8f36-9e6c62406915","label":"video.mydomain.com:443","timestamp":"2024-10-02T12:57:59.656Z"}

{"level":"info","message":"HLS transcoding job for 0d4e8f58-93fe-4ccc-8f36-9e6c62406915 ended.","label":"video.mydomain.com:443","tags":["transcoding","0d4e8f58-93fe-4ccc-8f36-9e6c62406915"],"payload":{"type":"new-resolution-to-hls","videoUUID":"0d4e8f58-93fe-4ccc-8f36-9e6c62406915","resolution":608,"fps":30,"copyCodecs":false,"isNewVideo":false,"separatedAudio":false,"deleteWebVideoFiles":false,"hasChildren":true},"timestamp":"2024-10-02T12:57:59.713Z"}

{"level":"info","message":"Processing transcoding job builder in job 65ac3b41-41bf-414f-aef3-87e00adbd878.","label":"video.mydomain.com:443","timestamp":"2024-10-02T12:57:59.731Z"}

{  
    "level":"error",
    "message":"Cannot execute job 65ac3b41-41bf-414f-aef3-87e00adbd878 in queue transcoding-job-builder.",
    "label":"video.mydomain.com:443",
    "payload":{"videoUUID":"0d4e8f58-93fe-4ccc-8f36-9e6c62406915","sequentialJobs":[[]]},
    "err":{
    	"stack":"TypeError: Cannot read properties of undefined (reading 'prefix')
    	    at FlowProducer.addNode (/var/www/peertube/versions/peertube-v6.3.0/node_modules/bullmq/dist/cjs/classes/flow-producer.js:150:29)

	        at FlowProducer.add (/var/www/peertube/versions/peertube-v6.3.0/node_modules/bullmq/dist/cjs/classes/flow-producer.js:84:31)

            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
            
            at async Object.processTranscodingJobBuilder [as transcoding-job-builder] (file:///var/www/peertube/versions/peertube-v6.3.0/dist/core/lib/job-queue/handlers/transcoding-job-builder.js:25:9)

            at async Object.wrapPromiseFun (file:///var/www/peertube/versions/peertube-v6.3.0/dist/core/lib/plugins/hooks.js:8:24)","message":"Cannot read properties of undefined (reading 'prefix')"
    },
    "timestamp":"2024-10-02T12:57:59.738Z"
}

I also configured the prefix values in the production.yaml (just for testing) and it doesn’t work neither…

production.yaml:

  streaming_playlists:
    bucket_name: 'streaming-playlists'

    # Allows setting all buckets to the same value but with a different prefix
    prefix: 'streaming-playlists:' # Example: 'streaming-playlists:'

    base_url: '' # Example: 'https://mirror.example.com'

    store_live_streams: true

  web_videos:
    bucket_name: 'web-videos'
    prefix: 'web-videos/'
    base_url: ''

  user_exports:
    bucket_name: 'user-exports'
    prefix: 'user-exports/'
    base_url: ''

  original_video_files:
    bucket_name: 'original-video-files'
    prefix: 'original-video-files/'
    base_url: ''

If anybody have some light to resolve this it will be helpful :slight_smile:

What is your instance version?

Assuming to the logs 6.3.0 :
/var/www/peertube/versions/peertube-v6.3.0/dist/core/lib/
Thanks !

Please upgrade to 6.3.1: Release v6.3.1 · Chocobozzz/PeerTube · GitHub

Wonderful !
The bug is fixed in v6.3.1 :star_struck:
Thank you !