RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.55k stars 10.57k forks source link

Livechat message size seems limited on 0 chars #22356

Open zigichrigi opened 3 years ago

zigichrigi commented 3 years ago

Description:

Livechat client cant write messages.

Steps to reproduce:

  1. Click on livechat button
  2. Start typing (counter underneath the textbox increases, it says for example 1 / 5000) and press enter.
  3. Message isn't sent and an error message appears "message-length-exceeds-character-limit". So the client isn't able to send one single letter!

Expected behavior:

As long as the counter is below its maximum, the message should be accepted.

Actual behavior:

The client can't send any messages.

Before clicking on send button: grafik

After clicking on send button: grafik

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

Jun 15 09:43:07 rocket1 rocketchat[32275]: API ➔ debug POST: /api/v1/livechat/message Jun 15 09:43:07 rocket1 rocketchat[32275]: API ➔ debug Failure { Jun 15 09:43:07 rocket1 rocketchat[32275]: statusCode: 400, Jun 15 09:43:07 rocket1 rocketchat[32275]: body: errorClass [Error]: [message-length-exceeds-character-limit] Jun 15 09:43:07 rocket1 rocketchat[32275]: at Object.post (app/livechat/server/api/v1/message.js:45:11) Jun 15 09:43:07 rocket1 rocketchat[32275]: at app/api/server/api.js:394:82 Jun 15 09:43:07 rocket1 rocketchat[32275]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) Jun 15 09:43:07 rocket1 rocketchat[32275]: at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) Jun 15 09:43:07 rocket1 rocketchat[32275]: at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) Jun 15 09:43:07 rocket1 rocketchat[32275]: at packages/nimble_restivus/lib/route.coffee:59:33 Jun 15 09:43:07 rocket1 rocketchat[32275]: at packages/simple_json-routes.js:98:9 { Jun 15 09:43:07 rocket1 rocketchat[32275]: isClientSafe: true, Jun 15 09:43:07 rocket1 rocketchat[32275]: error: 'message-length-exceeds-character-limit', Jun 15 09:43:07 rocket1 rocketchat[32275]: reason: undefined, Jun 15 09:43:07 rocket1 rocketchat[32275]: details: undefined, Jun 15 09:43:07 rocket1 rocketchat[32275]: errorType: 'Meteor.Error', Jun 15 09:43:07 rocket1 rocketchat[32275]: success: false Jun 15 09:43:07 rocket1 rocketchat[32275]: } Jun 15 09:43:07 rocket1 rocketchat[32275]: }

infin8loop commented 3 years ago

I experienced this same problem when I upgraded from 3.6 to 3.15. It looks like it changed the default enabled state for Omnichannel message length limit from off to on. I was able to find and resolve the issue in the OmniChannel configuration -> Live Chat Appearance (formerly OmniChannel Appearance) -> Message Character Limit. In my case, it had been turned on. Switching it off resolved the problem.