Hello,
While updating from 2.12.0 to 2.13.1 (the objective is to update to 2.23.0) we face an issue with UserApi.shared.rx.loginWithKakaoAccount()
.
We are using Rx implementation with iOS 15 as minimum iOS target.
Before our implementation was working perfectly but with the update to the version 2.13.1 it fails with the error code KakaoSDKCommon.ClientFailureReason.TokenNotFound
If we go back to the version 2.13.0
it works but not 2.13.1
(and later also)
Do you have an idea of what are the changes that could lead to this issue?
Thank you!
Hi~
Tell me your app ID.
(My Application>App Settings>Summary > ID)
@omero6544
There was an problem with token issuance in 2.12.0 and 2.13.0, and it was fixed. Therefore, if you use Rx Kakao SDK, please use the latest version.
Can you share the steps and code to reproduce the TokenNotFound issue?
1개의 좋아요
I tried using the 2.23.0 version of the SDK but i have the same problem so i went down until the 2.13.1
where my token issue start (on 2.13.0
its working)
I’m not sure of my AppID but i’m going to check that. The app is called VestiaireCollective.
The step that we are following are really simple, they are literally the one from the Documentation.
Here an example
RxKakaoSDK.initSDK(appKey: {Key})
UserApi.shared.rx.loginWithKakaoAccount()
.subscribe(onNext:{ (oauthToken) in
print("loginWithKakaoAccount() success.")
}, onError: {error in
print(error)
})
.disposed(by: disposeBag)
When I tested it as you told me, It was not reproduced.
When checking the server log, it was confirmed that the token was issued normally when proceeding with version 2.23.0. Please check if the token has not been issued.
For accurate identification, is it possible to share the log when calling UserApi.shared.rx.loginWithKakaoAccount()
?
In the latest SDK, the method added to renew the login token may cause the error at the beginning of the app execution and be exposed in the log. However, this does not affect the app login/execution.
When the TokenNotFound error occurs, did an error occur before completing the login? If so, it seems to be a problem caused by the execution of the login token renewal logic.
I tested on 2.23.0, still facing the same issue.
I enabled logging RxKakaoSDK.initSDK(appKey: appKey, loggingEnable: true)
but i don’t see anything.
Where do we see those logs?
You are right about the issue happening before the loginWithKakaoAccount()
in KakaoSDK TokenRefresher
file, the function func cat(completion:@escaping (Error?) -> Void)
call AUTH_API.responseData(.get, Urls.compose(path:Paths.checkAccessToken), apiType: .KApi)
and it return the following error (same as UserApi.shared.rx.loginWithKakaoAccount()
)
▿ AFError
▿ requestAdaptationFailed : 1 element
▿ error : SdkError
▿ ClientFailed : 2 elements
- reason : KakaoSDKCommon.ClientFailureReason.TokenNotFound
▿ errorMessage : Optional<String>
- some : "authentication tokens not exist."
The reason why this error occurs before calling loginWithKakaoAccount()
is because the cat()
method of TokenRefresher is called internally. Therefore, this will not affect your service at all.
After calling loginWithKakaoAccount()
, does the callback result return TokenNotFound
?
Yes it does unfortunately 
This is very strange. The TokenNotfound
error only occurs in APIs that use accessToken. loginWithKakaoAccount
() is an API that does not use accessToken.
Would you check if the same thing happens in the sample app?
I can’t reproduce the situation you shared at all.
Would you share a project that reproduces it via private message?