sgtaziz / WebMessage

A client for communicating with the WebMessage tweak on iOS. Send and receive messages from the comfort of your computer
73 stars 12 forks source link

[Bug] Lag #119

Closed sabogalc closed 3 years ago

sabogalc commented 3 years ago

Screenshot 2021-03-10 223610 PNG image So this one is a really hard one to capture on camera as well as to describe. However, I will do my best to use these pictures as an example of what I mean, as well as adding my own experience with lag-based bugs.

About 9/10 times, WebMessage works exactly as intended, and sometimes it even receives notifications before my other devices. However, lag is an issue that is especially apparent when many messages are being sent and received at the same time.

In the pictures above, all of my messages were sent from WebMessage, and the message of interest is put in a red box. I sent this message before I received the "Not in a serious what." message, and refreshing WebMessage fixes the graphical bug of it being out of order. However, many times I'll send a message from WebMessage, and on my other devices I can confirm that it was delivered, but upwards of 40 seconds can pass before I see it in WebMessage (usually less, about 5~10 seconds). Now, I don't think that time is the issue, because as soon as anything happens that would cause WebMessage to reload (e.g. new message or new tapback) the message that I sent that hasn't been displayed yet shows up in WebMessage, as well as whatever new message just came in. That's what happened in this screenshot: I sent the movie spoiler text, I saw on my iPad (different device than WebMessage host) that it was sent right away, but then on my computer I wasn't able to see my sent message until the "Not in a serious what." message came in. At that point, the messages displayed out of order. Many times this causes messages to come in/display out of sync or out of order, and sometimes it even causes the notifications to be behind (however, the notification thing might be a Windows problem, I'll test this further on macOS). Earlier today, I got a strange notification/lag bug that I mentioned here.

One similar lag bug that used to be pretty common but that I think has since been fixed is that of dangling typing indicators. So, someone sends me some messages, and then they finish typing, but WebMessage still shows typing indicators for that person. So I wait about a minute or two until the typing indicators go away and I realize that they weren't actually still typing. As of version 0.6.0, I haven't noticed this bug reoccurring. I know there are other lag bugs, but I can't think of them off the top of my head right now. I'll post more in the comments if I stumble upon them.

Again, this app is one of my favorites and I use it every day. I only spend so much time searching for/testing bugs because of how I want to see it become even better. Just because I've got bad things to say in a bug report that doesn't mean that I think the app is bad. Hopefully this all makes sense and hopefully other people have experienced this/can weigh in too 👍

sgtaziz commented 3 years ago

The out of order issue is actually not necessarily related. WebMessage currently sorts texts as they come in, not by the date sent (this was changed recently due to another weird bug). It is a quite simple fix that requires just a bit more research to fix other bugs relating to it.

For the issue of a message not appearing, it is in fact a Vue-related bug. You will notice that if you go to a different chat and then go back in, the message will load correctly. Vue handles variable changes by what's called an "Observable" variable. This variable can get messy to notify that it was changed, especially when it is a big array with objects and subarrays. Though again, should not be that bad of a fix, might require some dirty pieces of code but maybe 1-2 lines max. Both issues I've experienced and I'm aware of, but they are very rare and I haven't focused much time on then.

I will look into this ASAP and reflect these changes in the coming version. No need to explain yourself, I appreciate your constant feedback and only have positive thoughts:) Hope I was able to explain the underlying issue better!

sabogalc commented 3 years ago

Thank you, that explanation was definitely helpful! The other day, Zach from BlueBubbles said this "the android client sorts by the ROWID from the database (from what i remember). That's the ROWID of the messages directly from your macOS app" However, this might not be applicable because of the iOS/macOS difference (I'm not sure about all the differences between ChatKit vs. chat.db and such). However, in some very rare instances, people do report out of order messages in BlueBubbles Android. In almost 4 months of daily use, I've only had this bug happen once

sabogalc commented 3 years ago

While it is slight, I am still unfortunately facing lag.

https://user-images.githubusercontent.com/53708281/124848433-d485d480-df6a-11eb-8c2f-d0653a6f3211.mp4

In this video, I sent a text from WebMessage, and I have MyMessage open in the background/bottom. You can see the message show up in MyMessage right away, but it takes a little while for it to show up in WebMessage. This video also shows issue #131