Skip to content

API returning 429 in New Chat Screen #5806

@Sagar0-0

Description

@Sagar0-0

Describe the bug
https://chat.stream-io-api.com/channels/messaging/query?connection_id=67d94147-0a05-1051-0200-000007349c02&api_key=qx5us2v6xvmh returned 429

SDK version

  • 6.16.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to New Chat screen
  2. Click on some users, 8 in my case.
  3. Select and deselect some user(same or different) multiple times.
  4. See error toast "Failed to create draft channel.
(OkHttp https://chat.stream-io-api.com/...:1134) --> POST https://chat.stream-io-api.com/channels/messaging/query?connection_id=67d94147-0a05-1051-0200-000007349c02&api_key=qx5us2v6xvmh (404-byte body)
(OkHttp https://chat.stream-io-api.com/...:1134) 
(OkHttp https://chat.stream-io-api.com/...:1134) {"state":false,"watch":false,"presence":false,"messages":{},"watchers":{},"members":{},"data":{"draft":true,"members":[{"user_id":"aabbcc"},{"user_id":"Qx9RyXxOWp3Rer6undefinedQ1ut7"},{"user_id":"Abdallah"},{"user_id":"vdx47uxHx4NfMQZYGy3ML"},{"user_id":"Ok4ikX8poBaYU6ZkJKKBy"},{"user_i ...
(OkHttp https://chat.stream-io-api.com/...:1134) --> END POST (404-byte body)
(OkHttp https://chat.stream-io-api.com/...:1134) curl -X POST -H "User-Agent:Chat Sample Compose / 6.16.0-DEBUG(1); StandAloneInstall; (realme; RMX3371; SDK 34; Android 14)" -H "Content-Type:application/json" -H "stream-auth-type:jwt" -H "X-Stream-Client:stream-chat-android-compose-6.16.0|os=Android 14|api_version=34|device_model=real...
Skipped: false 1 cost 21.723978 refreshRate 16647444 bit true processName io.getstream.chat.android.compose.sample.debug
(OkHttp https://chat.stream-io-api.com/...:1134) <-- 429 https://chat.stream-io-api.com/channels/messaging/query?connection_id=67d94147-0a05-1051-0200-000007349c02&api_key=qx5us2v6xvmh (140ms, 238-byte body)
(OkHttp https://chat.stream-io-api.com/...:1134) <-- END HTTP (238-byte body omitted)
(DefaultDispatcher-worker-23:1114) API call failed (attempt 1). Giving up for now, will retry when connection recovers. Error was NetworkError(message=GetOrCreateChannel failed with error: "Too many requests, check response headers for more information."
More information available at https://getstream.io/chat/docs/api_errors_response, serverErrorCode=9, statusCode=429, cause=null)

It fails for a few seconds, and then it'll work. Maybe only a test-environment issue, and I was unknowingly abusing the API?

Expected behavior
It should work as expected and select all users who have been clicked, and the API should return 201.

Device:

  • Vendor and model: Realme GT
  • Android version: 14

Screenshots
If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions