SMS cut off at 2000 characters
When sending an unsecured SMS greater than 2000 characters, it appear cut-off in my sent view. The receiver confirmed that the entire text has gone through successfully.
It seems like Signal cuts off displaying SMS messages at about 2000 character, even though it's possible to send longer ones.
Evidence suggests this is also true for Signal messages, not just SMS. :open_mouth:
@liliakai true, I just tested this.
Sending push messages from android is possible with > 2000 characters. The message gets fully trasmitted and shown at Signal-Desktop. But just the first 2000 characters are displayed on android (sending & receiving side)
What is the reason for this 2000 characters limit? Can't be DOS protection, since attachments are way bigger anyway, no?
I'm not sure how to proceed, but I would suggest to raise this limit to at least 20.000 for push messages, since we have desktop clients now as well, and it's an imaginable usecase to copy & paste longer texts I guess.
Since we can't control other SMS apps, I guess incoming SMS should always be displayed at full length, no?
@agrajaghh wasn't there an issue regarding (decryption) speed for larger messages when scrolling through convos?!
@McLoo that rings a bell, but I couldn't find it at the moment though :smirk: but I found #3658 and #3362 (duplicates) :grin:
What's the verdict on this? 20k character limit for displaying sms? Or 20k characters for outbound messages, display full text for inbound SMS as @agrajaghh suggested? 20k limit for everything seems reasonable, I don't think SMS is protocol over which I want to be receiving >20k character messages.
What is the reason for this 2000 characters limit?
From what I gather, there are some performance issues and crashes associated with rendering huge text views in Android.
@liliakai , So you say it's android fault of rendering huge text and we can't solve it?
If it's true, I think this issue should be closed.
Other SMS apps, like Hangouts, are able to render more than 2000 characters just fine.
On Sat, Feb 6, 2016, 12:38 Guri Getsadze [email protected] wrote:
@liliakai https://github.com/liliakai , So you say it's android fault of rendering huge text and we can't solve it?
If it's true, I think this issue should be closed.
— Reply to this email directly or view it on GitHub https://github.com/WhisperSystems/Signal-Android/issues/5146#issuecomment-180817597 .
Okay, so it's not Android's fault.
One thing I(we) know is that in MessageRecorder class, there's variable MAX_DISPLAY_LENGTH with value of 2000 in it. It's referenced in code to cut off characters:
else if (getBody().getBody().length() > MAX_DISPLAY_LENGTH) {
return new SpannableString(getBody().getBody().substring(0, MAX_DISPLAY_LENGTH));
}
I'm strongly interested in reason of displaying max characters number as 2000.
I'm not saying that it's impossible to display long text on Android. I'm saying that with Signal-Android's current front end architecture, naively removing the limit may cause some phones to crash sometimes.
current front end architecture is really common,I think.
If someone is interested in looking into this #3148 has more info on rendering large messages.
The fix could be as simple as preventing the user from sending more characters than 2k. At least they'd know the message wouldn't go through correctly (this should be done on Signal-browser too)
Is there any update? Messages are still getting cut off when either sending or receiving 2000+ characters.
The problem/feature still persists and I would love to at least understand why this cutoff exists, even if nothing can be done about it. I regularly send huge chunks of text I've typed on Simplenote over WhatsApp but sending them over Signal requires breaking them into a series of shorter messages and this really affect both ends of the experience. Just knowing would provide closure.
Possible fix suggested in #4230.
Thanks for pointing me there. How is it a fix though? It is a request, right?
I just wanted to link this issue here.
Addressing your question:
- The limit is set here.
- Hitting "Blame" in the top right of the above mentioned page shows you, that the limit was introduced by https://github.com/WhisperSystems/Signal-Android/commit/724dced8209646df4cb2e0e0543a7dbd2b8bc2b1
- This commit closes #2294 which possibly offers you some information you want
I don't get why they set a limit. Can anyone explain the gist of PR @FeuRenard commented? Did Signal crash because of no limit of messages or something?