Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yatish1910 opened this issue May 3, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@Yatish1910
Copy link

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 Yatish1910 added the bug Something isn't working label May 3, 2024
@GrayaMax
Copy link

GrayaMax commented May 3, 2024

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.

@Yatish1910
Copy link
Author

Hi Stream ,
Any Update on this bug/issue?

@lachlan-eagling
Copy link

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

@JcMinarro
Copy link
Member

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

@JcMinarro
Copy link
Member

@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.

@lachlan-eagling
Copy link

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?

@JcMinarro
Copy link
Member

@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

@prekogdevs
Copy link

Hey @JcMinarro
Do you have an update on this?

@JcMinarro
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants