RodrigoBertotti / flutter_chat_app_with_nodejs

A Flutter Chat App built with Node.js, MySQL, and WebSockets.
MIT License
88 stars 37 forks source link

Messages not appearing properly #8

Closed hieunt1320 closed 3 months ago

hieunt1320 commented 6 months ago

Dear Rodrigo,

Sorry to bother you again but i have another problem that you may help me more because it is more related to your source code, in the danny filo issue "Askless throwing errors" there is a part that said "Additionally after loggin-in loggin-out on the flutter client ... messages "from today" dissapear and are not showing on both clients (although chat works)"

i assume this meant if i were to log out of one of the phone and login the messages going to disappear i got a similar situation and i didnt touch the code for this part aside from some UI changes and add a few extra parameter

i have 2 phone phone A is physical phone B is emulator

i can send messages fine between the two (aside from the occastional server freeze or st but thats for later) i can see msg phone A sent and msg from phone B the problem arise when i log out of phone A and relogin, the msg are only from phone B while all the msg from phone A are gone the way i got it back was that if i then logout of phone B and then relogin (not even go into the chat), Phone A will auto update and get all of the message as normal

and if i log out both of the device and relogin, both will lose their own sent msg

i would like to know how would you deal with this on YOUR source code, which part did you handle it so i can compare and fix it myself

sincerely Hieunt

RodrigoBertotti commented 3 months ago

Hello! Sorry for the delay, if you are still looking for a solution, please start checking these two files:

I think checking these may give you an initial direction on reaching your goal :)