bibledit / cloud

Source code for Bibledit core library and Cloud binary
GNU General Public License v3.0
13 stars 3 forks source link

Cloud and client giving many green messages #424

Closed warpok closed 4 years ago

warpok commented 4 years ago

The green text loaded messages keep potting up, maybe 25 times this afternoon. Just now in Nehemiah 2:20 the green message appeared 5 times while working on just that verse alone.

But I am the only one working on it. Screenshot_20200901-171721_Chrome

warpok commented 4 years ago

I am using version 5.0.910.

In the last verses I worked on I was using the on-screen keyboard, and that might have something to do with it. On perhaps the problem is somehow caused by working on the last verse in a chapter.

teusbenschop commented 4 years ago

Sigh, the green message is back again...

But yeah, thanks for reporting it, we're going to fight till the green message stays away, and only comes up when it is supposed to.

warpok commented 4 years ago

I am thankful for your spirit in this. I have experienced 20 green messages today, sometimes there are two in quick succession (8 seconds). This was in Nehemiah 3:1-5 only, in the space of about one hour.

warpok commented 4 years ago

Working now in the cloud program using the Chrome browser on my tablet, I have seen 8 green messages in about 8 minutes. In one of them the last letter I typed was erased!

warpok commented 4 years ago

I have seen the green message now on my Windows remote desktop, using the Windows client. I have seen it on Linux also.

Yesterday again using the Android tablet, I had 4 messages appear in Neh. 4:11, one in v13, one in v16, 2 in v19, and two in quick succession in v21, plus three more in other places. At one point I felt like the message occurred when I was using the arrow keys repeatedly. But then I couldn't make it happen again using the arrow keys. Then I thought that the message come up when a save is done every 5 minutes. I got 5 messages at these times in the afternoon: 2:19, 2:41, 2:42, 3:02, and 3:05. So it doesn't seem to happen (intermittently) right at the save times.

teusbenschop commented 4 years ago

Yes, it helps if we were to know when and under which circumstances the green messages come up.

One thing that's important is that at times when entering or editing a footnote, then the system updates the notes, so that leads to a green 'text reloaded' message.

Are the green messages in some way perhaps related to entering or editing footnotes?

warpok commented 4 years ago

I believe that I have seen the green messages when editing footnotes. Chapter 4 yesterday had only one footnote, and from my notes, I think I saw the message on that verse. But I definitely was not editing footnotes the other times.

warpok commented 4 years ago

Today I saw lots of green messages again. I was trying to see a pattern. I was using my Samsung tablet and a bluetooth keyboard in the client app. The pattern I see is that the messages tend to happen when I do things quickly, such as quickly using arrow keys, or holding them down, or holding the backspace key down. Working with footnotes does compound the problems.

Often times the green message will appear for a second or less, and then blank and immediately reappear.

teusbenschop commented 4 years ago

Seeing a pattern definitely will help in finding a way forward in this matter.

I can try doing editing quickly too, and see where they messages come from.

I wonder whether limiting the number of green messages per unit of time will help?

warpok commented 4 years ago

By the way, the title of this thread should be changed. This happens in the cloud and all client apps.

Limiting the messages would reduce interruptions, but hide the bug. If you can find the bug quickly, that would be best. But if it will take a while, it could keep our users happier to not have the interruptions.

I wonder if you have seen the bang bang double message. It doesn’t stay on the screen 8 seconds, but more like 4 1/2 seconds, because the first appearance disappears so fast. I wonder if finding the cause of those would point to the main problem.

teusbenschop commented 4 years ago

By the way, the title of this thread should be changed. This happens in the cloud and all client apps.

I've changed it, for better clarity, indeed.

Yes, the system should not be hiding the bug but rather resolve it.

I have not seen the bang bang double message yet, but will see it once I start typing quickly, I guess.

warpok commented 4 years ago

Today using the cloud on my tablet. I first was using my bluetooth keyboard. I got messages. But just now using the on-screen keyboard I am getting tons of green messages. It seems like every word I type I see the message.

warpok commented 4 years ago

Probably I exaggerated in that last message. I wonder: Is the green message based on the chapter or the verse. I am only interested in the message coming up if I have been supplied with updated text in the verse I just left or the verse I am currently in. I am of course glad if a team member has fixed something in some other verse, but I don’t want to observe such things normally.

