PeerTube live chat doesn't load sometimes #180

Closed
opened 2022-08-22 19:12:28 +00:00 by a · 7 comments
Owner

For instance, the live chat of https://tube.exozy.me/w/oRAXtmt8hoqMSKbcQFH3wA just loads forever or shows a blank screen most of the time.

Maybe we should try uninstalling and deleting the PeerTube live chat plugin data, then reinstall?

For instance, the live chat of https://tube.exozy.me/w/oRAXtmt8hoqMSKbcQFH3wA just loads forever or shows a blank screen most of the time. Maybe we should try uninstalling and deleting the PeerTube live chat plugin data, then reinstall?
a added the
bug
label 2022-08-22 19:12:28 +00:00
a self-assigned this 2022-08-22 19:12:28 +00:00
a added this to the (deleted) project 2022-08-22 19:12:28 +00:00
a started working 2022-08-22 19:12:37 +00:00
Author
Owner

The diagnostic tool at https://tube.exozy.me/plugins/livechat/5.7.1/router/settings/diagnostic is also having the same issue. 1 in 3 times, it loads for a very long time, but after several minutes it finally finishes loading. It seems like the live chat for videos also has the same behavior. Most of the time it works, but occasionally it takes a very very long time before loading. I'm closing this for now since I couldn't find any more helpful information about the issue (the PeerTube and plugin logs have nothing helpful either).

The diagnostic tool at https://tube.exozy.me/plugins/livechat/5.7.1/router/settings/diagnostic is also having the same issue. 1 in 3 times, it loads for a very long time, but after several minutes it finally finishes loading. It seems like the live chat for videos also has the same behavior. Most of the time it works, but occasionally it takes a very very long time before loading. I'm closing this for now since I couldn't find any more helpful information about the issue (the PeerTube and plugin logs have nothing helpful either).
a closed this issue 2022-08-22 19:36:51 +00:00
a stopped working 2022-08-22 19:36:51 +00:00
24 minutes 14 seconds
Author
Owner

I was almost going to file a new bug report at https://github.com/JohnXLivingston/peertube-plugin-livechat/issues, but then I remembered my lesson from #179. I tested the live chat on a different computer, and it loads perfectly every time!!

So, I think this bug might only happen when you're logged in, so whatever. I can always just reload the page to deal with this bug.

This was the bug report that I almost submitted:

Describe the bug
About half of the time when loading the live chat of a video, it takes a very long time (several minutes) to load.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://tube.exozy.me/w/oRAXtmt8hoqMSKbcQFH3wA
  2. Wait for the live chat to load
  3. It might take several minutes. Sometimes when reloading, the live chat will load quickly in a few seconds, but other times it will take a very long time.

Expected behavior
The live chat should load in a few seconds.

Server (please complete the following information):

  • OS version [e.g. Debian 10, ...]: Arch Linux
  • Peertube version: 4.2.2
  • Peertube installation type [e.g. standard, docker, ...]: AUR package
  • peertube-plugin-livechat version: 5.7.1
  • Chat mode if relevant [disabled, Prosody, external XMPP, external]: Prosody

Plugin diagnostic:
If this is a server setup issue, please go to the plugin settings, click on «launch diagnostic», and copy/paste the result.

The diagnostic page has the same issue. About half of the time it will be stuck on

Diagnostic

    Starting tests: OK
    Browser: OK
    Backend connection: OK
    Webchat activated on videos: OK
        Chat will open automatically
        Displaying «open in new window» button
        Chat can be enabled on live videos.
    Webchat type: OK
        Using builtin Prosody
   Testing...

and take a very long time to load the rest. This is the full output:

