stream-chat-js icon indicating copy to clipboard operation
stream-chat-js copied to clipboard

GetOrCreateChannel failed with error: "Cannot create a channel with a '!' in the ID, this is a reserved character.

Open Advait1306 opened this issue 2 years ago • 5 comments

I was testing my code to create channels and encountered this error. Note that I'm not sending an id explicitly while creating a channel, the documentation says that it will create one on its own.

Steps to reproduce:

  1. Create a channel from a node js server.
  2. Hard Delete the channel from get stream dashboard.
  3. Try creating a channel with the same member & without restarting the server.

This issue seems to go away as soon as I restart my server.

Stack:

  1. Flutter
  2. Node js (firebase functions)

Code:

channel creation:

const channel = chatClient.channel("messaging", {
      members: members,
      created_by_id: "Matchmaker",
    });

await channel.create();

Error:

 code: 4,
 message: `GetOrCreateChannel failed with error: "Cannot create a channel with a '!' in the ID, this is a reserved character."`,
 StatusCode: 400,
 duration: '0.00ms',
 more_info: 'https://getstream.io/chat/docs/api_errors_response',
 details: []

Advait1306 avatar Feb 18 '23 12:02 Advait1306

I was able to reproduce it, thank you for opening a ticket. I will let you know when it is fixed.

yaziine avatar Mar 08 '23 12:03 yaziine

@yaziine any updates on this?

Advait1306 avatar Apr 28 '23 06:04 Advait1306

I was reproduce it error after using

await channel.delete()

and Create or watch the same member here my question about it

JerryId avatar Jul 13 '23 08:07 JerryId

This is still an issue. When you delete a channel and create it again with the same members, you get this error. If you wait 30 minutes after deleting, then you can create it without issues.

andreaslydemann avatar Aug 13 '24 06:08 andreaslydemann

I'm still facing this issue. Does anyone knows how to solve it?

Almopt avatar May 31 '25 14:05 Almopt