No internet connection
  1. Home
  2. Issues

The chat doesn't automatically fetch new messages

By Niklas @nipos
    2022-03-31 16:34:38.369Z

    Hello there,
    I got my Talkyard installation running (more or less) and tested the chat together with a friend but unfortunately new messages only arrive after reloading the page.
    I checked the network log in Firefox and it doesn't show any attempts to create a websocket, and the AJAX requests are not frequent enough to do a chat.
    I found something about plans to implement Server Sent Events here, but the posts about it are very old.
    Is that implemented already?
    And if yes,(how) can I see them in the network log?
    I'm really not sure if my server configuration is somewhat near to working because that's mostly a testing installation shared between three different private computers.
    We could, however, reproduce the same behavior on the official test instance on https://insightful.demo.talkyard.io .
    New messages are not showing up both here and at my friends computer, only after we reload the page.
    Are we doing something wrong or is that a bug in Talkyard?
    If the latter is true, are there plans to fix it soon, considering I've read posts about Chat issues from 2020 already (probably not the same cause)?
    Thanks in advance,
    Niklas.

    • 4 replies
    1. This has been only partly implemented. Talkyard does use websockets for getting real time updates from the server — however:

      • sometimes the websocket connection breaks, and
      • there's some bug(s) that sometimes make Ty not able to reconnect.
      • And fetching chat messages that got posted, whilst disconnected, hasn't been implemented.

      I haven't looked much into this, since most people use Ty for Q&A and a discussion forum, and use something else for chatting. Anyway if Ty doesn't try to connect at all via websocket, then ... maybe the file talkyard-service-worker.min.js wasn't loaded properly somehow.

      1. B@bbaovanc
          2022-04-06 14:35:31.740Z

          I found that uBlock Origin was blocking the /-/track-reading-text endpoint and after whitelisting it, it works for me. Should this endpoint be renamed? I think having track in the name makes it prone to being seen as an analytics tracker.

          1. B@bbaovanc
              2022-04-06 14:54:21.579Z

              Actually, it might not be that specific endpoint, but there was something uBlock Origin was blocking and disabling it fixed it.

          2. N
            In reply tonipos:
            Niklas @nipos
              2022-04-01 15:33:56.616Z

              Thank you very much for your help.
              It doesn't need to be perfect, only working good enough to have a nice talk there.
              I didn't know that Talkyard is trying to use a Service Worker to start the Websocket connection.
              That's the reason why I couldn't see it in the network log for the Talkyard Tab.
              Maybe it's an issue with my server then, I'll have to investigate that.
              The only thing I don't really understand... New chat messages also don't appear on insightful.demo.talkyard.io where I expect everything to be set up correctly.

              You're probably right that Talkyard is better for a forum than a chat, but that this feature is available is my main reason for choosing Talkyard over Discourse and its hundreds of lightweight clones.
              My current XenForo install is mainly used for the unofficial dev/admin team chat, the forum part sometimes doesn't see new posts for months, anyways I'd like to keep both sections in the new forum (but with the chat clearly being the higher priority, at least until the forum has a few active members).