모바일 웹브라우저 상에서 카카오 간편로그인 실패하는 현상

하이브리드앱을 운영중에 있습니다.

최초에 “Kakao.Auth.login()” 을 사용하여 로그인팝업을 띄우는 형태로 구성이 되어 있었는데요. 안드로이드앱에서 간편로그인으로 이동하지 않고 웹뷰로만 로그인 가능한 현상이 발견되었습니다.

확인해보니 하이브리드앱에서는 간편로그인을 사용하기 위해선 “Kakao.Auth.authorize()” 를 사용하라는 가이드를 보게 되었고, 팝업오픈 > “Kakao.Auth.authorize()” 호출과 같은 형태로 구현을 시도하였습니다.

구현 이후에 앱에서는 정상적으로 카카오간편로그인이 진행되는게 확인되었는데요. 문제는 모바일웹에서 간편로그인이 실패하는 현상이 발견되었습니다.

아래는 redirectUri 로 진입하지 못하고 카카오톡앱에서 중지된것으로 보이는데요. 아래와 같은 로그가 확인이 되었습니다.

2022-01-04 08:39:02.431 30992-30992/? W/Bundle: Key com.kakao.sdk.talk.extraparams expected Bundle but value was a java.lang.String.  The default value <null> was returned.
2022-01-04 08:39:02.431 13827-13827/? I/chromium: [INFO:tin_six_tab_helper.cc(958)] CloseWebContentsAt 0,58 contents:0x4003b4b00
2022-01-04 08:39:02.431 13827-13827/? I/chromium: [INFO:tin_six_tab_helper.cc(1022)] CloseWebContentses closing_contents:0 0x4003b4b00
2022-01-04 08:39:02.431 30992-30992/? W/Bundle: Attempt to cast generated internal exception:
    java.lang.ClassCastException: java.lang.String cannot be cast to android.os.Bundle
        at android.os.Bundle.getBundle(Bundle.java:981)
        at android.content.Intent.getBundleExtra(Intent.java:9422)
        at com.kakao.sdk.model.AppInfo.c(AppInfo.kt:1)
        at com.kakao.sdk.model.AppInfo.<init>(AppInfo.kt:9)
        at com.kakao.sdk.CapriLoggedInActivity.onCreate(CapriLoggedInActivity.kt:2)
        at android.app.Activity.performCreate(Activity.java:8282)
        at android.app.Activity.performCreate(Activity.java:8262)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3996)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4188)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2425)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8582)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
2022-01-04 08:39:02.431 13827-13827/? I/TabManager: setCurrentIndex isIncognito false, index: 57 at instance 1
2022-01-04 08:39:02.432 5296-7670/? I/SAMSUNGPAY: [Hint_ej2] isHomePackageRunning topPkgName = com.kakao.talk, topClsName = com.kakao.sdk.CapriLoggedInActivity, return false , se : false

어떤 문제가 있는걸까요?

로그만 봐서는 카카오 로그인과 무관하고 cast하다 오류 발생한 것으로 보이는데요.

문제는 모바일웹에서 간편로그인이 실패하는 현상이 발견되었습니다.

모바일 웹브라우저에서 로그인이 실패한다면 웹 로그확인이 필요해보이는데요.
앱 로그를 첨부하신 이유가 따로 있으실까요?


제가 상황 재현할 수 있는 사이트 URL좀 알려주시겠어요?

모바일 웹브라우저상에서 로그인이 실패하는건 아니구요.

모바일 웹브라우저상에서 “Kakao.Auth.authorize()” 를 하면 간편로그인 기능을 위하여 카카오톡앱이 실행되게 됩니다.
그리고 로그인 성공 후 redirectUri 로 돌아와야 하는데, 카카오톡앱에서 로그인이 실패하며 다음 단계 진행이 되지 않고 있네요.
(그래서 앱로그를 첨부하였습니다.)

개발중인 단계로 공개되어 있는 URL 은 없는 상황이네요. ㅠㅠ

인가요청 로그 확인을 위해 앱 ID 알려주세요~


앱ID
https://developers.kakao.com/ 의 내 애플리케이션>앱 설정>요약 정보 : 기본정보에 있는 앱 ID
숫자로된 ID 입니다~
ex) 123456

