카카오톡으로 로그인하기 에서 Response 응답시간이 매우 오래 걸리는 이슈

응답은 항상 정상적으로 오지만 응답시간이 3 ~ 5초 정도 걸리고 있습니다. 로그를 보니 load-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … 7a932dc4 81f8f967 등이 있는 것으로 보아 뭔가 다운로드 받고 있는 것으로 보이는데 정확한 이유를 모르겠습니다.

ios 13
앱 id : 541690
sdk 사용 : 코코아팟
sdk 버전 : 2.3.2

로그는
2021-04-10 02:58:31242 [:speech_balloon:][Properties.swift 32:21] -> load-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … 7a932dc4 81f8f967 }
2021-04-10 02:58:31246 [:speech_balloon:][Properties.swift 34:21] -> load-plain : {length = 239, bytes = 0x7b227265 66726573 68546f6b 656e4578 … 223a3433 3139397d }
2021-04-10 02:58:31246 [:speech_balloon:][Auth.swift 43:17] -> >>>> [KakaoSDKCommon.SessionType.RxAuthApi: Alamofire.Session, KakaoSDKCommon.SessionType.Api: Alamofire.Session, KakaoSDKCommon.SessionType.Auth: Alamofire.Session, KakaoSDKCommon.SessionType.AuthApi: Alamofire.Session]
2021-04-10 02:58:31246 [:speech_balloon:][MigrateManager.swift 20:17] -> ============================================================================================================
2021-04-10 02:58:31247 [:speech_balloon:][MigrateManager.swift 21:17] -> check migration…
2021-04-10 02:58:31247 [:speech_balloon:][MigrateManager.swift 23:21] -> pass migration…
2021-04-10 02:58:31247 [:speech_balloon:][MigrateManager.swift 24:21] -> used sdk version:2.3.2
2021-04-10 02:58:31247 [:speech_balloon:][Properties.swift 22:21] -> save-plain : {length = 239, bytes = 0x7b227265 66726573 68546f6b 656e4578 … 223a3433 3139397d }
2021-04-10 02:58:31250 [:speech_balloon:][Properties.swift 24:21] -> save-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … ab7e8ffa 40875f1b }

이고

2021-04-10 02:58:31247 [:speech_balloon:][Properties.swift 22:21] -> save-plain : {length = 239, bytes = 0x7b227265 66726573 68546f6b 656e4578 … 223a3433 3139397d }
2021-04-10 02:58:31250 [:speech_balloon:][Properties.swift 24:21] -> save-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … ab7e8ffa 40875f1b }

이 부분에서 지연시간이 오래 지속되는 것 같습니다

안녕하세요
해당 요청시간의 서버로그 시간과 xcode로그 시간을 비교해보면 저희 서버와의 딜레이가 10초정도 있는것 같은데요.
47

저희가 배포하는 샘플앱에서도 해당 현상이 발생하는지 확인부탁드립니다.

그리고, 로그인 리퀘스트까지 나오게 포함해서 로그 부탁드립니다.

