Closed bradleyrzeller closed 2 years ago
Hi @bradleyrzeller!
Thank you for the error report and your investigation. We are already looking into the issue 👍
Best, Nuno
Hi @bradleyrzeller
We've detected the issue and our backend team is deploying a hotfix for it. Thank you for the report, and sorry for the inconvenience!
@bradleyrzeller the issue should be fixed now. The fix is live, and we've verified it on our end as well. Please let us know if there's any other problem you are facing
Hi @polqf and @nuno-vieira, I am still seeing the same broken behavior. The error payloads seem to still not include the expected key details
:
2022-08-25 12:35:20.941 [ERROR] [com.apple.NSURLSession-delegate] [RequestDecoder.swift:51] [decodeRequestResponse(data:response:error:)] > API request failed with status code: 401, response:
{
"code" : 40,
"message" : "QueryChannels failed with error: \"JWTAuth error: token is expired (exp)\"",
"more_info" : "https:\/\/getstream.io\/chat\/docs\/api_errors_response",
"StatusCode" : 401,
"duration" : ""
})
As such, the token provider is still not getting triggered upon token expiration.
Hi @bradleyrzeller ,
This is unfortunate! Maybe there is a location where we did not successfully deploy the fix 🙏 Sorry once again. We'll have a look first thing tomorrow. If you can, could you please share your app id with me at pol.quintana@getstream.io?
Thanks Pol. I just emailed it to you.
What did you do?
Connected a
ChatClient
with a token set to expire shortly after.What did you expect to happen?
I expected the
TokenProvider
to be invoked upon token expiration.What happened instead?
The client disconnected without any attempt to refresh the token with the
TokenProvider
GetStream Environment
GetStream Chat version: 4.20.0 GetStream Chat frameworks: StreamChat, StreamChatUI iOS version: 15.5 Swift version:: 5 Xcode version: 13.4.1 Device: iPhone 13 pro sim (iOS 15.5)
Additional context
It seems to be because the
RequestDecoder
is failing to decode an error payload into anErrorPayload
on this line. The actual payload I am seeing isbut the ErrorPayload expects a
details
key.This throws off downstream logic that detects token expiration and triggers a refresh...