Comments (9)
It was an issue with the latest deployment of our API, this should be fixed now. Thanks everyone for their quick response and feedback 🚀
from stream-chat-flutter.
Hi everyone, I am checking with the team internally to see if there were any API changes. This code block haven't been touched for over 3 years now ...
@AlaaAbdelbaki thank you for investigating. Can you please open a PR with this patch? Once I have confirmation internally from the team I will review and merge.
from stream-chat-flutter.
Today, a backend update was rolled out, resulting in the disabling of the GET request used for querying channels. This has led to an issue where all users are now able to view every conversation due to the malfunctioning of the filtering feature. To address this, please restore the GET API request as an immediate corrective action. Following that, you can initiate the planning and development of a new release update to ensure a more comprehensive solution.
from stream-chat-flutter.
same here any update?
from stream-chat-flutter.
We had to update the package internally in the channels_api.dart file we replaced the queryChannels method with this one
We replaced it from this:
/// THIS IS THE OLD FUNCTION THAT'S CAUSING THE ERROR
/// Line 50
/// Requests channels with a given query from the API.
Future<QueryChannelsResponse> queryChannels({
Filter? filter,
List<SortOption>? sort,
int? memberLimit,
int? messageLimit,
bool state = true,
bool watch = true,
bool presence = false,
PaginationParams paginationParams = const PaginationParams(),
}) async {
final response = await _client.get(
'/channels',
queryParameters: {
'payload': jsonEncode({
// default options
'state': state,
'watch': watch,
'presence': presence,
// passed options
if (sort != null) 'sort': sort,
if (filter != null) 'filter_conditions': filter,
if (memberLimit != null) 'member_limit': memberLimit,
if (messageLimit != null) 'message_limit': messageLimit,
// pagination
...paginationParams.toJson(),
}),
},
);
return QueryChannelsResponse.fromJson(response.data);
}
to this
/// THIS IS THE FIXED FUNCTION
/// Line 50
/// Requests channels with a given query from the API.
Future<QueryChannelsResponse> queryChannels({
Filter? filter,
List<SortOption>? sort,
int? memberLimit,
int? messageLimit,
bool state = true,
bool watch = true,
bool presence = false,
PaginationParams paginationParams = const PaginationParams(),
}) async {
final response = await _client.post(
'/channels',
data: {
// default options
'state': state,
'watch': watch,
'presence': presence,
// passed options
if (sort != null) 'sort': sort,
if (filter != null) 'filter_conditions': filter,
if (memberLimit != null) 'member_limit': memberLimit,
if (messageLimit != null) 'message_limit': messageLimit,
// pagination
...paginationParams.toJson(),
},
);
return QueryChannelsResponse.fromJson(response.data);
}
Also I had to copy the getstream packages to my local project and add this dependency override in my pubspec.yaml
dependency_overrides:
stream_chat_flutter:
path: ./packages/stream_chat_flutter-7.1.0
stream_chat_flutter_core:
path: ./packages/stream_chat_flutter_core-7.1.0
stream_chat:
path: ./packages/stream_chat-7.1.0
from stream-chat-flutter.
In production env, Our app received wrong channels or sometimes error 403.
from stream-chat-flutter.
@AlaaAbdelbaki So we need to wait for a new release with the update ?
from stream-chat-flutter.
I'd say yes if you do not want to update the internal package yourself
from stream-chat-flutter.
@esarbanis - thanks for investigating internally.
To add some extra info.
I believe that a backend update is likely causing these issues.
Our app uses the flutter UIKit and since the early hours of this morning all our users were unable to view any channels.
This is caused by all channel querys hitting a 403 stating that 'channels cannot be returned because you don't have acces to them'.
There has been not changes to any of the code associated with stream for months - on our backend or within the app.
Edit - @esarbanis this appears to have been resolved.
from stream-chat-flutter.
Related Issues (20)
- Attachment Error : Unhandled Exception: FormatException: Illegal scheme character HOT 2
- HttpException: Bad file descriptor on connect call HOT 2
- 7.2.0-hotfix.1 not working HOT 4
- Exception caught by image resource service: Invalid argument(s): No host specified in URI HOT 3
- Long-press reaction triggers web context menu on mobile HOT 3
- Update connectivity_plus and other dependencies to latest versions HOT 3
- 403 error on older images when scrolling up on message list by new channel member. Old members seem ok. HOT 2
- Can't run tutorial with stream_chat_flutter: ^7.2.0 HOT 5
- Floating date divider overlap HOT 3
- Reply & Show in chat functionality doesn't work in Attachment Actions Modal HOT 3
- Unread flag gets reset after refreshing the channels HOT 1
- Package Compatibility Issue with Flutter 3.22.0 HOT 5
- watchChannel and queryChannel return NotFound (404) error when querying a channel which doesn't exist, instead of creating it HOT 1
- StreamChannelHeader causing error "You must have a StreamChat widget at the top of your widget tree" HOT 1
- StreamMessageInput causing error "Could not find a Portal above this PortalTarget(debugName: null, portalCandidateLabels=[PortalLabel.main])" HOT 1
- Add thread participant when mention a user.
- Null check operator used on a null value - wrong use of markdown HOT 3
- Memory leak HOT 1
- 8.0.0-beta.3 Bug: Messages not marked as unread when viewed. HOT 3
- Copy message with mention has id instead of name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-chat-flutter.