We are still encountering some issues with refresh...
# supabase-kt
m
We are still encountering some issues with refresh on desktop. When we leave the app for a while and come back later the refresh doesn't work properly and we get an Unauthorized error but if we reopen the app then it works fine. The refresh is not working properly, is it an issue from the library or we need to do something manually?
j
In theory, it should just work automatically. Do you have any logs? The library always logs when the session gets refreshed, which is ~80% before the actual expiration.
s
In my experience, the refresh seem to not happen when the computer goes to sleep and the app (Desktop app) stays open (overnight for example). Otherwise when i try to reproduce the issue to have some logs i can study, it all works fine and i see the logs of the refresh session at the correct intervals (by setting the JWT expiration to 1 minute in the Supabase dashboard or local settings)
b
I’ve been getting this issue in my apps also. A restart of the app usually fixes the issue
j
Hmm, I sadly cannot reproduce these issues. The are two possibilities where auto refresh might not work correctly: 1. The expiration time is wrong / the session is saved incorrectly. This has been fixed in a recent version and is now getting tested frequently. 2. Somehow the coroutine scope handling the auto refresh gets cancelled or otherwise suspends. Logs about that would be very helpful