Etherpad keeps reconnecting after pasting large text
See original GitHub issueDescribe 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:
- Go to ‘https://dark.etherpad.com/’ and generate a new pad with a random name.
- Copy a text with a length greater than 10000 characters.
- Paste the text into the generated pad (Optionally 3.5. Try to write into the pad)
- 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
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:
- Created 3 years ago
- Reactions:3
- Comments:23 (9 by maintainers)
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:
I think I prefer the first option.
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?