Recovering from "Too old last_sync_at time"
What did you do?
Query channels for a user.
What did you expect to happen?
I expect synchronize() to not fail.
What happened instead?
Sync failed with error: "Too old last_sync_at time, please have last_sync_at argument no later than 30 days ago"
GetStream Environment
GetStream Chat version: 4.21.1
GetStream Chat frameworks: StreamChat
iOS version: 16
Swift version: 5.7
Xcode version: 14
Device: iPhone 12 Pro Max
Additional context
How do clients get out of a Too old last_sync_at time scenario?
Hi @gonzalonunez!
Thank you for your report. I will investigate this one and will get back to you as soon as possible!
Best, Nuno
Hi @gonzalonunez!
Just to double-check, this issue also happens on other SDK versions right?
Thank you!
Hi @gonzalonunez,
Can you also give me the exact call you are making? What controller and query parameters you are using? If possible, it would also be nice if you can turn on httpRequests logging like so:
LogConfig.level = .debug
LogConfig.subsystems = .httpRequests
So that we can analyse the full request/response.
Thank you, Nuno
@nuno-vieira yes i think what happened was that we ended up with too many chats, sync broke, and is in this state for some users. Hard to tell because I haven't been able to personally reproduce it.
I'll turn on logging and see what I can do. It happens on other SDK versions as well.
Hi @gonzalonunez!
This indeed is a behaviour that the SDK is not correctly handling at the moment. We just added this to our Backlog and we will tackle this one ASAP. We will let you know once we have more news.
If you don't want to get blocked, you can log out the user, in case this error happens. But it might not be the best UX. Either way, it is better than not being able to use the app at all.
Thank you for your patience!
Best, Nuno
@nuno-vieira Awesome, thank you for the quick response! Sorry I don't have anything more concrete.
We're also dealing with another issue that I have more info on, I'll file a new ticket shortly 😄
Edit: Nevermind, no need to file a second ticket :)
Hello @nuno-vieira. We are facing same issue on our side. When you create a group this issue repro for added member.
Hi @saidReclip , as @nuno-vieira shared, there is a workaround that involves logging out an in again.
We will be working on this issue soon, but we don't have an ETA just yet
Hi Guys, sorry for commenting here, but I've been through all the normal channels and I'm not getting a response. I just want to point out that this is a significant issue for us because it results in messages not displaying for users. The suggested work around of logging out isn't really something we can plausibly ask from our users since they are end consumers and they expect a much higher level of service. We'd really appreciate it if you can prioritize the fix for this.
Hey @jfru, The team is already working on this. You can track it in this PR: https://github.com/GetStream/stream-chat-swift/pull/2408. We expect that it's included in our release next week.
Hi! This has been fixed in our latest release 4.25.0 Closing this issue for now, feel free to reopen it if you encounter any issues.