teusbenschop commented 4 years ago

In the verse editor it is based on the verse only.

warpok commented 4 years ago

I didn’t realize that. Almost all my work is in the editone/index. If I work a full day like today, the 50 messages I see in a day are all false. Usually I can see no change, except that occasionally 1-3 letters that I have just typed disappear.

warpok commented 4 years ago

I wonder if odd things based on my workspace might cause the messages.

Screenshot_20200907-140416_Chrome

warpok commented 4 years ago

I added the m-dash, causing the word to go too far into the margin.

warpok commented 4 years ago

Yesterday, using the Android client, the Internet was weak so I turned it off and continued working. I saw 3 green messages with the wifi off (and without a cellular connection). But those three only happened at the beginning of my time without Internet.

warpok commented 4 years ago

I just received a message from Budi on our team. The green messages in the cloud BE are bothering him and result in loss of some letters typed. I decided to use the client and turn Send/Receive to 'manually'. I was hoping that using that method might help Budi and the others. It turns out that I still am getting frequent green messages even when the setting is 'manually'. Budi and some of the members are planning to use Google Docs for working instead of Bibledit tomorrow. I hate to see this happen!

teusbenschop commented 4 years ago

Yes, it would not help them much if they switch to Google Docs.

I've been thinking about this issue deeply, and it looks like the whole thing needs a good overhaul. The way it is, the message keeps coming up, it seems not fixable the way it is.

warpok commented 4 years ago

Today with Send/Receive set to manually or one hour, I more often see the messages right after a paste opperation.

teusbenschop commented 4 years ago

This is one of the main causes of the "text reload".

What happens is that after pasting text, the device "reformats" the pasted text, so the pasted text is better in line with the USFM standards as required.

Perhaps you can brainstorm about this text reload after pasting text. How to handle the required "reformat" operation.

teusbenschop commented 4 years ago

If the reload occurs after pasting text, then this is a clear case that could be handled in a way that does not bring up the green message.

  1. To start a "paste" handler right after paste.
  2. The paste handler starts a timeout of, say, one or two seconds.
  3. No green messages are to appear while this timeout is active.
  4. The device cleans up the pasted text, and reloads the updated text.
  5. No green message occurs during reload.
  6. After the timeout has expired, the reload message may appear again.

This way of handling text paste operations, that may fix a lot of text-reloaded messages.

teusbenschop commented 4 years ago

I am trying to get this "text reloaded" message by, working on Android 10, and pasting text, but I can't even get one such green 'text reloaded' message.

Questions:

  1. What text do you paste that brings up the 'text reloaded' message?
  2. What version of Android do you use?
teusbenschop commented 4 years ago

Another question:

It will help me if I could look at your screen to see what's going on there.

The question is this:

Could I please have a screen recording of your Android device, one that captures the text reloaded message?

(There should be screen recording apps for Android out there on the play store).

teusbenschop commented 4 years ago

After carefully studying the code for the verse editor, it appears that a shaky internet connection will cause the "text reloaded" messages too. This is because when the editor reloads or loads the text, and the internet connection fails, it will "reload" the text. And that brings up the green message about "text reloaded".

Do you and/or your team experience shaky internet connections at times?

warpok commented 4 years ago

