question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Etherpad keeps reconnecting after pasting large text

See original GitHub issue

Describe the bug After copy/pasting a lengthy text from a text document into a pad, the pad keeps on periodically reconnecting, partially throwing warnings and/or errors in the browsers JS console. Trying to write in the pad after pasting causes 502’s in the aforementioned console. On reload of the page, the pasted text and any changes after pasting are deleted/have not been saved.

The text used in my case, was from a ‘Lorem Ipsum generator’. Line amount does not seem to matter, as roughly above 10000 characters, the behavior stated occurs, whether they are stretched over multiple lines, or a single one.

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘https://dark.etherpad.com/’ and generate a new pad with a random name.
  2. Copy a text with a length greater than 10000 characters.
  3. Paste the text into the generated pad (Optionally 3.5. Try to write into the pad)
  4. See the reconnected messages, and the JS console warnings/errors

Expected behavior The text is pasted either without error or a warning that this might take a moment due to its length.

Screenshots EP1 EP2

Server (please complete the following information): Both on dark.etherpad.com and a personal server:

  • Etherpad version: 1.8.12
  • OS: Dockerized Debian Buster Slim
  • Node.js version (node --version): 14.15
  • npm version (npm --version): 6.14.9

as well as:

  • Etherpad version: 1.8.9
  • OS: Dockerized Debian Buster Slim
  • Node.js version (node --version): 14.15
  • npm version (npm --version): 6.14.9

Version 1.8.7 of etherpad is seemingly not affected.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.02
  • Browser: Chrome (88.0.4324.182 64-bit) or Firefox (86.0 64-bit)

Additional Information: Seemingly, copy/pasting smaller pieces of text ins quick succession seems to cause similar errors. Testcase here was ~1200 characters.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rhansencommented, Jul 31, 2021

Unfortunately, the socket.io server-side code silently disconnects the client when the message size is exceeded—it does not send an error message back to the client. There’s no robust way for the client to distinguish a disconnect due to a large message from an ordinary network glitch. Catching the condition isn’t trivial, so improving the UX isn’t trivial.

Possible ways to detect the condition:

  • The server tells the client about the message size limit when the client connects. The client uses a custom socket.io parser (that wraps the default parser) to inspect the size of each serialized message before it hits the wire.
  • Add state on the server so that the server can notify the client about the dropped large message when it reconnects. Knowing when to clean up that state could be tricky.
  • Track disconnects on the client and add a heuristic to interrupt the infinite loop of disconnects.

I think I prefer the first option.

1reaction
koobscommented, Jul 30, 2021

We’re hitting this on our FreeBSD etherpad instance.

Until a complete and permanent proposal can be designed and implemented, could we in the meantime, catch the oversized request and return an appropriate message to the user/admin, with possibly a breadcrumb, mention or link to the setting to modify for release in the next point release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Etherpad v1.7.0 Manual & Documentation
Example: Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the...
Read more >
Case Study: P2PU.org Community calls - FLOSS Manuals (en)
The pad is used in combination with voice and text chat. ... information to the Etherpad adding it form memory, cutting and pasting...
Read more >
https://raw.githubusercontent.com/kentonv/etherpad...
Fix: Etherpad would become unresponsive after 8 or so comment replies had been ... paste text anymore * Fix: Made setPadRaw async to...
Read more >
CHANGELOG.md · use-rehype-minify-whitespace - GitLab
Fixed rate limit accounting when Etherpad is behind a reverse proxy ... don't paste text anymore; Fix: Made setPadRaw async to import larger ......
Read more >
Node.js, Redis, and Etherpad Lite - Bigdinosaur Blog
Etherpad Lite is a real-time collaborative text editor which allows multiple users to simultaneously fiddle with a document. Everyone can see everyone ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found