Getting bad request when creating a channel

Description

This issue was just noticed today (it may have been around for awhile) but when full permission users go and try to create a public channel, it gives us a bad request error.

bad request

The logs dont show an error. Here is what the logs say:

Log Entry
I20220408-17:40:36.042(0) createChannel {   id: 'M6bkxmabNpSS6XExb',   clientAddress: '192.168.46.143',   httpHeaders: {     connection: 'upgrade',     host: 'rocketchat.wallawallaclinic.com',     'x-real-ip': '192.168.46.143',     'x-forwarded-for': '192.168.46.143',     'x-forwarded-proto': 'https',     'x-nginx-proxy': 'true',     'content-length': '123',     accept: '*/*',     'x-auth-token': 'yQhS6xFWtoamHlHzw8FgeAaza89pXEeAQtJ6mYc2Y6B',     'x-requested-with': 'XMLHttpRequest',     'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Rocket.Chat/3.8.2 Chrome/98.0.4758.141 Electron/17.3.1 Safari/537.36',     'x-user-id': 'LHtgHWbLqEx3pcYmM',     'content-type': 'application/json',     origin: 'https://rocketchat.wallawallaclinic.com',     'sec-fetch-site': 'same-origin',     'sec-fetch-mode': 'cors',     'sec-fetch-dest': 'empty',     referer: 'https://rocketchat.wallawallaclinic.com/direct/8kdg9DJt9EsW9EKcaLHtgHWbLqEx3pcYmM',     'accept-encoding': 'gzip, deflate, br',     'accept-language': 'en-US',     cookie: 'rc_uid=LHtgHWbLqEx3pcYmM; rc_token=yQhS6xFWtoamHlHzw8FgeAaza89pXEeAQtJ6mYc2Y6B'   },   userId: 'LHtgHWbLqEx3pcYmM' } 

Server Setup Information

  • Version of Rocket.Chat Server: 4.6.0
  • Operating System: Ubuntu 20.04
  • Deployment Method: Manual
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 14.0.0
  • MongoDB Version: 4.4.13
  • Proxy: nginx
  • Firewalls involved: None.

Any additional Information

Nothing to add expect it isn’t working. If anyone has a work around i would love to hear it.

I have the same problem. It occurs after update from 4.3.2 to 4.6.1. It Affects creation of Channels, Teams and Discussions

This is what the logs say when i try it in the gui:
"POST /api/v1/groups.create HTTP/1.1" 400 136 "<url-of-server>" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.4984.0 Safari/537.36"

When i try it with curl the log at the rocket chat side says this:
"POST /api/v1/channels.create HTTP/1.1" 400 119 "-" "curl/7.74.0"

While curl says this:
{"success":false,"error":"Cannot destructure property '_USERNAMES' of '_Promise$await' as it is undefined."}

Version: 4.6.1
OS: Ubuntu 20.04
Apps Engine Version: 1.31.0
Node Version: v14.18.3
MongoDB: 5.0.6 / wiredTiger (oplog Enabled)

Issue and workaround are here: Error: Bad Request when creating Channel/Team/Direct Messages/Discussions · Issue #25080 · RocketChat/Rocket.Chat · GitHub

1 Like