요청주신 로그인 리퀘스트부터 전체 로그인 완료될 때 까지 로그 모두 첨부합니다!
@lucas.arts
2021-04-14 06:53:54074 [:speech_balloon:][KakaoSDKCommon.swift 93:21] -> sdk_version : 2.3.2
2021-04-14 06:53:54080 [:speech_balloon:][AuthController.swift 316:21] -> code_verifier: 6YRC2+cifLs+c03BppnKoquo5yen2kUwt39om2Lw0Dhj+mBDM+Cvq/2tLmaUvAqNzkSKkpwB+K6w+5+Rfd57qg
2021-04-14 06:53:54081 [:speech_balloon:][AuthController.swift 319:25] -> code_challenge: ev83n_l1bZKEmHTbWx8L5AaJSqfuxf9gsl9ivWbIhSo
2021-04-14 06:53:54113 [:speech_balloon:][AuthController.swift 92:25] -> 카카오톡 실행: kakaokompassauth://authorize?redirect_uri=kakao1344d8a41d4ab9380eb927f3c0c0a7fc://oauth&headers=%7B%22KA%22:%22sdk%5C/2.3.2%20sdk_type%5C/swift%20os%5C/ios-13.6.1%20lang%5C/ko-KR%20res%5C/375x812%20device%5C/iPhone%20origin%5C/tk.clabvoca.jungsikcho%20app_ver%5C/1.0%22%7D&params=%7B%22code_challenge_method%22:%22S256%22,%22code_challenge%22:%22ev83n_l1bZKEmHTbWx8L5AaJSqfuxf9gsl9ivWbIhSo%22%7D&response_type=code&client_id=1344d8a41d4ab9380eb927f3c0c0a7fc
:man_technologist: 18:53:54:927 AppDelegate / applicationDidEnterBackground(_:slight_smile: / (52) :man_technologist: application enter background
2021-04-14 06:53:55099 [:speech_balloon:][Api.swift 86:29] -> ===================================================================================================
2021-04-14 06:53:55100 [:speech_balloon:][Api.swift 87:29] -> session:
type: Auth

2021-04-14 06:53:55101 [:information_source:️][Api.swift 88:29] -> request:
method: HTTPMethod(rawValue: “POST”)
url:https://kauth.kakao.com/oauth/token
headers:nil
parameters: Optional([“client_id”: “1344d8a41d4ab9380eb927f3c0c0a7fc”, “grant_type”: “authorization_code”, “ios_bundle_id”: “tk.clabvoca.jungsikcho”, “code_verifier”: “6YRC2+cifLs+c03BppnKoquo5yen2kUwt39om2Lw0Dhj+mBDM+Cvq/2tLmaUvAqNzkSKkpwB+K6w+5+Rfd57qg”, “redirect_uri”: “kakao1344d8a41d4ab9380eb927f3c0c0a7fc://oauth”, “code”: “QTHtlBT8aBr2eWftJVfAdWJnQjp-ZtJ6t4oeGrpWOQgtgZpL3wzXmWS-h72-hXtxi4iJDAopb9UAAAF4z80xsg”])

2021-04-14 06:53:55101 [:information_source:️][Api.swift 89:29] -> response:
Optional({
“access_token” = “2YHlWX_R5g2S2seYVOp8ZCVgLqZt7W1e6qBrVAopcFEAAAF4z80ziw”;
“expires_in” = 43199;
“refresh_token” = “Atm0d1S3jAOV-vtS7CYFTROk5-lLg5k297c4mgopcFEAAAF4z80ziQ”;
“refresh_token_expires_in” = 5183999;
scope = “account_email”;
“token_type” = bearer;
})

2021-04-14 06:54:05055 [:speech_balloon:][Properties.swift 32:21] -> load-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … 9e69e61d 8ba7d764 }
2021-04-14 06:54:05062 [:speech_balloon:][Properties.swift 34:21] -> load-plain : {length = 239, bytes = 0x7b227265 66726573 68546f6b 656e4578 … 223a3433 3139397d }
2021-04-14 06:54:05063 [:speech_balloon:][Auth.swift 43:17] -> >>>> [KakaoSDKCommon.SessionType.RxAuthApi: Alamofire.Session, KakaoSDKCommon.SessionType.AuthApi: Alamofire.Session, KakaoSDKCommon.SessionType.Auth: Alamofire.Session, KakaoSDKCommon.SessionType.Api: Alamofire.Session]
2021-04-14 06:54:05064 [:speech_balloon:][MigrateManager.swift 20:17] -> ============================================================================================================
2021-04-14 06:54:05064 [:speech_balloon:][MigrateManager.swift 21:17] -> check migration…
2021-04-14 06:54:05064 [:speech_balloon:][MigrateManager.swift 23:21] -> pass migration…
2021-04-14 06:54:05064 [:speech_balloon:][MigrateManager.swift 24:21] -> used sdk version:2.3.2
2021-04-14 06:54:05065 [:speech_balloon:][Properties.swift 22:21] -> save-plain : {length = 239, bytes = 0x7b227265 66726573 68546f6b 656e4578 … 223a3433 3139397d }
2021-04-14 06:54:05069 [:speech_balloon:][Properties.swift 24:21] -> save-crypted : {length = 240, bytes = 0x2d4b4e7c 8c1ffb95 180538cb 15451c65 … 499f3ca2 9d44820b }

완료콜백에 개발자님 로직 들어간거 없으신가요?
가능하다면 로그인시 코드첨부와 영상 첨부 부탁드려도 될까요?
(메세지로 부탁드립니다.)

@lucas.arts
개발자님 앞서 댓글로 도움주신 sample 앱 보라고 하신 것에서 힌트를 얻어 해결했습니다.

  1. 일단 모든 sdk 버전을 sample 과 마찬가지로 2.4.1 로 업데이트 한 후

  2. AppDelegate 의 Oepn URL 콜백 부분을 Scene Delegate 방식에서 AppDelegate 방식으로 변경 후
    문서에 나와있는 것을 따르니 정상적으로 작동하네요.

감사합니다 즐거운 주말 되시길…:grin:

1개의 좋아요