Android 인앱결제 실패 관련

android 환경에서 인앱결제 실패가 발생하여 문의드립니다.

샌드박스 환경에선 정상적으로 결제가 완료되지만 실제 기기에서 테스트 시 다음과 같이 SDK응답을 웹뷰로 받는 과정에서 실패하는 것으로 보입니다.

  • orderId: 45b397bb-83e5-43b4-8731-2811e9f61260 (콘솔 결제 성공)
  • 결제일시: 2025.09.26. 11:55

{
“consumeResIsNull”: true,
“orderId”: null,
“serverError”: “Cannot convert argument of type class kotlin.Unit”,
“paymentSuccess”: false,
“serverResponseType”: “error”,
“serverResponseValue”: “Cannot convert argument of type class kotlin.Unit”,
“mutationStatus”: “pending”,
“mutationRetryCount”: 0,
“rawServerResponse”: “Error: Cannot convert argument of type class kotlin.Unit\n at promiseMethodWrapper (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:439083)\n at processProductGrant (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:71509)\n at apply (native)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:222261)\n at call (native)\n at step (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:38728)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:37839)\n at asyncGeneratorStep (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36048)\n at _next (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36321)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36272)\n at tryCallTwo (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:452200)\n at doResolve (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:453559)\n at Promise2 (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:452306)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36193)\n at apply (native)\n at wrappedFunc2 (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:222302)\n at apply (native)\n at methodHandler (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:221964)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:223628)\n at call (native)\n at step (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:38728)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:37839)\n at asyncGeneratorStep (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36048)\n at _next (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36321)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36272)\n at tryCallTwo (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:452200)\n at doResolve (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:453559)\n at Promise2 (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:452306)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:36193)\n at apply (native)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/vigloo.hbc:1:224039)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:1580277)\n at apply (native)\n at __callFunction (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:437321)\n at anonymous (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:435777)\n at __guard (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:436716)\n at callFunctionReturnFlushedQueue (address at /data/user/0/viva.republica.toss/cache/app_in_toss_cache/shared.hbc:1:435735)”
}

환경

  • 웹뷰 SDK “@apps-in-toss/web-framework”: “1.1.3”
  • 기기: 갤럭시 폴드 7 (SM-F966N)
  • 토스 앱 버전: 5.230.0
메시지 Cannot convert argument of type class kotlin.Unit 는 RN(Android)에서 Kotlin의 Unit 값을 JS로 넘기려 할 때 발생합니다.


- JS(WebView→RN)에서 어떤 네이티브 메서드를 호출했고(스택에 promiseMethodWrapper), 
- Kotlin 모듈이 promise.resolve(Unit) 혹은 emit("Event", Unit) 같은 식으로 Unit을 JS로 전달하려 해서 변환에 실패했습니다.
(JS로 보낼 수 있는 건 null/Boolean/Number/String/WritableMap/WritableArray 뿐)

로그를 기반으로 GPT로 확인해보니 네이티브(Android) 브리지 쪽 에러가 의심됩니다.

샌드박스에서는 mock 데이터가 내려가고 있고 무조건 정상 승인 처리를 내려드리고 있어요.

출시하기 QR코드를 통해 실제 테스트가 필요합니다.

확인해볼게요.

1개의 좋아요

안녕하세요 :slight_smile:
QR로 테스트하신거 맞으실까요 ? 정상적으로 주문 > 결제 플로우로 가다 결제 마지막에 에러 응답이 오신건가요 ?!

네 맞습니다. QR로 테스트 진행하였고 정상 결제 완료되었다고 콘솔에 표시되지만 기기에선 에러 응답이 내려옵니다.

안녕하세요 :slight_smile:
이 이슈 해결되었습니다. 토스앱 업데이트 후 테스트 부탁드려요 :man_bowing:

1개의 좋아요

감사합니다. 업데이트 후 정상 동작 확인되었습니다. :saluting_face: