유니티2020 에디터에서 카카오SDK 로그인 시
다음과 같은 에러가 발생합니다.
CreateCurrentIdpProfile
단계에서 발생하며,
신규 App ID 에서만 발생하는 것 같습니다.
기존에 서비스중인 다른 App ID, App Secret, JavaScript Key를 넣으면 정상적으로 로그인이 됩니다.
원인이 궁금합니다.
감사합니다.
AuthInfo : {"access_token":"5RV2vxrCdoxechIA3NXRR77rEFa-Ii0owAitcAopcJ8AAAF5Wtw2iQ","token_type":"bearer","refresh_token":"5ULtQLuG54yu0g6yL4lOI79w6dVg1-BIB05osQopcJ8AAAF5Wtw2hw","expires_in":7199,"scope":"talk_message profile friends","refresh_token_expires_in":5183999}
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> accessToken : 5RV2vxrCdoxechIA3NXRR77rEFa-Ii0owAitcAopcJ8AAAF5Wtw2iQ, refreshToken : 5ULtQLuG54yu0g6yL4lOI79w6dVg1-BIB05osQopcJ8AAAF5Wtw2hw
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> KGKakaoRequest::RequestMyProfile - false
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> KGKakaoRequest::RequestMyProfile
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> KGWWW::Request - https://kapi.kakao.com/v2/user/me
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][1]</color> <color=cyon>[ENTER]</color> NZAsyncManager::RunAsync
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][666]</color> Bytes Length : 4
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][1]</color> <color=cyon>[LEAVE]</color> NZAsyncManager::RunAsync
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][666]</color> Content-Type : application/json
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][666]</color> <color=cyon>[ENTER]</color> NZAsyncManager::QueueOnMainThread
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][666]</color> <color=cyon>[LEAVE]</color> NZAsyncManager::QueueOnMainThread
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][1]</color> <color=cyon>[ENTER]</color> OnUpdate Action:System.Action
<color=green>[2021-05-11 PM 6:57:34][VERBOSE][1]</color> Response body - {"id":1727607934,"has_signed_up":false,"kakao_account":{"profile_needs_agreement":false,"profile":{"nickname":"(LT)","is_default_image":true}}}
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> {"id":1727607934,"has_signed_up":false,"kakao_account":{"profile_needs_agreement":false,"profile":{"nickname":"(LT)","is_default_image":true}}}
<color=yellow>[2021-05-11 PM 6:57:34][DEBUG][1]</color> CreateCurrentIdpProfile
**System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.**
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <695d1cc93cca45069c528c15c9fdd749>:0
at Kakaogame.Impl.KGKakaoProfile.CreateCurrentIdpProfile (System.String accessToken, System.String refreshToken, System.Collections.Generic.Dictionary`2[TKey,TValue] profileDic) [0x00155] in <a3af30f04f4248068aa913b5bdddb687>:0
at Kakaogame.Impl.Unity.KGKakaoLoginUI.ProcRequestMe (Kakaogame.Impl.NZResult result, System.Collections.Generic.Dictionary`2[TKey,TValue] myProfile) [0x0004a] in <67f701ab63dc4885bb34f250c9098332>:0
at Kakaogame.Impl.Unity.KGKakaoLoginUI+<>c.<RequestMyProfile>b__22_0 (Kakaogame.Impl.NZResult result, System.Collections.Generic.Dictionary`2[TKey,TValue] myProfile) [0x00001] in <67f701ab63dc4885bb34f250c9098332>:0
at Kakaogame.Impl.Kakao.KGKakaoRequest+<>c__DisplayClass11_0.<RequestMyProfile>b__1 (Kakaogame.Impl.NZResult result, System.Collections.Generic.Dictionary`2[TKey,TValue] contents) [0x00001] in <a3af30f04f4248068aa913b5bdddb687>:0
at Kakaogame.Impl.Common.NZWWW+<>c__DisplayClass8_0.<Request>b__0 (System.Int32 code, System.String body) [0x000a1] in <a3af30f04f4248068aa913b5bdddb687>:0
at Kakaogame.Impl.Common.NZWWW+<>c__DisplayClass7_2.<_Request>b__4 () [0x00021] in <a3af30f04f4248068aa913b5bdddb687>:0
at Kakaogame.Impl.Common.NZAsyncManager.OnUpdate () [0x0002f] in <a3af30f04f4248068aa913b5bdddb687>:0
UnityEngine.Debug:LogError (object) (at ?)
Kakaogame.SDK.KGApplication/<>c:<CreateSdkObject>b__18_0 (Kakaogame.Base.KGDebug/LogLevel,string) (at ?)
Kakaogame.Base.KGDebug:Exception (System.Exception) (at ?)
Kakaogame.Impl.Common.NZAsyncManager:OnUpdate () (at ?)
Kakaogame.Impl.Internal.NZLifecycleListener:OnUpdate () (at ?)
Kakaogame.Impl.Internal.NZLifecycleListener:Notify (Kakaogame.Impl.Internal.NZLifecycleEvent) (at ?)
Kakaogame.SDK.Internal.InterfaceBrokerNative/InterfaceBrokerNativeObject:Update () (at ?)
[성공]
{"id":1727224012,"has_signed_up":false,"kakao_account":{"profile_needs_agreement":false,"profile":{"nickname":"AAA(LT)","is_default_image":true},"has_ci":false,"ci_needs_agreement":true,"service_user_id":106136719520981282}}
[실패]
{"id":1727607934,"has_signed_up":false,"kakao_account":{"profile_needs_agreement":false,"profile":{"nickname":"AAA(LT)","is_default_image":true}}}
응답받은 kakao_account 에서 아래 Key 가 없네요
has_ci
ci_needs_agreement
service_user_id