677236 입니다. 감사합니다.

로그상 인가요청에는 에러가 안보이고 토큰요청에 KOE009에러가 있는데요.

내 애플리케이션>앱 설정>플랫폼 : 사이트 도메인 에 아래 주소 추가해보시겠어요?
http://192.168.0.32:3000

저 에러는 제가 로컬환경에서 테스트하는 과정에서 발생한 에러가 맞습니다.

앱에서 로그인 실패하는 현상은 https://beta1.trenbe.com 으로 테스트하는 과정에서 발생되었습니다.
(1/4 오전 8:30~9:00 경)

해당 시간대에 인가요청에 설정된 리다이렉트URI는 아래와 같은데요.
도메인이 다른 것 같은데 설정하신리다이렉트URI가 맞나요?

https://service-beta.trenbe.com/social-login/kakao/redirect

네. 맞습니다.
혹시 RedirectURI 의 도메인을 동일하게 맞추어야 하나요?

동일하지 않아도 상관은 없지만, 해당 페이지에서 500에러 발생하고 있는 것 같습니다.
리다이렉트URI에서 code파라메터 수신하여 토큰 발급 처리 가능한지 확인해보시겠어요?

그런데 모바일웹 디버그모드로 진행했을때는 해당 redirect uri 로도 넘어가지 못하고 중지되었습니다.
그 부분을 확인하는 과정에서 위 ClassCastException 을 발견하였구요.
위 에러로 인하여 다음단계로 진행되지 못하고 로그인이 중지된게 아닐까 의심하고 있었습니다.

PC에서 브라우저 개발자 모바일 모드로 JS SDK authrize 인가요청 테스트 했다는 말씀이신가요?
intent 스킴호출 에러가 발생할텐데… 화면 캡쳐좀 부탁드립니다.

아뇨. 모바일디바이스에서 웹브라우저로 실행하였고, PC 와 모바일디바이스를 케이블로 연결하여 원격디버깅을 실시하였습니다.

제가 재현할 수 있는 URL이 없고 상황 유추하기가 힘든데요.

관련 테스트 영상 이나 캡쳐 화면 웹페이지 에러 메시지 등 첨부 부탁드려요.

JS SDK authrize 관련 코드블럭도 공유 부탁드립니다.

우선 로그인을 위하여 팝업페이지를 임의로 노출하고 있으며, 해당 팝업은 아래와 같은 코드로 동작하고 있습니다.

  await initKakaoSdk()

  const redirectUri = 'https://service-beta.trenbe.com/social-login/kakao/redirect'
  const state = ... some state
  window.Kakao.Auth.authorize({
    redirectUri: redirectUri,
    state,
  })

실제 오류발생하는 부분은 동영상으로 전달드려야 할 것 같은데요.

촬영되면 전달드리도록 하겠습니다.

좋아요 1

device-2022-01-04-151920.mp4.zip (966.8 KB)

동영상과 같이 로그인팝업이 올라오면 redirectUri 로 랜딩되지 않고 팝업이 바로 닫힙니다.
(크롬 Inspector 를 통해 디버깅해봐도 redirectUri 로 이동은 없는걸 확인하였습니다.)

로그인시점에 간편로그인을 위해서 실행되었을 카카오톡 관련 에러로그가 올라오는데요. 검색된 로그 전달드립니다.

