Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sent messages in timeline of a topic #131

Open
chamdim opened this issue Dec 18, 2024 · 4 comments
Open

Sent messages in timeline of a topic #131

chamdim opened this issue Dec 18, 2024 · 4 comments

Comments

@chamdim
Copy link
Contributor

chamdim commented Dec 18, 2024

Sometimes (the app was downloaded via the Play Store) after sending a message to a topic, there is a possibility that the message does not appear immediately in the sender's timeline but shows up immediately in the recipient's timeline.
The appearance of the message in the sender's timeline can take 10-30 minutes after it is sent, which causes confusion. If the message does not appear on the sender's phone, neither does the recipient's reply.
Force closing the app or clearing the cache memory on the sender's phone does not help, and the timeline is restored at a random time.

The phones used for testing were a Samsung S21 and a Samsung Fold, both running Android 14

@balzack
Copy link
Owner

balzack commented Dec 20, 2024

Does this issue appear when using the browser? If so, do you see any errors in the browser console log? Do you see any error messages in the container log?

The messages appear in the topic thread when indicated by a websocket connection, even if that app just posted the messages. It's hard for me to tell why there is a delay without further information, but I would initially look at the setup of the server and see if there is anything that could cause the websocket connection to break or prevent the connection. Perhaps there is some network security in place seeing the websocket connection requests as a threat?

I'm sorry I can provide more insight without some more details. Perhaps there is a bug, but this has not been reported by other users.

@chamdim
Copy link
Contributor Author

chamdim commented Dec 20, 2024

I haven't noticed anything similar on the web.

The issue appears randomly and resolves itself randomly. Calls during the issue function normally. I can't understand how network security affects some random messages and not, for example, voice calls, which involve a larger data volume and would presumably be more prone to throttling by the reverse proxy.

My setup is on Ubuntu Server 24.04.1, and as a reverse proxy, I use Cosmos Cloud with all shields disabled and only protection against common bots enabled. I have the same reverse proxy settings for Dendrite, which works perfectly fine.

@balzack
Copy link
Owner

balzack commented Dec 20, 2024

Is the delay by chance related to sending a very long string with no spaces? There is a bug which I have yet to push the fix out to android, where the tokenizer/sanitizer for clickable URLs was really slow, and could lead to a long period of unresponsiveness. I don't think that's your problem since you mentioned the 2nd android phone doesn't have that delay.

It's possible the communication mechanism used by databag (websockets) is related to the issue. In my reverse proxy for example, I need to specifically enable websocket support. I believe element/dentrite uses a polling get to receive updates.

I am usually able to resolve issues quickly that I can reproduce, so I will try and mirror your environment and see if I can that way. How frequent is the delay? Is the issue likely to be seen when using the app for 5min?

@chamdim
Copy link
Contributor Author

chamdim commented Dec 21, 2024

I do not receive errors from the reverse proxy. Cosmos Cloud supports WebSocket by default.
However, in their Discord community, I couldn't figure out how to set the URL properly to achieve optimal performance for applications requiring WebSocket.

Imagine that some users configure the URL as "ServApp-container", while others as "proxy" (pointing the local app's IP to the subdomain) to get things working correctly. Someone even disabled protection against common bots.

In my case, whether I configure the URL as servapp-container or as proxy, I don’t get any errors.

The only noteworthy observation I could share is that, with both setups, I receive the following response (focus on status):

{
  "id": "67665549420bf19a710f0f27",
  "label": "Proxy Response databag success",
  "application": "Cosmos",
  "eventId": "cosmos.proxy.response.databag.success",
  "date": "2024-12-21T05:42:17.022Z",
  "level": "info",
  "data": {
    "bytes": 0,
    "clientID": "my_pyblic_ip",
    "hostname": "databag's_subdomain",
    "method": "GET",
    "route": "databag",
    "status": 0,
    "time": 36.18142271,
    "url": "/status?mode=ring"
  },
  "object": "route@databag"

All the other events have status either 200 or 304, which i presume is perfectly fine.

I've changed the URL's mode and left it as proxy with all shields disabled, even the common bots protection, and I’ll follow up later.

Also, I don’t have an answer for your last two questions.

Finally, something unrelated: I haven’t been able to enable push notifications on Brave, no matter how hard I try. A popup appears with the error message: "Operation failed, please try again."
I don’t face this issue on Firefox.

UPDATE

No luck at all. The same issues. Here is the warning from reverse proxy

{
  "id": "67668d8e420bf19a710f2466",
  "label": "Proxy Response databag error",
  "application": "Cosmos",
  "eventId": "cosmos.proxy.response.databag.error",
  "date": "2024-12-21T09:42:20.689Z",
  "level": "warning",
  "data": {
    "bytes": 0,
    "clientID": "my_pyblic_ip",
    "hostname": "databag's_subdomain",
    "method": "GET",
    "route": "databag",
    "status": 500,
    "time": 5.009944357,
    "url": "/content/channels?agent=e242a162cdb65f8d37e1f66d8e980e4e6fcb7b213f9dcd9cbb684cd87d0f9109&channelRevision=116&types=%5B%22sealed%22%2C%22superbasic%22%5D"
  },
  "object": "route@databag"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants