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

bug: queryChannels doesn't always return full channel list #1078

Closed
joelpierre opened this issue Dec 16, 2022 · 13 comments
Closed

bug: queryChannels doesn't always return full channel list #1078

joelpierre opened this issue Dec 16, 2022 · 13 comments
Labels
question Further information is requested

Comments

@joelpierre
Copy link

joelpierre commented Dec 16, 2022

We are using the queryChannels function and it doesn't always return the users full list of channel Ids.

As you can see from the video below on subsequent reloads the user sees different sets of data. Is this a caching issue on your end? I have seen this with setups that use a horizontally scaled elastic cache setup that don't keep instances in sync?

Curious to hear your thoughts

"stream-chat": "8.1.3"

Screen.Recording.2022-12-16.at.17.09.08.mov
@vanGalilea
Copy link
Contributor

@joelpierre thanks for reaching out. Can you please share your implementation via a code sandbox to get us started with triaging?

@vanGalilea vanGalilea added the question Further information is requested label Dec 19, 2022
@joelpierre
Copy link
Author

Hey @vanGalilea will sort something out soon. I don't want to expose any keys here, but I will see about using your demo key at least 👍🏽

@joelpierre
Copy link
Author

@vanGalilea - If it helps this is the client request id for the faulty fetch: fc08f088-d1b1-4afe-a8a5-04aa984c2077 and this is the request id for the fetch that returned all channels: d86df867-b467-402e-aa34-e1244fcff41c.

I tried to replicate... but I can't with the sandbox 🤷🏽 but I have put the fetch in that we are using via your client https://codesandbox.io/s/inspiring-breeze-mcnffb?file=/src/App.tsx

@joelpierre
Copy link
Author

@vanGalilea any update? We also tried using the usePaginatedChannels hook from the react SDK and have the same issue which highlights to me its a stream issue IMO. There are no signs of rate limiting etc either.

@joelpierre
Copy link
Author

Hi there, any update on this? It's really really impacting our clients

@vanGalilea
Copy link
Contributor

Hi @joelpierre we're still investigating the matter. Not being able to reproduce the issue makes things a bit more challenging for us.

@joelpierre
Copy link
Author

@vanGalilea I would be happy to jump on a call, give you a test account etc to test it?

@ferhatelmas
Copy link
Contributor

If an application is old, we filter channels a user can't access. If newer application, this returns an error with the explanation. This is the case for backward compatibility.

Your filters are too generic, it might be matching to these channels. Try to replace $nin with $in of type of what you care. Increasing specificity of filters should be the first direction.

@joelpierre
Copy link
Author

Thanks @ferhatelmas , we will try this and get back to you

@joelpierre
Copy link
Author

@speediac FYI

@joelpierre
Copy link
Author

Update on the above guys @vanGalilea & @ferhatelmas - We have an app release scheduled for today to test in production the changes to the filters you suggested. Will update if the issue is resolved 👍🏽

@joelpierre
Copy link
Author

@vanGalilea @ferhatelmas - It appears that being more specific with the filters we use has indeed helped and our channels are returning as expected now. I would still say this is a bug however as I would expect a simple filter to work, just as well if not better than a more complex filter.

@vanGalilea
Copy link
Contributor

@joelpierre, thanks for getting back to us. I'm happy that it works for you, as expected.

We will revisit this specific use case. In the meanwhile, this issue was moved to an internal backlog list of less urgent feature/docs requests. I'll be closing this issue for now.
Please don't hesitate to contact us in the future if any other questions arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants