YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
88 stars 27 forks source link

Upgrading to peertube ynh3 version completely broke my Peertube #223

Closed tio-trom closed 3 years ago

tio-trom commented 3 years ago

Describe the bug

A clear and concise description of what the bug is.

Context

The bad thing is that if I restore to the previous version no videos work. I can navigate it but there are no thumbnails and no local videos work.

Logs

https://paste.yunohost.org/raw/oqihixisax

tio-trom commented 3 years ago

I have restored a backup from yesterday https://paste.yunohost.org/raw/cifugugako. No local videos or thumbnail work. :(

AkselRocks commented 3 years ago

Same here.

The Website is completly blank.

No errors in the logfile.

tio-trom commented 3 years ago

The website is accessible for me and my friends, using different VPNs from different countries. Even here it shows up https://sitechecker.pro/website-down/ with a screenshot and all. Can you please try in a private browser window?

tio-trom commented 3 years ago

I am also wondering why I get this warning "Unknown user:" when I restore Peertube.

No errors in the logfile.

Yes, true. But many many warnings. Such as:

2021-04-23 04:09:48,789: WARNING - --- /home/yunohost.conf/backup//var/www/peertube/config/local-production.json.backup.20210423.040947 2021-04-12 20:31:48.000000000 +0200
2021-04-23 04:09:48,790: DEBUG - + diff --report-identical-files --unified --color=always /home/yunohost.conf/backup//var/www/peertube/config/local-production.json.backup.20210423.040947 /var/www/peertube/config/local-production.json
2021-04-23 04:09:48,790: WARNING - +++ /var/www/peertube/config/local-production.json   2021-04-23 04:09:48.457114804 +0200
2021-04-23 04:09:48,790: DEBUG - + true
2021-04-23 04:09:48,790: WARNING - @@ -1,176 +1,2 @@
2021-04-23 04:09:48,790: DEBUG - + unset backup_file_checksum
2021-04-23 04:09:48,790: WARNING -  {
2021-04-23 04:09:48,791: DEBUG - + chmod 400 /var/www/peertube/config/local-production.json
2021-04-23 04:09:48,791: WARNING - -  "instance": {
2021-04-23 04:09:48,791: DEBUG - + chown peertube:peertube /var/www/peertube/config/local-production.json
2021-04-23 04:09:48,791: WARNING - -    "name": "videos.domain2.tld",
2021-04-23 04:09:48,793: WARNING - -    "short_description": "A trade-free video hosting platform. You do not have to trade your currency, data, attention, freedom or anything else, in order to use it.",
2021-04-23 04:09:48,793: WARNING - -    "description": "videos.domain2.tld is made by TROM, a project that started back in 2011, aimed at showcasing how our world-wide trade-based society is destroying pretty much everything: lives, the environment, the present, the future. From jobs to money, data collection or ads, borders and laws, this entire maze and craze is unnecessary in a world where we have so much abundance that we create mountains of waste out of it. \n\nIt is time to move beyond this, and create trade-free goods and services for everyone, something we are starting to do now. We are creating/enabling a lot of online trade-free services: from video platforms, to social networks, operating systems, search engines, educational materials, and much more.\n\nTo learn more about our project, visit http://tromsite.com.  \nTo learn more about what trade-free means, visit [trade-free.org](http://trade-free.org).  \nTo see all of our tools, visit [tromsite.com/tools](http://tromsite.com/tools).  \nTo contact us, visit [tromsite.com/contact](http://tromsite.com/contact).",
2021-04-23 04:09:48,793: WARNING - -    "is_nsfw": false,
2021-04-23 04:09:48,794: WARNING - -    "default_nsfw_policy": "display",
2021-04-23 04:09:48,794: WARNING - -    "terms": "Since this is trade-free, it means you do not have to trade your freedom in order to use it. You can post whatever you want. We hope that you won't get us into troubles by what you are posting, and we will fight to always keep your content on the platform. Only in extreme circumstances we may be forced to remove any content, and if that happens, it will be only if the entire platform is in danger of being shut down. All of such decisions will be made public.",
2021-04-23 04:09:48,794: DEBUG - + echo '[#########+..........] > Building Yarn dependencies...'
2021-04-23 04:09:48,794: WARNING - -    "code_of_conduct": "No such thing. See https://www.trade-free.org/",
2021-04-23 04:09:48,794: WARNING - -    "creation_reason": "So that human beings have a trade-free video platform that they can use.",
2021-04-23 04:09:48,795: DEBUG - + chown -R peertube:peertube /var/www/peertube
2021-04-23 04:09:48,795: WARNING - -    "moderation_information": "No such thing. See https://www.trade-free.org/",
2021-04-23 04:09:48,795: WARNING - -    "administrator": "TROM - https://www.tromsite.com ",
2021-04-23 04:09:48,795: WARNING - -    "maintenance_lifetime": "As long as we can. We use this for our hundreds of videos, as our main platform, so only if we get 100% broke, this instance will disappear. Speaking of that, you can help us by donating here https://www.tromsite.com/donate/ - any donation is super important. Please help.",
2021-04-23 04:09:48,795: WARNING - -    "business_model": "Donations. So please help https://www.tromsite.com/donate/ ",
2021-04-23 04:09:48,796: WARNING - -    "hardware_information": "10 Core CPU, 60GB of RAM, 1.6TB SSD",
2021-04-23 04:09:48,796: WARNING - -    "categories": [
2021-04-23 04:09:48,796: WARNING - -      14,
2021-04-23 04:09:48,796: WARNING - -      13,
2021-04-23 04:09:48,797: WARNING - -      15
2021-04-23 04:09:48,797: WARNING - -    ],
2021-04-23 04:09:48,797: WARNING - -    "languages": [
2021-04-23 04:09:48,797: WARNING - -      "en"
2021-04-23 04:09:48,798: WARNING - -    ],
2021-04-23 04:09:48,798: WARNING - -    "default_client_route": "/video-channels/trom/videos",
2021-04-23 04:09:48,798: WARNING - -    "customizations": {
2021-04-23 04:09:48,798: WARNING - -      "javascript": "",
AkselRocks commented 3 years ago

Check on https://sitechecker.pro/website-down/: website is "UP", but no screenshot.

Check in private browser Window: Still just a blank page.

tio-trom commented 3 years ago

One more thing: other videos work, such as https://videos.trom.tf/videos/watch/6f9371cf-9f6a-4932-9add-9a5e42a5ef9f that are from other instances. Everything seems to work for the backup restoration, except videos.

tio-trom commented 3 years ago

Check on https://sitechecker.pro/website-down/: website is "UP", but no screenshot.

Check in private browser Window: Still just a blank page.

This is very bizarre. Can you tell me from what country you are trying to access it? I can give it a shot to try a VPN from there

AkselRocks commented 3 years ago

To make it clear: I have the same issue with my instance and tested MY website -> website is "UP", but no screenshot.

From my VPN in Austria your website is up and shows screenshot.

tio-trom commented 3 years ago

Oh ok so you are having the same issue after upgrading? Because is true, after I upgraded I get the same a blank page and nothing. But even the restore doesn't make the website functional.

yalh76 commented 3 years ago

What are the URL of your peertubes ? Currently doing a test upgrade from version 3.0.1~ynh1

tio-trom commented 3 years ago

This is mine https://videos.trom.tf - downgraded to ynh2 and is broken as described above. If I upgrade to ynh3 I get a blank page like @AkselRocks

I can upgrade again if that helps you, and leave it broken as such.

yalh76 commented 3 years ago

ok and @AkselRocks yours?

@TROMsite stop trying restore / upgrade, first have to figure what is the blank page issue

AkselRocks commented 3 years ago

My peertube url is: https://daschauher.aksel.rocks

yalh76 commented 3 years ago

My peertube url is: https://daschauher.aksel.rocks

Perfect: there are issue to load .js files ...

image

ynh3 is about directory permissions.. I will check why .js don't load

yalh76 commented 3 years ago

@AkselRocks, can you try to do from the command line :

chown -R peertube:www-data "/var/www/peertube"

to see if it's enough to solve your problem

AkselRocks commented 3 years ago

@yalh76 sudo chown -R peertube:www-data "/var/www/peertube" -> fixed blank page, but no thumbnails and no video play.

yalh76 commented 3 years ago

fine, we are moving forward .... I will test to upload a file on my own test.

@TROMsite : you can upgrade and apply same fix for the blank page

tomdereub commented 3 years ago

Maybe it's better two issues ? this one about upgrade problem, and a new one about the restore problem ? Now it's hard to know if we're talking about a working instance of peertube that's just upgraded and get a blank page, or about an instance upgraded, removed, restored but not working, upgraded again, etc...

tio-trom commented 3 years ago

I already upgraded like @yalh76 said. It is working now to access it, but the custom settings (CSS) are gone + no thumbnails and local videos do not work. https://videos.trom.tf/ . Plus a lot of config is not there anymore, like user registration was open, now is closed, and so forth.

Before was this: image

And now is this: image

yalh76 commented 3 years ago

@AkselRocks, to fix thumbnails and video, can you execute:

chown -R peertube:www-data "/home/yunohost.app/peertube/storage"
yalh76 commented 3 years ago

Seems OK for @AkselRocks, Can you do the same @TROMsite ?

tomdereub commented 3 years ago

Ok, my case : I upgraded, blank page, removed, restored backup, and it was working but without thumbnails and local video. Now I've done

chown -R peertube:www-data /var/www/peertube
chown -R peertube:www-data /home/yunohost.app/peertube/storage

And it's all working again, thanks. I'll wait the fix before trying to upgrade again.

AkselRocks commented 3 years ago

@yalh76 chown -R peertube:www-data "/home/yunohost.app/peertube/storage" -> Thumbnails and playing video work again!

Configuration (Sitename, description, etc) seem to be set to default? I think I changed (at least) the site name displayed on top ...

yalh76 commented 3 years ago

Configuration (Sitename, description, etc) seem to be set to default? I think I changed (at least) the site name displayed on top ...

Yes config file is reset during upgrade but previous config file is backuped. All should be written in the logs of the upgrade

tio-trom commented 3 years ago

chown -R peertube:www-data "/home/yunohost.app/peertube/storage"

Works. Thanks! How to restore the configs now?

tio-trom commented 3 years ago

Ok just restore the file that was backed-up. Thanks! All seem to work now. Awesome!

tio-trom commented 3 years ago

So is it safe to upgrade to ynh4 now?

yalh76 commented 3 years ago

So is it safe to upgrade to ynh4 now?

yes this will do the same command line you have done :)

tio-trom commented 3 years ago

Done! All works well. By the way I am curious why the production.json file got overwritten? Shouldn't that be ignored?

yalh76 commented 3 years ago

It's now ignored ... I've done that too quick, not thinking of consequences ^^

AkselRocks commented 3 years ago

After upgrade #244 the same issue ("completely broke peertube") appears.

As above

chown -R peertube:www-data /var/www/peertube
chown -R peertube:www-data /home/yunohost.app/peertube/storage

solves the issue.