Hello guys, I have issue with my project, Sometimes real-time does not send the latest payload,
I integrated the realtime functionality to the chat areas of my app, now sometimes users does see some messages and sometimes only one user will be seeing the latest messages of payload from the real-time function.
Please how can I handle this inconsistency?
i have confirm it again and again, nothing its coming through
i had to take my time to recheck every area of my codes, to see if maybe, i'm doing otherwise
please @Steven is there a sample i can follow, i'm using flutter
have you changed your code to not use a single realtime instance?
Yes I have....
what's your new code?
Is this the same exact topic/problem as #View Not Updating?
no, they are both different problem
Hello @Steven @Faye @D5 @Camo
inside ref.listen nothing is outputting when i sent user a message, nor do i receive any output when user send me message but the message do send to Appwrite Cloud
Was that fixed in 1.5?
please where can i see it appwrite cloud?
If you're using (https://cloud.appwrite.io)
yes i am
Below code is working for me but can someone help me check if this is the right way to do it
print('Sync');
ref.watch(getLatestChatMsgProvider).when(
data: (data) {
final message = MessageAppwrite.fromJson(data.payload);
final document = Document.fromMap(data.payload);
var event = '';
if (data.events.contains('databases.*.collections.${Strings.collectionMessagesId}.documents.*.create')) {
event = 'create';
} else if (data.events.contains('databases.*.collections.${Strings.collectionMessagesId}.documents.*.delete')) {
event = 'delete';
} else if (data.events.contains('databases.*.collections.${Strings.collectionMessagesId}.documents.*.update')) {
event = 'update';
} else {
event = 'loading';
}
var checkList = docList.indexWhere((element) => element == document.$id);
print('calling here');
if (checkList == -1) {
print('perfect');
docList.add(document.$id);
if ((message.senderUserId == myUserId || message.receiverUserId == myUserId) && (message.senderUserId == friendUserId || message.receiverUserId == friendUserId)) {
messageNotifier?.saveMessage(message, document, event);
}
}
//return;
},
error: (error, stk) => ErrorText(error: error.toString()),
loading: () => print('not loaded'),
);
}```
The code is working perfectly well but i want you guys to help me check it if its written well because i'm now getting this error
flutter: AppwriteException: general_rate_limit_exceeded, Rate limit for the current endpoint has been exceeded. Please try again after some time. (429)
flutter:
#0 ClientMixin.prepareResponse (package:appwrite/src/client_mixin.dart:73:9)
#1 ClientIO.call (package:appwrite/src/client_io.dart:373:14)
<asynchronous suspension>
#2 Databases.updateDocument (package:appwrite/services/databases.dart:123:17)
<asynchronous suspension>
flutter: ----------------------------------------------------```
@Camo @D5 @DennisLBC @Faye @Steven
Please do not ping if not neccessary
i'm sorry for pinging, i'm just fustrated that this has taken me weeks and seem no hope
any suggestion guys
This is what is now happening....
Does everything worked fine and now this issue appeared or is this never worked
This is very frustrating @D5 sometimes msg will appear, sometimes the messages will not appear.
This lag is very much in the chat
Hello.....
Please support still needed here
Recommended threads
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...
- Can't resume paused project
I have logged in in incognito, done the email verification and still get the invalid fingerprint error. What's the issue.
- Download appwrite Docs
Is there is a way to download appwrite Docs ? Because appwrite skill isn't enough to give the agent full understanding about how appwrite works (I noticed this ...