2022-01-04 15:20:37.731 12434-12434/? I/chromium: [INFO:CONSOLE(1)] "Mixed Content: The page at 'https://beta2.trenbe.com/social-login/kakao/popup' was loaded over HTTPS, but requested an insecure resource 'http://ec2-13-125-70-19.ap-northeast-2.compute.amazonaws.com:5000/'. This request has been blocked; the content must be served over HTTPS.", source:  (1)
2022-01-04 15:20:37.771 12434-12434/? I/chromium: [INFO:CONSOLE(0)] "Uncaught (in promise) TypeError: Failed to fetch", source: https://beta2.trenbe.com/social-login/kakao/popup (0)
2022-01-04 15:20:38.728 1294-2772/? I/ActivityTaskManager: START u0 {act=com.kakao.talk.intent.action.CAPRI_LOGGED_IN_ACTIVITY cat=[android.intent.category.BROWSABLE] flg=0x1c080000 cmp=com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity (has extras)} from uid 10291
2022-01-04 15:20:38.729 1294-2772/? D/ActivityTaskManager: TaskLaunchParamsModifier:task=null activity=ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity display-area-from-source=DefaultTaskDisplayArea@99483296 display-id=0 display-windowing-mode=1 suggested-display-area=DefaultTaskDisplayArea@99483296
2022-01-04 15:20:38.730 1294-2772/? D/ActivityTaskManager: TaskLaunchParamsModifier:task=null activity=ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t-1} display-area-from-source=DefaultTaskDisplayArea@99483296 display-id=0 display-windowing-mode=1 suggested-display-area=DefaultTaskDisplayArea@99483296 inherit-from-source=fullscreen activity-options-fullscreen=Rect(0, 0 - 0, 0) non-freeform-display display-area=DefaultTaskDisplayArea@99483296 maximized-bounds
2022-01-04 15:20:38.734 1294-2772/? D/ActivityTaskManager: TaskLaunchParamsModifier:task=Task{a4d03c #31523 type=standard A=10779:com.kakao.talk U=0 visible=false mode=fullscreen translucent=true sz=0} activity=ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t-1} display-area-from-source=DefaultTaskDisplayArea@99483296 display-id=0 display-windowing-mode=1 suggested-display-area=DefaultTaskDisplayArea@99483296 inherit-from-source=fullscreen activity-options-fullscreen=Rect(0, 0 - 0, 0) non-freeform-display display-area=DefaultTaskDisplayArea@99483296 maximized-bounds
2022-01-04 15:20:38.737 990-1663/? I/SurfaceFlinger: id=100156 createSurf (0x0),-1 flag=80004, ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t31523}#0
2022-01-04 15:20:38.741 1294-2772/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.kakao.talk, userId = 0
2022-01-04 15:20:38.772 1294-2644/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.kakao.talk, userId = 0
2022-01-04 15:20:38.778 1294-2644/? D/SGM:PkgDataHelper: notifyAppCreate(), pkgName: com.kakao.talk, userId: 0, sendRet: true
2022-01-04 15:20:38.778 1294-1640/? D/SGM:GameManager: onLooperPrepared(), msg: MSG_APP_CREATE, pkgName: com.kakao.talk, userId: 0
2022-01-04 15:20:38.780 1294-2644/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.kakao.talk, userId = 0
2022-01-04 15:20:38.780 1294-1640/? D/SGM:GameManager: onLooperPrepared(), msg: MSG_TASK_FOCUSED, pkgName: com.kakao.talk, userId: 0
2022-01-04 15:20:38.780 1294-1640/? D/SGM:GameManager:   handleTaskFocused(), pkgName: com.kakao.talk, userID:0
2022-01-04 15:20:38.780 1294-1640/? D/SGM:GameManager:   handleResume(). pkgName: com.kakao.talk, userId: 0, isTunableApp: null
2022-01-04 15:20:38.780 1294-1640/? D/SGM:GameManager: notifyFocusInOut(). of pkg: com.kakao.talk, type: 4, isMinimized: false, isTunableApp: false, userId: 0
2022-01-04 15:20:38.781 1294-2644/? D/MARsPolicyManager: onPackageResumedFG pkgName = com.kakao.talk, userId = 0
2022-01-04 15:20:38.783 1294-1379/? V/ActivityManager: Changed top to ProcessRecord{b1dee5b 32177:com.kakao.talk/u0a779}
2022-01-04 15:20:38.809 1294-1379/? I/GameSDK@LifeCycle: noteResumeComponent(): package name  : com.kakao.talk
2022-01-04 15:20:38.811 1294-1379/? D/SGM:GameManager: identifyGamePackage. com.kakao.talk, mCurrentUserId: 0, callerUserId: 0, callingMethodInfo: com.samsung.android.game.SemGameManager.isGamePackage(SemGameManager.java:104)
2022-01-04 15:20:38.814 1294-1379/? D/SGM:PkgDataHelper: getGamePkgData(). com.kakao.talk
2022-01-04 15:20:38.814 1294-1379/? D/SGM:SemGameManager: isGamePackage(), pkgName=com.kakao.talk, ret=false
2022-01-04 15:20:38.815 1294-1379/? D/SGM:GameManager: noteResumeComponent(), received pkgName: com.kakao.talk, userId: 0
2022-01-04 15:20:38.815 1294-1640/? D/SGM:GameManager: onLooperPrepared(), msg: MSG_APP_RESUME, pkgName: com.kakao.talk, userid: 0
2022-01-04 15:20:38.816 1294-1640/? D/SGM:GameManager:   handleResume(). pkgName: com.kakao.talk, userId: 0, isTunableApp: null
2022-01-04 15:20:38.816 1294-1640/? D/SGM:GameManager: notifyFocusInOut(). of pkg: com.kakao.talk, type: 4, isMinimized: false, isTunableApp: false, userId: 0
2022-01-04 15:20:38.816 1294-1379/? D/SGM:GameManager: identifyGamePackage. com.kakao.talk, mCurrentUserId: 0, callerUserId: 0, callingMethodInfo: com.android.server.ssrm.fgapps.GameAppUtils.isGame(GameAppUtils.java:84)
2022-01-04 15:20:38.816 1294-1379/? D/SGM:PkgDataHelper: getGamePkgData(). com.kakao.talk
2022-01-04 15:20:38.816 1294-1379/? D/SGM:GameManager: identifyGamePackage. com.kakao.talk, mCurrentUserId: 0, callerUserId: 0, callingMethodInfo: com.android.server.ssrm.SortingMachine.isGame(SortingMachine.java:162)
2022-01-04 15:20:38.816 1294-1379/? D/SGM:PkgDataHelper: getGamePkgData(). com.kakao.talk
2022-01-04 15:20:38.820 32177-32177/? W/Bundle: Key com.kakao.sdk.talk.extraparams expected Bundle but value was a java.lang.String.  The default value <null> was returned.
2022-01-04 15:20:38.820 32177-32177/? W/Bundle: Attempt to cast generated internal exception:
    java.lang.ClassCastException: java.lang.String cannot be cast to android.os.Bundle
        at android.os.Bundle.getBundle(Bundle.java:981)
        at android.content.Intent.getBundleExtra(Intent.java:9422)
        at com.kakao.sdk.model.AppInfo.c(AppInfo.kt:1)
        at com.kakao.sdk.model.AppInfo.<init>(AppInfo.kt:9)
        at com.kakao.sdk.CapriLoggedInActivity.onCreate(CapriLoggedInActivity.kt:2)
        at android.app.Activity.performCreate(Activity.java:8282)
        at android.app.Activity.performCreate(Activity.java:8262)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3996)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4188)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2425)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8582)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