Diagnostic

    Starting tests: OK
    Browser: OK
    Backend connection: OK
    Webchat activated on videos: OK
        Chat will open automatically
        Displaying «open in new window» button
        Chat can be enabled on live videos.
    Webchat type: OK
        Using builtin Prosody
    Builtin Prosody and ConverseJS: OK
        The working dir is: /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
        Prosody will run on port '52800'
        Prosody will use https://tube.exozy.me/plugins/livechat/5.7.1/router/api/ as base uri from api calls
        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 'never'
        The prosody configuration file (/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
        Prosody configuration file content is correct.
        Pid file /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid found
        Prosodyctl status: ************************** Prosody was unable to find lua-unbound This package can be obtained in the following ways: Debian/Ubuntu | sudo apt install lua-unbound luarocks | luarocks install luaunbound Source | https://www.zash.se/luaunbound.html Old DNS resolver library will be used More help can be found on our website, at https://prosody.im/doc/depends ************************** certmanager error Error indexing certificate directory /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: cannot open /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: No such file or directory Prosody is running with PID 2239728
        The prosody configuration file (/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
        Prosody configuration file content is correct.
        Prosody version is 0.12.1
        API Peertube -> Prosody is OK
        API Prosody -> Peertube is OK

Additional debugging information
Current prosody configuration
daemonize = false;
allow_registration = false;
admins = {
};
pidfile = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid";
plugin_paths = {
  "/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules";
};
data_path = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data";
default_storage = "internal";
storage = "internal";
modules_enabled = {
  "roster";
  "saslauth";
  "carbons";
  "version";
  "uptime";
  "ping";
  "bosh";
  "posix";
};
modules_disabled = {
  "s2s";
};
cross_domain_bosh = false;
consider_bosh_secure = true;
cross_domain_websocket = false;
consider_websocket_secure = false;
c2s_require_encryption = false;
interfaces = {
  "127.0.0.1";
  "::1";
};
c2s_ports = {
};
c2s_interfaces = {
  "127.0.0.1";
  "::1";
};
s2s_ports = {
};
s2s_interfaces = {
  "127.0.0.1";
  "::1";
};
http_ports = {
  "52800";
};
http_interfaces = {
  "127.0.0.1";
  "::1";
};
https_ports = {
};
https_interfaces = {
  "127.0.0.1";
  "::1";
};
log = {
  error = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.err";

};



VirtualHost "tube.exozy.me"
  authentication = "http";
  modules_enabled = {
  "ping";
  "auth_http";
  "http";
  "bosh";
  "vcard_peertubelivechat";
};
  http_auth_url = "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/user";
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "tube.exozy.me";
  http_external_url = "http://tube.exozy.me";
  peertubelivechat_vcard_peertube_url = "https://tube.exozy.me";


VirtualHost "anon.tube.exozy.me"
  authentication = "anonymous";
  modules_enabled = {
  "ping";
  "http";
  "bosh";
  "random_vcard_peertubelivechat";
};
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "tube.exozy.me";
  http_external_url = "http://tube.exozy.me";
  peertubelivechat_random_vcard_avatars_path = "/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/avatars";


Component "room.tube.exozy.me" "muc"
  muc_room_locking = false;
  muc_tombstones = false;
  muc_room_default_language = "en";
  muc_room_default_public = false;
  muc_room_default_persistent = true;
  muc_room_default_members_only = false;
  muc_room_default_moderated = false;
  muc_room_default_public_jids = false;
  muc_room_default_change_subject = false;
  muc_room_default_history_length = 20;
  restrict_room_creation = false;
  http_host = "tube.exozy.me";
  http_external_url = "http://tube.exozy.me";
  modules_enabled = {
  "muc_http_defaults";
  "muc_mam";
  "muc_moderation";
  "http_peertubelivechat_list_rooms";
  "http_peertubelivechat_test";
};
  muc_create_api_url = {
  "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/room?apikey=***APIKey***&jid={room.jid|jid_node}";
};
  muc_log_by_default = true;
  muc_log_presences = true;
  log_all_rooms = false;
  muc_log_expires_after = "never";
  muc_log_cleanup_interval = 14400;
  peertubelivechat_list_rooms_apikey = "***APIKey***";
  peertubelivechat_test_apikey = "***APIKey***";
  peertubelivechat_test_peertube_api_url = "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/test?apikey=***APIKey***";


Prosody version

**************************
Prosody was unable to find lua-unbound
This package can be obtained in the following ways:

  Debian/Ubuntu | sudo apt install lua-unbound                                  
       luarocks | luarocks install luaunbound                                   
         Source | https://www.zash.se/luaunbound.html                           

Old DNS resolver library will be used
More help can be found on our website, at https://prosody.im/doc/depends
**************************

certmanager         error	Error indexing certificate directory /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: cannot open /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: No such file or directory
Prosody 0.12.1

# Prosody directories
Data directory:     /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data
Config directory:   /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
Source directory:   /usr/lib/prosody
Plugin directories:
  /var/lib/prosody/custom_plugins - not a directory!
  /var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules
  /usr/lib/prosody/modules/
  

# Operating system
Linux 5.19.2-arch1-1	

# Lua environment
Lua version:             	Lua 5.4

Lua module search paths:
  /usr/lib/prosody/?.lua
  /usr/share/lua/5.4/?.lua
  /usr/share/lua/5.4/?/init.lua
  /usr/lib/lua/5.4/?.lua
  /usr/lib/lua/5.4/?/init.lua
  /var/lib/prosody/custom_plugins/share/lua/5.4/?.lua
  /var/lib/prosody/custom_plugins/share/lua/5.4/?/init.lua

Lua C module search paths:
  /usr/lib/prosody/?.so
  /usr/lib/lua/5.4/?.so
  /usr/lib/lua/5.4/loadall.so

LuaRocks:        	Not installed

# Network

Backend: epoll

# Lua module versions
LuaExpat:     	1.4.1
LuaFileSystem:	1.8.0
LuaSec:       	1.1.0
LuaSocket:    	3.0.0

# library versions
libcrypto:    	OpenSSL 1.1.1q  5 Jul 2022
libexpat:     	expat_2.4.8

Desktop (please complete the following information):

  • OS: [e.g. iOS] Arch Linux
  • Browser [e.g. chrome, safari] Firefox
  • Version [e.g. 22] 103.0.2

Additional context
This very likely might be a problem with my PeerTube instance's setup, so sorry for wasting the developer's time if it is. However I couldn't find anything wrong with my setup or in the PeerTube or livechat plugin logs, so I'm really confused on what the problem here is.

I was almost going to file a new bug report at https://github.com/JohnXLivingston/peertube-plugin-livechat/issues, but then I remembered my lesson from #179. I tested the live chat on a different computer, and it loads perfectly every time!! So, I think this bug might only happen when you're logged in, so whatever. I can always just reload the page to deal with this bug. This was the bug report that I almost submitted: **Describe the bug** About half of the time when loading the live chat of a video, it takes a very long time (several minutes) to load. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://tube.exozy.me/w/oRAXtmt8hoqMSKbcQFH3wA 2. Wait for the live chat to load 3. It might take several minutes. Sometimes when reloading, the live chat will load quickly in a few seconds, but other times it will take a very long time. **Expected behavior** The live chat should load in a few seconds. **Server (please complete the following information):** - OS version [e.g. Debian 10, ...]: Arch Linux - Peertube version: 4.2.2 - Peertube installation type [e.g. standard, docker, ...]: AUR package - peertube-plugin-livechat version: 5.7.1 - Chat mode if relevant [disabled, Prosody, external XMPP, external]: Prosody **Plugin diagnostic:** If this is a server setup issue, please go to the plugin settings, click on «launch diagnostic», and copy/paste the result. The diagnostic page has the same issue. About half of the time it will be stuck on ``` Diagnostic Starting tests: OK Browser: OK Backend connection: OK Webchat activated on videos: OK Chat will open automatically Displaying «open in new window» button Chat can be enabled on live videos. Webchat type: OK Using builtin Prosody Testing... ``` and take a very long time to load the rest. This is the full output: ``` Diagnostic Starting tests: OK Browser: OK Backend connection: OK Webchat activated on videos: OK Chat will open automatically Displaying «open in new window» button Chat can be enabled on live videos. Webchat type: OK Using builtin Prosody Builtin Prosody and ConverseJS: OK The working dir is: /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody Prosody will run on port '52800' Prosody will use https://tube.exozy.me/plugins/livechat/5.7.1/router/api/ as base uri from api calls 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 'never' The prosody configuration file (/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists Prosody configuration file content is correct. Pid file /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid found Prosodyctl status: ************************** Prosody was unable to find lua-unbound This package can be obtained in the following ways: Debian/Ubuntu | sudo apt install lua-unbound luarocks | luarocks install luaunbound Source | https://www.zash.se/luaunbound.html Old DNS resolver library will be used More help can be found on our website, at https://prosody.im/doc/depends ************************** certmanager error Error indexing certificate directory /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: cannot open /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: No such file or directory Prosody is running with PID 2239728 The prosody configuration file (/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists Prosody configuration file content is correct. Prosody version is 0.12.1 API Peertube -> Prosody is OK API Prosody -> Peertube is OK Additional debugging information Current prosody configuration daemonize = false; allow_registration = false; admins = { }; pidfile = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid"; plugin_paths = { "/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules"; }; data_path = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data"; default_storage = "internal"; storage = "internal"; modules_enabled = { "roster"; "saslauth"; "carbons"; "version"; "uptime"; "ping"; "bosh"; "posix"; }; modules_disabled = { "s2s"; }; cross_domain_bosh = false; consider_bosh_secure = true; cross_domain_websocket = false; consider_websocket_secure = false; c2s_require_encryption = false; interfaces = { "127.0.0.1"; "::1"; }; c2s_ports = { }; c2s_interfaces = { "127.0.0.1"; "::1"; }; s2s_ports = { }; s2s_interfaces = { "127.0.0.1"; "::1"; }; http_ports = { "52800"; }; http_interfaces = { "127.0.0.1"; "::1"; }; https_ports = { }; https_interfaces = { "127.0.0.1"; "::1"; }; log = { error = "/var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.err"; }; VirtualHost "tube.exozy.me" authentication = "http"; modules_enabled = { "ping"; "auth_http"; "http"; "bosh"; "vcard_peertubelivechat"; }; http_auth_url = "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/user"; trusted_proxies = { "127.0.0.1"; "::1"; }; allow_anonymous_s2s = false; http_host = "tube.exozy.me"; http_external_url = "http://tube.exozy.me"; peertubelivechat_vcard_peertube_url = "https://tube.exozy.me"; VirtualHost "anon.tube.exozy.me" authentication = "anonymous"; modules_enabled = { "ping"; "http"; "bosh"; "random_vcard_peertubelivechat"; }; trusted_proxies = { "127.0.0.1"; "::1"; }; allow_anonymous_s2s = false; http_host = "tube.exozy.me"; http_external_url = "http://tube.exozy.me"; peertubelivechat_random_vcard_avatars_path = "/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/avatars"; Component "room.tube.exozy.me" "muc" muc_room_locking = false; muc_tombstones = false; muc_room_default_language = "en"; muc_room_default_public = false; muc_room_default_persistent = true; muc_room_default_members_only = false; muc_room_default_moderated = false; muc_room_default_public_jids = false; muc_room_default_change_subject = false; muc_room_default_history_length = 20; restrict_room_creation = false; http_host = "tube.exozy.me"; http_external_url = "http://tube.exozy.me"; modules_enabled = { "muc_http_defaults"; "muc_mam"; "muc_moderation"; "http_peertubelivechat_list_rooms"; "http_peertubelivechat_test"; }; muc_create_api_url = { "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/room?apikey=***APIKey***&jid={room.jid|jid_node}"; }; muc_log_by_default = true; muc_log_presences = true; log_all_rooms = false; muc_log_expires_after = "never"; muc_log_cleanup_interval = 14400; peertubelivechat_list_rooms_apikey = "***APIKey***"; peertubelivechat_test_apikey = "***APIKey***"; peertubelivechat_test_peertube_api_url = "https://tube.exozy.me/plugins/livechat/5.7.1/router/api/test?apikey=***APIKey***"; Prosody version ************************** Prosody was unable to find lua-unbound This package can be obtained in the following ways: Debian/Ubuntu | sudo apt install lua-unbound luarocks | luarocks install luaunbound Source | https://www.zash.se/luaunbound.html Old DNS resolver library will be used More help can be found on our website, at https://prosody.im/doc/depends ************************** certmanager error Error indexing certificate directory /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: cannot open /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs: No such file or directory Prosody 0.12.1 # Prosody directories Data directory: /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data Config directory: /var/lib/peertube/storage/plugins/data/peertube-plugin-livechat/prosody Source directory: /usr/lib/prosody Plugin directories: /var/lib/prosody/custom_plugins - not a directory! /var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules /usr/lib/prosody/modules/ # Operating system Linux 5.19.2-arch1-1 # Lua environment Lua version: Lua 5.4 Lua module search paths: /usr/lib/prosody/?.lua /usr/share/lua/5.4/?.lua /usr/share/lua/5.4/?/init.lua /usr/lib/lua/5.4/?.lua /usr/lib/lua/5.4/?/init.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?/init.lua Lua C module search paths: /usr/lib/prosody/?.so /usr/lib/lua/5.4/?.so /usr/lib/lua/5.4/loadall.so LuaRocks: Not installed # Network Backend: epoll # Lua module versions LuaExpat: 1.4.1 LuaFileSystem: 1.8.0 LuaSec: 1.1.0 LuaSocket: 3.0.0 # library versions libcrypto: OpenSSL 1.1.1q 5 Jul 2022 libexpat: expat_2.4.8 ``` **Desktop (please complete the following information):** - OS: [e.g. iOS] Arch Linux - Browser [e.g. chrome, safari] Firefox - Version [e.g. 22] 103.0.2 **Additional context** This very likely might be a problem with my PeerTube instance's setup, so sorry for wasting the developer's time if it is. However I couldn't find anything wrong with my setup or in the PeerTube or livechat plugin logs, so I'm really confused on what the problem here is.
Author
Owner

I think I was able to fix the bug by deleting all the livechat plugin data and uninstalling and reinstalling it.

I think I was able to fix the bug by deleting all the livechat plugin data and uninstalling and reinstalling it.
Author
Owner

This issue is back!

This issue is back!
a reopened this issue 2022-12-29 17:21:58 +00:00
Author
Owner

OK, progress! Using the suggestion from this issue, I changed the PeerTube API URL to http://localhost:9000, and that fixed this bug for all situations except when I'm logged into my own account. Even the diagnostics page reliably works 100% of the time.

OK, progress! Using the suggestion from [this issue](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/90), I changed the PeerTube API URL to `http://localhost:9000`, and that fixed this bug for *all situations* except when I'm logged into my own account. Even the diagnostics page reliably works 100% of the time.
Author
Owner

I finally figured it out, and... 🤦. I had set my PeerTube display name to the Unicode character U+200B, and apparently either PeerTube or the live chat plugin really hates that, and that's the reason why the chat never loads whenever I'm logged into my own account. Moral of the story: Unicode breaks stuff.

I finally figured it out, and... 🤦. I had set my PeerTube display name to the Unicode character U+200B, and apparently either PeerTube or the live chat plugin really hates that, and that's the reason why the chat never loads whenever I'm logged into my own account. Moral of the story: Unicode breaks stuff.
a closed this issue 2022-12-29 18:43:12 +00:00
Author
Owner

This bug is actually because Prosody is strict with what nicknames are allowed, so the live chat plugin repeatedly tries setting the nickname to one that Prosody rejects, causing the chat to load endlessly.

This bug is actually because Prosody is strict with what nicknames are allowed, so the live chat plugin repeatedly tries setting the nickname to one that Prosody rejects, causing the chat to load endlessly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 24 minutes 14 seconds
a
24 minutes 14 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: exozyme/exozyme#180
No description provided.