I am using Android version 10 on my Samsung Galazy Tab S4. Soon I will have an S7. (Can't wait.) I will try to make a screen recording. More soon.

warpok commented 4 years ago

Internet connections are very iffy for my team. For me, less so, since I am in the States. I hope that you can do something so that Bibledit expects bad connections as the norm.

teusbenschop commented 4 years ago

first link: https://drive.google.com/file/d/1dinYEtn6alo8-mSaSOWEllrENg4hwkE-/view?usp=drivesdk

This one in Cloud showing pasting reload message: https://drive.google.com/file/d/1djIzS2gLhc4F0QKPZrA80WVsQxKvkfBF/view?usp=drivesdk

It might have something to do with it that I used the keyboard command to paste this time. https://drive.google.com/file/d/1dk9GsaJpYxYUJhOaTBIaA9tYZSHKhWeu/view?usp=drivesdk

warpok commented 4 years ago

Making sure the files can be viewed: https://drive.google.com/file/d/1U9B6EDWYSyIXI8AE0ixPkyjIiEF-4H9e/view?usp=sharing

https://drive.google.com/file/d/1U8NC2DmeRE_qZ20Tw7Xumd3h1G-QDwZB/view?usp=sharing

https://drive.google.com/file/d/1U8OLnD3Y5VyIkyQIubYGRdSh3HWy7RqV/view?usp=sharing

warpok commented 4 years ago

About the shaky internet connection: How do you explain that the verse editor gives the green message when NOT Connected at all to the Internet?

warpok commented 4 years ago

OK, let me dream for a bit in order to suggest something radically different: As long as Bibledit senses that I am the only one working in a chapter, it should turn off any receiving of text in that chapter. It should wait for me to move on to another verse, or wait for a long period of inactivity and save the text. It would not save every 5 minutes. It would never be saving when a user might be typing or pasting text. (We might have to tell users to always move to a new verse before closing the program. A small 1 second popup saying Text Saved, would be reassuring. Then the user would know that the program could be closed.)

The moment that Bibledit senses that there are two devices committing text to the same chapter, it should open up a floating GoogleDoc window that is shared with both people or x number of people that have the chapter open. The GoogleDoc window would contain the USFM, so would be unformatted. But each user could see who is editing and even the current/recent position of their cursor(s). When editors in the chapter go to 1 or zero, the chapter would be saved to Bibledit. (I have no idea how that could be done! Maybe the last editor would have to save the text manually. Maybe the whole chapter would be sent to each editor by email.) Using GoogleDocs would work quickly because Google has servers all over the world, and we could let Google handle any flakyness of the Internet.

It actually could be a problem that in a single morning, I might work on a chapter's text in the cloud and in a client, and perhaps two clients on two devices. Even though the one or both Android tablets might be turned off, perhaps Bibledit knows that there used to be more than one device editing the chapter. It may happen that I leave my client browser open (or on the Android, in the background) while editing in the Client. This would explain why you never see the green messages, but I do.

I'll continue to think.

warpok commented 4 years ago

Adding to the ideas above, here's another idea which is perhaps more doable: My being in a chapter would place that chapter in the server in read only mode for everyone else. When a teammate loads the chapter, a popup would say, "This chapter is being edited by Oreo. Do you want to join a collaborative session with Oreo?" That user would then be given the choice to answer yes or no. If Yes, then a GoogleDoc would open. The GoogleDoc session would then be open to the two users. They might send a WA message to other team members with a link for them to join also. The group users would have the ability to write GoogleDoc comments to each other, and it would be assumed that they would choose who is to upload the chapter into Bibledit. Bibledit might or might not be able to keep track of the group editing. (It would seem that Bibledit might be able to see a finished GoogleDoc if Bibledit's was the email account that opened a shared session with two people. But at very least, there would be a GoogleDoc somewhere in a shared folder with a name like ISam4 Phil Paula session.)

It really is not all that important that multiple users can edit at the same time, as that seems to be the basis why we have the current buggy system. Whether or not GoogleDocs can be opened by Bibledit, I suggest that only one person can edit at a time. So if I am editing in a chapter and Paula goes into the chapter, then Bibledit would say, "Oreo is editing this chapter. Would you like to take over editing from him?" If she says Yes, Bibledit would ask me if I am willing for Paula to take over editing the chapter.

Going back to the first paragraph in the post above this:

warpok commented 4 years ago

I guess that this really might mean that the Bibledit client would no longer need to send and receive single verses to the server. The cloud program would need to send verses, though, since a user might suddenly disconnect from the Internet.

teusbenschop commented 4 years ago

A new edition of Bibledit Cloud was installed on bibledit.org that has a verse editor that handles shaky networks better than before. The expected result is fewer of the green notifications. Although these notifications still will be expected at least the ones not related to a bad network.

teusbenschop commented 4 years ago

Yet another version of Bibledit Cloud has been installed on bibledit.org what fixes most if not all of the green "text reloaded" notifications. So the good times are ahead!

Note: Only the Cloud was updated, no clients were updated yet.

warpok commented 4 years ago

I can’t thank you enough. I’ll try it out today. How did you do it?! Is there an explanation I could understand?!

On Fri, Sep 18, 2020, 1:49 PM Teus Benschop notifications@github.com wrote:

Yet another version of Bibledit Cloud has been installed on bibledit.org what fixes most if not all of the green "text reloaded" notifications. So the good times are ahead!