2022-01-04 15:20:38.859 1294-1396/? I/ActivityManager: Start proc 1877:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0i114 for  {com.kakao.talk/org.chromium.content.app.SandboxedProcessService0:0}
2022-01-04 15:20:38.859 1294-1396/? I/ActivityManager: check webview name : com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0check hostingname webview : {com.kakao.talk/org.chromium.content.app.SandboxedProcessService0:0}
2022-01-04 15:20:38.889 32177-32177/? D/ConnectivityManager: StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3925)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4489)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4456)] [p00.e(Unknown Source:29)] [Fa.a(Unknown Source:0)] [org.chromium.android_webview.AwContentsLifecycleNotifier.onFirstWebViewCreated(Unknown Source:23)] [J.N.MFiR_zHY(Native Method)] [org.chromium.android_webview.AwContents.<init>(Unknown Source:322)] [Oz0.run(Unknown Source:63)] [NB0.b(Unknown Source:21)] [LB0.run(Unknown Source:2)] [org.chromium.base.task.PostTask.c(Unknown Source:16)] [NB0.a(Unknown Source:20)] [com.android.webview.chromium.WebViewChromium.init(Unknown Source:328)] [android.webkit.WebView.<init>(WebView.java:443)] [android.webkit.WebView.<init>(WebView.java:363)] [android.webkit.WebView.<init>(WebView.java:345)] [android.webkit.WebView.<init>(WebView.java:332)] [java.lang.reflect.Constructor.newInstance0(Native Method)] [java.lang.reflect.Constructor.newInstance(Constructor.java:343)] [android.view.LayoutInflater.createView(LayoutInflater.java:858)] [android.view.LayoutInflater.createView(LayoutInflater.java:780)] [com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)] [android.view.LayoutInflater.onCreateView(LayoutInflater.java:934)] [android.view.LayoutInflater.onCreateView(LayoutInflater.java:954)] [android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1008)] [android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)] [android.view.LayoutInflater.inflate(LayoutInflater.java:663)] [android.view.LayoutInflater.inflate(LayoutInflater.java:538)] [android.view.LayoutInflater.inflate(LayoutInflater.java:485)] [com.kakao.sdk.controller.ApprovalWebviewController.<init>(ApprovalWebviewController.kt:8)] [com.kakao.sdk.controller.ApprovalWebviewController$Companion.c(ApprovalWebviewController.kt:1)] [com.kakao.sdk.CapriLoggedInActivity.n8(CapriLoggedInActivity.kt:5)] [com.kakao.sdk.CapriLoggedInActivity.onCreate(CapriLoggedInActivity.kt:5)] [android.app.Activity.performCreate(Activity.java:8282)] [android.app.Activity.performCreate(Activity.java:8262)] [android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)] [android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3996)] [android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4188)] [android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)] [android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)] [android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)] [android.app.ActivityThread$H.handleMessage(ActivityThread.java:2425)]
2022-01-04 15:20:38.890 1294-2644/? D/ConnectivityService: requestNetwork for uid/pid:10779/32177 activeRequest: null callbackRequest: 21785 [NetworkRequest [ REQUEST id=21786, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10779 RequestorUid: 10779 RequestorPkg: com.kakao.talk] ]] callback flags: 0 order: 2147483647
2022-01-04 15:20:38.892 1294-2011/? D/UntrustedWifiNetworkFactory: got request NetworkRequest [ REQUEST id=21786, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10779 RequestorUid: 10779 RequestorPkg: com.kakao.talk] ]
2022-01-04 15:20:38.892 1294-2011/? D/OemPaidWifiNetworkFactory: got request NetworkRequest [ REQUEST id=21786, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10779 RequestorUid: 10779 RequestorPkg: com.kakao.talk] ]
2022-01-04 15:20:38.893 32177-32177/? D/ConnectivityManager: StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3925)] [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3967)] [android.net.ConnectivityManager.registerNetworkCallback(ConnectivityManager.java:4349)] [p00.e(Unknown Source:108)] [Fa.a(Unknown Source:0)] [org.chromium.android_webview.AwContentsLifecycleNotifier.onFirstWebViewCreated(Unknown Source:23)] [J.N.MFiR_zHY(Native Method)] [org.chromium.android_webview.AwContents.<init>(Unknown Source:322)] [Oz0.run(Unknown Source:63)] [NB0.b(Unknown Source:21)] [LB0.run(Unknown Source:2)] [org.chromium.base.task.PostTask.c(Unknown Source:16)] [NB0.a(Unknown Source:20)] [com.android.webview.chromium.WebViewChromium.init(Unknown Source:328)] [android.webkit.WebView.<init>(WebView.java:443)] [android.webkit.WebView.<init>(WebView.java:363)] [android.webkit.WebView.<init>(WebView.java:345)] [android.webkit.WebView.<init>(WebView.java:332)] [java.lang.reflect.Constructor.newInstance0(Native Method)] [java.lang.reflect.Constructor.newInstance(Constructor.java:343)] [android.view.LayoutInflater.createView(LayoutInflater.java:858)] [android.view.LayoutInflater.createView(LayoutInflater.java:780)] [com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)] [android.view.LayoutInflater.onCreateView(LayoutInflater.java:934)] [android.view.LayoutInflater.onCreateView(LayoutInflater.java:954)] [android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1008)] [android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)] [android.view.LayoutInflater.inflate(LayoutInflater.java:663)] [android.view.LayoutInflater.inflate(LayoutInflater.java:538)] [android.view.LayoutInflater.inflate(LayoutInflater.java:485)] [com.kakao.sdk.controller.ApprovalWebviewController.<init>(ApprovalWebviewController.kt:8)] [com.kakao.sdk.controller.ApprovalWebviewController$Companion.c(ApprovalWebviewController.kt:1)] [com.kakao.sdk.CapriLoggedInActivity.n8(CapriLoggedInActivity.kt:5)] [com.kakao.sdk.CapriLoggedInActivity.onCreate(CapriLoggedInActivity.kt:5)] [android.app.Activity.performCreate(Activity.java:8282)] [android.app.Activity.performCreate(Activity.java:8262)] [android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)] [android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3996)] [android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4188)] [android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)] [android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)] [android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)] [android.app.ActivityThread$H.handleMessage(ActivityThread.java:2425)]
2022-01-04 15:20:38.903 1294-5128/? I/ActivityManager: DSS OFF for com.kakao.talk
2022-01-04 15:20:38.905 1294-5128/? D/DexController: init process display: set packageProcessId, displayId=0, same_package_proc=ProcessRecord{b1dee5b 32177:com.kakao.talk/u0a779}, app=ProcessRecord{62a6b01 1877:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a779i114}
2022-01-04 15:20:38.924 32177-32177/? I/MSHandlerLifeCycle: isMultiSplitHandlerRequested: ignored. pkg=com.kakao.talk parent=null callers=com.android.internal.policy.DecorView.setVisibility:4216 android.app.ActivityThread.handleResumeActivity:5285 android.app.servertransaction.ResumeActivityItem.execute:54 android.app.servertransaction.ActivityTransactionItem.execute:45 android.app.servertransaction.TransactionExecutor.executeLifecycleState:176 
2022-01-04 15:20:38.928 1877-1877/? D/LoadedApk: LoadedApk::makeApplication() appContext.mOpPackageName=com.kakao.talk appContext.mBasePackageName=com.kakao.talk
2022-01-04 15:20:38.931 990-1663/? I/SurfaceFlinger: id=100157 createSurf (0x0),-1 flag=80004, ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0
2022-01-04 15:20:38.939 1294-2298/? D/MdnieScenarioControlService:  packageName : com.kakao.talk    className : com.kakao.sdk.CapriLoggedInActivity
2022-01-04 15:20:38.946 1294-2644/? V/WindowManager: Relayout Window{ce8cf42 u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity}: viewVisibility=0 req=1080x2400 d0
2022-01-04 15:20:38.946 990-1020/? I/SurfaceFlinger: id=100158 createSurf (1x1),-3 flag=40004, com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177#0
2022-01-04 15:20:38.947 1294-2644/? D/WindowManager: makeSurface duration=1 name=com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177
2022-01-04 15:20:38.948 1294-2644/? V/WindowManager: Changing focus from null to Window{ce8cf42 u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:582 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6410 com.android.server.wm.WindowManagerService.relayoutWindow:2739 com.android.server.wm.Session.relayout:242 
2022-01-04 15:20:38.960 990-990/? I/SurfaceFlinger: [ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0] FrameRatePriority: 1
2022-01-04 15:20:38.962 1294-5128/? D/InputDispatcher: Focus request (0): ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity but waiting because NOT_VISIBLE
2022-01-04 15:20:38.969 1294-2772/? D/WindowManager: finishDrawingWindow: Window{ce8cf42 u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity} mDrawState=DRAW_PENDING
2022-01-04 15:20:38.985 1294-2772/? D/InputDispatcher: Focus entered window (0): ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity
2022-01-04 15:20:38.988 990-990/? D/SurfaceFlinger: Display 4633128672291735937 HWC layers:
         DEVICE | 0xb400007ce6318e90 | 0102 | RGBA_8888    |    0.0    0.0 1080.0 2176.0 |    0   80 1080 2256 | SurfaceView - com.sec.android.app.sb[...]owserMainActivity@a75bb0e@1(BLAST)#0
         DEVICE | 0xb400007ce6300150 | 0100 | RGBA_8888    |    0.0    0.0 1080.0 2400.0 |    0    0 1080 2400 | com.sec.android.app.sbrowser/com.sec[...]rowser.SBrowserMainActivity$_12434#0
         DEVICE | 0xb400007ce631bf90 | 0100 | RGBA_8888    |    0.0    0.0 1080.0 2400.0 |    0    0 1080 2400 | com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177#0
         DEVICE | 0xb400007ce62f8dd0 | 0100 | RGBA_8888    |    0.0    0.0 1080.0   79.0 |    0    0 1080   79 | StatusBar$_2163#0
         DEVICE | 0xb400007ce6305550 | 0100 | RGBA_8888    |    0.0    0.0 1080.0  144.0 |    0 2256 1080 2400 | NavigationBar0$_2163#0
2022-01-04 15:20:38.993 1294-1376/? I/PkgPredictorService-SecIpmManagerServiceImpl: reportToNAP uid:10779 pkgName:com.kakao.talk activityName:com.kakao.sdk.CapriLoggedInActivity thisTime:247
2022-01-04 15:20:38.995 1294-1376/? I/ActivityTaskManager: Displayed com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity: +247ms
2022-01-04 15:20:38.995 1294-1376/? I/Pageboost: Launch time gathered : pid 32177 com.kakao.talk 247
2022-01-04 15:20:39.000 5296-7670/? I/SAMSUNGPAY: [Hint_ej2] isHomePackageRunning topPkgName = com.kakao.talk, topClsName = com.kakao.sdk.CapriLoggedInActivity, return false , se : false
2022-01-04 15:20:39.003 1294-2881/? D/PkgPredictorService-IpmNapPreloadController: handleProcessForegroundFinish : <launchTime:2022-01-04 15:20:38 hour:15 day:3 previous:[com.kakao.talk, com.kakao.talk, com.kakao.talk] running:com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity apkVersion:9.6.1 userId:0 screenOrientation:1 wifi:3 bt:12 predictTime:1 launching Time:247 predicted:true prediction:[0_&_com.kakao.talk, 0_&_com.esstudio.clien, 0_&_com.sec.android.app.sbrowser] preloaded:false preloading:[0_&_com.kakao.talk, 0_&_com.esstudio.clien, 0_&_com.sec.android.app.sbrowser]>
2022-01-04 15:20:39.152 1294-2772/? V/WindowManager: Changing focus from Window{ce8cf42 u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity} to Window{f329349 u0 com.sec.android.app.sbrowser/com.sec.android.app.sbrowser.SBrowserMainActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:582 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6410 com.android.server.wm.DisplayContent.layoutAndAssignWindowLayersIfNeeded:4581 com.android.server.wm.TaskDisplayArea.positionChildTaskAt:549 
2022-01-04 15:20:39.168 990-990/? I/SurfaceFlinger: [ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0] FrameRatePriority: -1
2022-01-04 15:20:39.177 1294-5128/? D/InputDispatcher: Focus left window (0): ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity
2022-01-04 15:20:39.179 1294-1379/? D/SGM:GameManager: notePauseComponent(), received pkgName: com.kakao.talk, userId: 0
2022-01-04 15:20:39.261 1294-2772/? W/InputManager-JNI: Input channel object 'ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity (client)' was disposed without first being removed with the input manager!
2022-01-04 15:20:39.263 1294-5128/? I/ActivityTaskManager: Removing activity ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t31523 f}}(activityDestroyed)  from stack callers=com.android.server.wm.ActivityRecord.destroyed:3990 com.android.server.wm.ActivityClientController.activityDestroyed:282 android.app.IActivityClientController$Stub.onTransact:604 com.android.server.wm.ActivityClientController.onTransact:124 android.os.Binder.execTransactInternal:1220 
2022-01-04 15:20:39.264 1294-5128/? I/WindowManager: Destroying surface Surface(name=com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177)/@0x76bbb12 called by com.android.server.wm.WindowStateAnimator.destroySurface:971 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:508 com.android.server.wm.WindowState.removeImmediately:2914 com.android.server.wm.WindowContainer.removeImmediately:718 com.android.server.wm.WindowToken.removeImmediately:376 com.android.server.wm.ActivityRecord.removeImmediately:4173 com.android.server.wm.ActivityRecord.removeIfPossible:4180 com.android.server.wm.ActivityRecord.onRemovedFromDisplay:4267 
2022-01-04 15:20:39.268 990-990/? I/Layer: id=100158 removeFromCurrentState com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177#0 (269)
2022-01-04 15:20:39.268 990-990/? I/Layer: id=100157 removeFromCurrentState ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0 (269)
2022-01-04 15:20:39.268 990-990/? I/Layer: id=100156 removeFromCurrentState ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t31523}#0 (269)
2022-01-04 15:20:39.268 990-990/? I/SurfaceFlinger: id=100156 Removed ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t31523}#0 (269)
2022-01-04 15:20:39.268 990-990/? I/SurfaceFlinger: id=100157 Removed ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0 (269)
2022-01-04 15:20:39.269 990-990/? I/SurfaceFlinger: id=100158 Removed com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177#0 (269)
2022-01-04 15:20:39.269 990-990/? I/Layer: id=100157 Destroyed ce8cf42 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity#0
2022-01-04 15:20:39.269 990-990/? I/Layer: id=100156 Destroyed ActivityRecord{c00e22f u0 com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity t31523}#0
2022-01-04 15:20:39.270 990-990/? I/Layer: id=100158 Destroyed com.kakao.talk/com.kakao.sdk.CapriLoggedInActivity$_32177#0
2022-01-04 15:20:40.575 1294-5118/? D/SamsungAlarmManager: Cancel Alarm calling from uid:10779 pid :32177 / OP:PendingIntent{a642cd1: PendingIntentRecord{d3fc40d com.kakao.talk startService}}
2022-01-04 15:20:40.579 1294-5118/? D/SamsungAlarmManager: setInexact (T:0/F:8/AC:false) 20220104T152952 now=564924073 - CU:10779/CP:32177/OP:PendingIntent{cf4f336: PendingIntentRecord{d3fc40d com.kakao.talk startService}}
2022-01-04 15:20:42.286 627-627/? D/io_stats: !@ Read_top(KB): com.kakao.talk(32177) 1532 ocessService0:1(23030) 884 system_server(1294) 556
2022-01-04 15:20:42.286 627-627/? D/io_stats: !@ Write_top(KB): id.diagmonagent(5035) 300 com.kakao.talk(32177) 256 id.app.sbrowser(12434) 252

