JohnXLivingston / peertube-plugin-livechat

GNU Affero General Public License v3.0
90 stars 26 forks source link

Livechat won't load on NixOS #540

Closed BRBWaffles closed 1 month ago

BRBWaffles commented 1 month ago

Describe the bug I'm running PeerTube on my NixOS server. I logged in, downloaded the plugin, and used every combination of settings and was never able to get the livechat plugin to work. It just shows a loading pinwheel, or tells me the chat doesn't exist with certain settings.

To Reproduce Steps to reproduce the behavior:

  1. Declare the PeerTube NixOS service module.
  2. Log in.
  3. Navigate to the plugin tab in the Administration settings.
  4. Download the plugin.
  5. Try different recommended settings.
  6. Launch livestream.
  7. See nothing.
  8. Repeat.

Expected behavior I expected to see a chat box that I, and viewers, could interact with.

Server (please complete the following information):

Plugin diagnostic:

    Starting tests: OK
    Browser: OK
    Backend connection: OK
    Test debug mode: OK
        Debug mode is OFF
    Webchat activated on videos: OK
        Chat will open automatically
        Displaying «open in new window» button
        Chat can be enabled on live videos.
        Chat is enabled for all lives.
    Builtin Prosody and ConverseJS: KO
        The working dir is: /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
        Prosody will run on port '52800'
        Prosody will use http://127.0.0.1:9000/plugins/livechat/11.0.1/router/api/ as base uri from api calls
        Prosody path will be '/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun'
        Prosody will be using the '/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody/livechat-prosody-x86_64.AppImage' AppImage
        Prosody AppImage extract path will be '/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage'
        Prosody modules path will be '/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules'
        Prosody rooms will be grouped by 'video'.
        By default, room content will be archived.
        Room content will be saved for '1w'
        Error when requiring the prosody config file: Error: ENOENT: no such file or directory, access '/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua'

Also, no AppImage is installed in the /PeerTube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage directory, nor is a config file provided.

Desktop (please complete the following information):

JohnXLivingston commented 1 month ago

Hello,

Is the /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/ directory writable for the peertube user?

Did you see that the livechat plugin is packaged for Nix? Have you tried this package? https://github.com/ngi-nix/ngipkgs/tree/init/peertube-plugins/livechat/pkgs/by-name/peertube-plugin-livechat

I'm not familiar with NixOS (I only heard about it), so i don't know if there are some restrictions to overcome.

BRBWaffles commented 1 month ago

The ngipkg spontaneously compiled correctly with no explanation despite it failing multiple times previously.

JohnXLivingston commented 1 month ago

So, could we consider this issue as closed? (for now...)

If you have troubles again, maybe try to ask the maintainer of the peertube nix package. There might be some specifics with NixOS that i'm not aware of. And if you have some solution, feel free to share (here, or even by making a pull request on the documentation: https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/support/documentation/content/en/documentation/installation/troubleshooting.md )

BRBWaffles commented 1 month ago

Yeah, it's fair to call it closed. I dunno what was up. Probably just some stateful stuff that disappeared when I was messing around with something. Not clear what, but it's working now. No clear solution, despite it working, unfortunately.