tubearchivist / members

Members Client Container
https://members.tubearchivist.com
GNU General Public License v3.0
4 stars 1 forks source link

Video got lost by ping/pong error #1

Open DunklerPhoenix opened 5 months ago

DunklerPhoenix commented 5 months ago

Heho A video notification got lost because of a ping/pong timeout error. I think the client should try again to push the video to TA if an error occurs. The "notification received" on the members page could also be a bit misleading in that context.

It was the first notification to my server so it could also be a problem on my site. I will watch it a bit, but in any case I love the idea behind this live notifications. Thank you

----------------------------
TUBE ARCHIVIST MEMBER CLIENT
----------------------------
v0.0.3

[startup] all expected environment vars are set
[startup] connecting to TA on url https://tube.domain.tld:443/api/ping/
[startup] TA connection established
[startup] TA answered: {'response': 'pong', 'user': 2, 'version': 'v0.4.8'}
[connect] opening connection to members.tubearchivist.com
[connect][2024-05-26 14:20:37] connection to members.tubearchivist.com established
[error][2024-05-27 00:26:07] Connection to remote host was lost.
[connect][2024-05-27 00:26:17] connection to members.tubearchivist.com established
[closed][2024-05-27 02:22:23] connection to members.tubearchivist.com closed
[closed] status code: 1001
[closed] message: CloudFlare WebSocket proxy restarting

----------------------------
TUBE ARCHIVIST MEMBER CLIENT
----------------------------
v0.0.3

[startup] all expected environment vars are set
[startup] connecting to TA on url https://tube.domain.tld:443/api/ping/
[startup] TA connection established
[startup] TA answered: {'response': 'pong', 'user': 2, 'version': 'v0.4.8'}
[connect] opening connection to members.tubearchivist.com
[connect][2024-05-27 02:22:36] connection to members.tubearchivist.com established
[error][2024-05-27 10:39:44] Connection to remote host was lost.
[connect][2024-05-27 10:39:55] connection to members.tubearchivist.com established
[error][2024-05-27 15:05:34] Connection to remote host was lost.
[connect][2024-05-27 15:05:44] connection to members.tubearchivist.com established
[error][2024-05-27 19:45:11] Connection to remote host was lost.
[connect][2024-05-27 19:45:21] connection to members.tubearchivist.com established
[error][2024-05-28 11:36:14] Connection to remote host was lost.
[connect][2024-05-28 11:36:25] connection to members.tubearchivist.com established
[error][2024-05-28 14:12:51] Connection to remote host was lost.
[connect][2024-05-28 14:13:01] connection to members.tubearchivist.com established
[message][2024-05-28 16:00:23] new message: {'download': ['itBBsQRv0EU']}
[message] video ids sent to TA: {"data":[{"youtube_id":"itBBsQRv0EU","status":"pending"}]}
Traceback (most recent call last):
  File "/app/client.py", line 163, in <module>
    rel.dispatch()
  File "/root/.local/lib/python3.11/site-packages/rel/rel.py", line 228, in dispatch
    registrar.dispatch()
  File "/root/.local/lib/python3.11/site-packages/rel/registrar.py", line 125, in dispatch
    if not self.loop():
           ^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/rel/registrar.py", line 135, in loop
    t = self.check_timers()
        ^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/rel/registrar.py", line 172, in check_timers
    if not timer.check(t):
           ^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/rel/listener.py", line 210, in check
    if self.cb(*self.args):
       ^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/websocket/_app.py", line 480, in check
    raise WebSocketTimeoutException("ping/pong timed out")
websocket._exceptions.WebSocketTimeoutException: ping/pong timed out

----------------------------
TUBE ARCHIVIST MEMBER CLIENT
----------------------------
v0.0.3

[startup] all expected environment vars are set
[startup] connecting to TA on url https://tube.domain.tld:443/api/ping/
[startup] TA connection established
[startup] TA answered: {'response': 'pong', 'user': 2, 'version': 'v0.4.8'}
[connect] opening connection to members.tubearchivist.com
[connect][2024-05-28 19:39:15] connection to members.tubearchivist.com established
bbilly1 commented 3 months ago

That is usually when you loose internet connection, or in rare cases, if the server reconnects you. It will retry a few times, but will give up at some point to avoid unneeded spam against the connection API endpoints.

If you are offline, notifications won't get lost, they will get stored on the server for a few days, so next time you connect, you should get the newest notifications.

In the interface, a notification is marked as sent even if you are offline, it will be cached for some time.