The page at ‘https://beta2.trenbe.com/social-login/kakao/popup’ was loaded over HTTPS, but requested an insecure resource ‘http://ec2-13-125-70-19.ap-northeast-2.compute.amazonaws.com:5000/’. This request has been blocked; the content must be served over HTTPS.", source: (1)

로그인 버튼 이후 ‘https://beta2.trenbe.com/social-login/kakao/popup’ 페이지로 이동하는데
이페이지는 어떤 기능인가요? Backend에서 인가 요청 하시는건가요?

인가요청 자체를 못한 것 같아요.

로그에 표시된 시간대에 인가 요청 건은 1건 있었는데요.

January 4th 2022, 15:20:36.000 - January 4th 2022, 15:20:43.192 

User-Agent를 보니 카카오톡 인앱브라우저에서 호출된 건입니다.

https://beta2.trenbe.com/social-login/kakao/popup 페이지가 위 코드를 가진 페이지라고 보시면 됩니다. - 모바일 웹브라우저 상에서 카카오 간편로그인 실패하는 현상 - dev.trenbe님의 글 #15

로그인페이지를 팝업형태로 노출하기 위하여 사용하고 있습니다.

카카오간편로그인 이후에 인가코드를 가지고 redirectUri 까지 이동했어야 했는데, 간편로그인단계에서 막힌것으로 보이고 있습니다.

Kakao Developers

디벨로퍼스 JS SDK authrize 데모로 해당 브라우징 환경에서 정상 작동하는지 확인 부탁드려요.

데모로도 동일한 증상이 있어 확인해보니 아래와 같은 상황에서는 동작을 안하네요.

  • 카카오톡 설치는 되어 있고
  • 카카오톡 로그인은 되어있지 않은 상황
  • 카카오톡 앱은 한번이라도 실행을 하였음