카카오 게임 SDK 유니티 크래시 문의

문의 시, 사용하시는 SDK 버전 정보와 디벨로퍼스 앱ID를 알려주세요.

Faq 목록 - 10. Android ( Faq 목록 입니다 ) 먼저 확인해주세요.


안녕하세요. 유니티에서 사용중인 카카오 게임 sdk 관련 크래시리포트 확인 중 sdk 내부에서 발생된 이슈로 보이는 로그가 있어 원인이 궁금하여 문의드립니다.
kakao game sdk version : 3.19.0

리포팅된 로그 정보
Fatal Exception: java.lang.Error

FATAL EXCEPTION [main] Unity version : 2022.3.27f1 Device model : samsung SM-S911N Device fingerprint: samsung/dm1qksx/dm1q:14/UP1A.231005.007/S911NKSS4CXJ1:user/release-keys CPU supported ABI : [arm64-v8a, armeabi-v7a, armeabi] Build Type : Release Scripting Backend : IL2CPP Libs loaded from : lib/arm64 Strip Engine Code : true

Fatal Exception: java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2022.3.27f1
Device model : samsung SM-S911N
Device fingerprint: samsung/dm1qksx/dm1q:14/UP1A.231005.007/S911NKSS4CXJ1:user/release-keys
CPU supported ABI : [arm64-v8a, armeabi-v7a, armeabi]
Build Type : Release
Scripting Backend : IL2CPP
Libs loaded from : lib/arm64
Strip Engine Code : true

Caused by java.lang.IllegalStateException: Already resumed, but proposed with update KGResult [code=4001 ,description=CLIENT_EXCEPTION, message=알 수 없는 오류(4001)가 발생했습니다. 재시도 해주세요.]
at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError(CancellableContinuationImpl.kt:559)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:524)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:368)
at com.kakaogame.idp.KGKakao2Auth$loginWithTypeSync$2$eventListener$1$onActivityStart$1.invoke(KGKakao2Auth.kt:125)
at com.kakaogame.idp.KGKakao2Auth$loginWithTypeSync$2$eventListener$1$onActivityStart$1.invoke(KGKakao2Auth.kt:122)
at com.kakaogame.idp.KGKakao2Auth$Companion$getLoginCallback$1.invoke(KGKakao2Auth.kt:761)
at com.kakaogame.idp.KGKakao2Auth$Companion$getLoginCallback$1.invoke(KGKakao2Auth.kt:747)
at com.kakao.sdk.user.UserApiClient$loginWithKakaoTalk$1$1.invoke(UserApiClient.kt:82)
at com.kakao.sdk.user.UserApiClient$loginWithKakaoTalk$1$1.invoke(UserApiClient.kt:81)
at com.kakao.sdk.auth.AuthApiManager$issueAccessToken$1.onResponse(AuthApiManager.kt:81)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$retrofit2-DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda1.run(:6)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

This error seems to be caused by a synchronization issue between kotlinx.coroutines and the SDK’s internal mechanisms when using the Kakao Game SDK (v3.19.0).

Error Source
Caused by java.lang.IllegalStateException: Already resumed
This error means that a coroutine is being attempted to be run again after it has completed. CancellableContinuationImpl throws this type of error.

The same coroutine seems to have completed twice during a transaction in the Kakao SDK’s KGKakao2Auth class.

Error Causes
Incompatibility of Current SDK:
The Kakao Game SDK v3.19.0 being used may not be compatible with the specified Unity version (2022.3.27f1) and IL2CPP compiler.

Kakao API Usage Error:
During a login request to the Kakao API, a situation may occur where the response is processed twice.

Workarounds
Update SDK Version:
If a newer version of Kakao Game SDK is available, try using it. Current versions usually contain fixes for such issues.

Coroutine Management in Unity Project:

Ensure that the coroutines used by the SDK work properly with the main thread of Unity.

If coroutines are started manually, make sure that they are started only once.
Check Kakao Developers API Responses:

Check if the responses received by the KGKakao2Auth class and UserApiClient are being processed correctly. Examine the relevant code to see if the response is being processed more than once.
Check Strip Engine Code Option in Unity:

The error report shows Strip Engine Code : true. Some SDKs may cause the necessary code to be omitted if this option is enabled.

Workaround: Try disabling this setting in Unity and recompiling.

Alternative Solution:

It seems that the error only occurs when using the loginWithKakaoTalk method. If possible, you can try a workaround with another authentication method (e.g. login via WebView).

muscj.777 these are the solutions I can suggest for you, moderators can see the details and errors in more detail. good forums.

답변 감사합니다.
극히 일부 유저에게만 발생된 부분을 고려하여 코드 스트리핑으로 인한 발생보다는 SDK 업데이트를 먼저 진행하여 확인해보겠습니다.