Note: Only the Cloud was updated, no clients were updated yet.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bibledit/cloud/issues/424#issuecomment-695029712, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDSIJMX7AY6WM2GTZZ6VP3SGOTTXANCNFSM4QSJOUTQ .

teusbenschop commented 4 years ago

Yes, the explanation is as the following events show.

  1. User edits the text.
  2. Bibledit saves the text.
  3. Saved chapter identifier becomes, say, 10.
  4. Bibledit polls for updated chapter text - network latency delays the response.
  5. User edits more text.
  6. Bibledit saves the text again.
  7. Saved chapter identifier becomes, say, 11.
  8. Bibledit polls for updated chapter text- network latency delays the response.
  9. Network latency takes a while.
  10. First chapter identifier comes in, that is "10".
  11. Network latency takes some time.
  12. Second chapter identifier comes in, that is "11".
  13. Bibledit notices that the chapter ID is now 11, while it was 10.
  14. Bibledit thinks that the chapter was updated, since the ID changed.
  15. Bibledit "reloads" the text.
  16. Bibledit displays the green "text reloaded" message.

I was able to simulate the above sequence, and get the "text reloaded" messages. Then the fix is that whenever Bibledit saves text, it cancels any polling for chapter updates. Cancelling this polling breaks the chain of events above. So that fixes the issue.

teusbenschop commented 4 years ago

The fix is in Bibledit Cloud 5.0.912, now installed on bibledit.org:*.

warpok commented 4 years ago

Budi voiced a grateful thanks for the team: Puji Tuhan, semoga perbaikan ini dapat mempermudah pekerjaan kita. Tolong sampaikan terima kasih kami kepada Teus.

Praise the Lord, may this fix make our work easier. And he asked me to pass on thanks to you from our team.

teusbenschop commented 4 years ago

Glad they are grateful for the fix.

teusbenschop commented 4 years ago

Just to be sure, all relevant Bibledit client editions were updated too. Version number 5.0.912 and higher have the fix.

warpok commented 4 years ago

Bad news! First good news: I just received my Galaxy Tab S7+. This is one NICE machine. I love the wonderful screen and the speed. BUT in the cloud today I am seeing many green messages still. I am jumping around to lots of locations while checking out comments. And no one would be working on my team in Indonesia on all these passages.

teusbenschop commented 4 years ago

Good to have the Galaxy Tab S7+. Fast machine -> Work goes fast too.

With regard to the green messages, I am convinced that the fix now made will help to some degree, because I could see green messages disappear when there was network latency.

Since you still have many of them, I am continuing with this, till such time it's getting fixed.

There's still a two-second timespan than if text reloads within those two seconds, it gives a message. So perhaps here's another angle to attack the issue from.

warpok commented 4 years ago

Today working in the cloud, I didn't see many green messages. They have definitely been reduced. Now I see them appearing at te moment when I switch to a new chapter.

teusbenschop commented 4 years ago

Yes, it was expected that there was a reduced number of green messages.

It is helpful information to know that they now appear when going to a new chapter.

That reduces the number of options to look into.

We're going to tackle this ...

teusbenschop commented 4 years ago

Further fixes were now made to the green "text reloaded" messages. The fixes were installed to Bibledit Cloud version 5.0.914 on bibledit.org.

teusbenschop commented 4 years ago

New Bibledit clients for Ubuntu and for Android were released or are going to be released within 12 hours from now on. The version number of these new clients is 5.0.914.

teusbenschop commented 4 years ago

With reference to the string of green messages seen in thread https://github.com/bibledit/cloud/issues/426, there was a bug in the Javascript that relates to the browser cache.

The bug was described here: https://github.com/bibledit/cloud/issues/431

The fix was installed to bibledit.org.

No green messages should be coming up now in Chrome.

warpok commented 4 years ago

Do I understand you correctly? Are you saying the text reload message is not normally supposed to show up if two people are working in the same chapter? If that is so, Bibledit is very broken. And this should be a reporducable bug. All you have to do is open Bibledit cloud to the same chapter on two devices. I do this frequently, so the user (me) is the same. I do this because the saves me changing keyboards all the time. But even if there are two users, like Joy and me, the same thing happens. The one making the changes will not see the messages, but only the one receiving the changes.