-
Notifications
You must be signed in to change notification settings - Fork 346
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
Allow using native HTTP #1989
Comments
I have also been seeing a lot of Bad File descriptor errors in the production implementation of my app that incorporates StreamChat. We monitor with Firebase Crashlytics, and have seen them since we implemented StreamChat in our app, but have just barely getting reports of it effecting users where they switch apps and the app crashes, and we have tied the multiple login attempt times to the crashlytics times. It would be good to get a resolution of some sort! Looks like this was reported months ago and the issue was closed by a bot: #1899 |
This issue is stale because it has been open for 20 days with no activity. |
Hey @knaeckeKami, Thanks for the issue. At the moment we are a bit busy with higher priority issues but we are in the process of expanding our Flutter team as we speak. I am adding this to our backlog - once we get some additional capacity, we will try to look into this possibility. Thanks! |
Thanks! Feel free to use my suggestion in #2005 |
Please select which package this feature is related to
stream_chat
Which platforms would this feature impact?
iOS, Android, MacOS
Is your feature request related to a problem?
The HTTP Implementation in dart:io has many known issues.
stream_chat
uses dio, with uses the http implementation from dart:io by default. It can be configured to use other implementations as well though, for example using https://pub.dev/packages/native_dio_adapterBut
stream_chat
does not expose the Dio client via exports, so it's not possible for users to change that.Even when importing private APIs, it's difficult and error-prone to do so, as one would need to pass their own
StreamChatApi
with a custom implementation ofStreamHttpClient
to theStreamChatClient
.Describe the solution that you'd like
I would like
stream_chat
to allow for a way to configure dio'shttpClientAdapter
.A flexible way to do so would be to allow passing in a
Dio Function() dioFactory
, where users would be able to do something likeDescribe alternatives that you have considered
I would also be ok with defaulting to
NativeAdapter
, but this would introduce a new dependency to stream_chat and slightly increase bundle size for users who don't already depend oncupertino_http
orcronet_http
, so I can imagine that this is not a desired solution.Additional context
It seems that it was an architectural decision to make using dio an implementation detail which is not exposed to the user, and this would break that.
I understand that, but given the limitations of the of the current approach I think that overall, this is still worth it.
Code of Conduct
The text was updated successfully, but these errors were encountered: