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

The API are sending correct response but Android SDK is failing to give in succes callback.

Open Yatish1910 opened this issue 1 year ago • 9 comments

Describe the bug We are trying to get list of members based upon some filters, in app inspection API is giving 200 Status Code and response is alse there, but from android side failure callbnack is only getting called. SDK version

  • 6.3.2

To Reproduce Please see the below code

private fun getUsers() {
        Log.d("totalId", args.idList.toList().toString())
        val userGetStreamId = client.getCurrentUser()?.id
        if(userGetStreamId != null){
            val filters = Filters.and(
                Filters.`in`("id", args.idList.toMutableList()),
                Filters.ne("id", userGetStreamId)
            )
            val request = QueryUsersRequest(
                filter = filters,
                offset = 0,
                limit = 0,
                QuerySortByField.ascByName("name")
            )
            client.queryUsers(request).enqueue {
                when(it){
                    is Result.Failure -> {
                        Log.d("createUserListStatus", it.value.message)
                    }
                    is Result.Success -> {
                        val users: List<User> = it.value
                        Log.d("userSuccess", users.toString())
                        createChannelsAdapter.submitList(users)
                    }
                }

            }
        }

Expected behavior It should trigger Success callback and list should have data.

Device:

  • Moto G52
  • Android version: [13]

Yatish1910 avatar May 03 '24 12:05 Yatish1910

I have the same issue, if it can help, there is an issue with the parser for User item. It's an issue with data received.

We get this error : NetworkError(message=Response is failed. See cause, serverErrorCode=1000, statusCode=-1, cause=com.squareup.moshi.JsonDataException: com.squareup.moshi.JsonDataException: Expected BOOLEAN but was null at path $.invisible at $.users[1])

The model used to parse the response seems to have invisible value not nullable and we receive null value.

GrayaMax avatar May 03 '24 14:05 GrayaMax

Hi Stream , Any Update on this bug/issue?

Yatish1910 avatar May 07 '24 10:05 Yatish1910

Hey Stream Team,

My team is also experiencing this issue, we hadn't made any change to the implementation in our app, or change SDK version implying something in API response has changed.

cc @allanswer & @zeroarst

lachlan-eagling avatar May 09 '24 01:05 lachlan-eagling

Hello there. Thanks for reporting it. We are fixing it and will be ready soon.

JcMinarro avatar May 09 '24 07:05 JcMinarro

@Yatish1910 @GrayaMax @lachlan-eagling A provisional fix has been done on #5257 But it looks like some changes in our backend, and they are fixing it as well to ensure any old version keeps working as before.

JcMinarro avatar May 09 '24 08:05 JcMinarro

Thanks @JcMinarro, appreciate the quick turnaround on this one.

Is there anywhere I can get updates on backend team's fix to ensure older versions continue working?

lachlan-eagling avatar May 09 '24 09:05 lachlan-eagling

@lachlan-eagling The updates on the backend development are not on a public repo but I can assure you our backend team is already working on it and will be ready soon. The older SDK versions should be working as usual after it is updated on the backend

JcMinarro avatar May 10 '24 08:05 JcMinarro

Hey @JcMinarro Do you have an update on this?

prekogdevs avatar May 20 '24 08:05 prekogdevs

Hello @prekogdevs Our Backend Team already changed it, but maybe your App has not received the update yet. Would you mind opening a ticket here with your AppId then we can ensure your app already received the update? Try not sharing your AppId here on Github, as it is private data you shouldn't share, that is because I am asking you to open a ticket there. You can mention me there

JcMinarro avatar May 20 '24 09:05 JcMinarro

@prekogdevs @lachlan-eagling @GrayaMax @Yatish1910 It should be already fixed on backend and deployed to all apps. Could you verify it is working fine on your apps?

JcMinarro avatar Jul 09 '24 12:07 JcMinarro

This issue has been automatically closed because there has been no response to our request from the original author. Please don't hesitate to comment on the bug if you have any more information for us - we will reopen it right away! Thanks for your contribution.

github-actions[bot] avatar Jul 17 '24 00:07 github-actions[bot]