Skip to content

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

Open
@Advait1306

Description

@Advait1306

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: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backend TeamThe backend team is in charge of this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions