Skip to content

Text sync problems with multiple users editing the same pad #4978

@ingoncalves

Description

@ingoncalves

We recently noticed a problem with text synchronization between users. Apparently randomly, a user stops synchronizing the editions in the text, and after reloading the page, all the text is lost forever.

By stressing the problem, we were able to establish one of the possible scenarios to reproduce the problem in a very consistent way.

To Reproduce

  1. Two or more users on the same pad
  2. User 1 has a problematic connection (slow or with packet loss)
  3. User 1 types composite characters (eg: ' + e = é)
  4. User 2 types any characters simultaneously with User 1
  5. User 1 stops receiving changes from User 2 and submitting changes to the server
  6. User 2 stops receiving changes from User 1
  7. User 1 refreshes the page and loses his editions

Expected behavior

  • All users have the same text

Video
This video shows the bug in action, were I follow the same steps described above. The left user is the User 1 (running in a VM) and the right one is the User 2 (running in the host machine). I use a simple robot to type characters in the pad for both users. I also use a network conditioner to simulate bad conditions. I left the Chrome Dev Tools opened in the Network tab, were we can the message flow through the socket, filtering messages with changset info.

We can notice that at certain moment, User 1 stops sending his changesets (green messages). After refreshing the page, he loses all his editions. The User 2 is not affected and keeps his editions after reloading the page.

edited.mp4

Server (please complete the following information):

  • Etherpad version: 1.8.13

Desktop (please complete the following information):

  • OS: macOS Big Sur 11.2.3, macOS Catalina 10.15.7 and Ubuntu 14.04
  • Browser: Chrome 89.0.4389.90; Safari Version 13.1.3 and 14.0.3, Firefox 72.0.2 and 87.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions