Peertube: Cannot access object storage after successfully uploading the video

Hi,

I installed peertube through Yunohost. My object storage credentials are all correct, since it can uploaded to the object storage. And I also have set the file permission to public, so everyone with the link can access the file in the bucket.

However, the video doesn’t load after it was successfully uploaded.

It doesn’t show any error messages. Just show the loading circle gif.

And here is the error messages:

error[2023-09-18, 9:32:24 p.m.] Client log: Cannot get sha256 segments
{
  "tags": [
    "client"
  ],
  "username": "root",
  "userAgent": "Mozilla/5.0— Firefox/117.0",
  "stackTrace": "JSON.parse: unexpected character at line 1 column 1 of the JSON data\n",
  "url": "https://domain.com/w/eDFA5YdEHibWbbqJG9njze"
}
error[2023-09-18, 9:32:24 p.m.] Client log: HLS.js error: networkError - fatal: true - manifestLoadError
{
  "tags": [
    "client"
  ],
  "username": "root",
  "userAgent": "Mozilla/5.0— Firefox/117.0",
  "url": "https://domain.com/w/eDFA5YdEHibWbbqJG9njze"
}

When I search this issue(HLS.js error: networkError) online, it suggest to clear cache of the browsers, which I did. It doesn’t work.

I found this post here. However, I know that Yunohost had make many changes of the Peertube codes. I am posting it here, if anyone would be able to point out where is the issue.

Thanks in advance.

Hi,

Please share your video URL

Thanks very much for your reply :grinning:, my issue was resolved by adding the buckname in the end of the base url.

Hello, I have same problem here:

peertube-peertube-1  | [tube.p2p.legal:443] 2023-12-22 09:30:41.274 error: Client log: HLS.js error: networkError - fatal: true - manifestLoadError {
peertube-peertube-1  |   "username": "poka",
peertube-peertube-1  |   "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
peertube-peertube-1  |   "url": "https://tube.p2p.legal/w/gGTuXhGCY1SE19bzj3xV3Y?start=0s"
peertube-peertube-1  | }

For this video for exemple: Ma Monnaie Libre : Leo - P2Tube
I’m using Peertube in Docker, v6.0.2.

@Ash3T could you please detail how did you fix it ?

@poka Are you the admin of P2Tube?

Yes I am

Thanks, can you search in storage folder if you have somewhere 7f2e9175-ed2a-44fd-a46e-9dd166daea98 directory/file ?

And do you use docker or a classic installation?

Thanks for your answer.
I’m using official Docker image chocobozzz/peertube:production-bookworm

Yes I have the files in directory:

peertube/data/data$ find . | grep 7f2e9175-ed2a-44fd-a46e-9dd166daea98
./videos/7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.mp4
./videos/7f2e9175-ed2a-44fd-a46e-9dd166daea98-360.mp4
./torrents/7f2e9175-ed2a-44fd-a46e-9dd166daea98-360.torrent
./torrents/7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.torrent
./thumbnails/7f2e9175-ed2a-44fd-a46e-9dd166daea98.jpg
./previews/7f2e9175-ed2a-44fd-a46e-9dd166daea98.jpg
$ ls -lha 7f2e*
-rw-r--r-- 1 999 spi 21M  8 déc.   2019 7f2e9175-ed2a-44fd-a46e-9dd166daea98-360.mp4
-rw-r--r-- 1 999 spi 59M  8 déc.   2019 7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.mp4

Same owner as others.

And this is also present in database:

# SELECT * FROM video WHERE uuid = '7f2e9175-ed2a-44fd-a46e-9dd166daea98';
  id   |                 uuid                 |          name          | category | licence | privacy | nsfw |              description              | duration | views | likes | dislikes | remote |                                   url                                    | commentsEnabled | channelId |         createdAt          |         updatedAt          | support |        publishedAt         | language | waitTranscoding | state | downloadEnabled | originallyPublishedAt | isLive | inputFileUpdatedAt 
-------+--------------------------------------+------------------------+----------+---------+---------+------+---------------------------------------+----------+-------+-------+----------+--------+--------------------------------------------------------------------------+-----------------+-----------+----------------------------+----------------------------+---------+----------------------------+----------+-----------------+-------+-----------------+-----------------------+--------+--------------------
 61738 | 7f2e9175-ed2a-44fd-a46e-9dd166daea98 | Ma Monnaie Libre : Leo |       14 |       5 |       1 | f    | Portrait de Leo, pré-juniste endetté. |      316 |    53 |     3 |        0 | f      | https://tube.p2p.legal/videos/watch/7f2e9175-ed2a-44fd-a46e-9dd166daea98 | t               |       331 | 2019-12-08 14:20:21.392+00 | 2022-06-14 04:34:37.494+00 |         | 2019-12-13 16:08:35.232+00 | fr       | t               |     1 | t               |                       | f      | 


I probably understand the problem, when you try to download it here: https://tube.p2p.legal/download/videos/7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.mp4

{"type":"https://docs.joinpeertube.org/api-rest-reference.html#section/Errors/Error","detail":"ENOENT: no such file or directory, stat '/data/web-videos/7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.mp4'","status":404,"code":"Error","error":"ENOENT: no such file or directory, stat '/data/web-videos/7f2e9175-ed2a-44fd-a46e-9dd166daea98-720.mp4'"}

It’s looking for in /data/web-videos directory, instead of /data/videos/
/data/web-videos directory exist but is empty, except a private empty sub-directory.

If I create a symlink of the videos here, then I can download it, but still not read it.

Seems you missed some changes to do in the 6.0.0 release notes: PeerTube/CHANGELOG.md at develop · Chocobozzz/PeerTube · GitHub

In particuliar, this part:

Directory on filesystem must be renamed from videos/ to web-videos/ to represent the value of storage.web_videos

  • Classic installation: sudo -u peertube mv '/var/www/peertube/storage/videos/' '/var/www/peertube/storage/web-videos/'
  • Docker installation: mv '/path-to-docker-installation/docker-volume/data/videos/' '/path-to-docker-installation/docker-volume/data/web-videos/'

(but you should check what else you missed)

2 Likes

Ok thank you for that, i thought i was ok on this, but no …
I changed it now, and update my configuration, so i can download broken videos, but still the original problem:

peertube-peertube-1  | [tube.p2p.legal:443] 2023-12-26 14:18:32.948 error: Client log: HLS.js error: networkError - fatal: true - manifestLoadError {
peertube-peertube-1  |   "username": "poka",
peertube-peertube-1  |   "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0",
peertube-peertube-1  |   "url": "https://tube.p2p.legal/w/7f2e9175-ed2a-44fd-a46e-9dd166daea98"
peertube-peertube-1  | }

I don’t know where are HLS files for this specific video. You can delete HLS files from the admin interface, and retry to run HLS transcoding

I’m sorry but I don’t find where to do this in admin interface.

Administration → Overviews → Videos

To remove files use the > on the left and to run transcoding use the ... button

1 Like

First time i’m discovering this admin page :slight_smile:
(maybe not very intuitive, maybe a complete view of theses menu when flyover the item menu could be more explicit)

Transocding in progress, that’s fixing my problem, and I will remove web videos since HLS is better by torrent.

Thank you so much for all this work and support :heart:

1 Like