iamport / iamport_flutter

Flutter App에서 아임포트 결제서비스 연동을 위한 모듈입니다.
MIT License
68 stars 37 forks source link

본인인증 화면 진입시 오류 #47

Closed JeongEEE closed 2 years ago

JeongEEE commented 2 years ago

안녕하세요

안드로이드 기기에서 본인인증 서비스를 사용하고 있는데요 android-arm64 기기입니다. 버전은 iamport_flutter: ^0.10.0-dev.4 인증화면이 나온 후에 다음과 같은 문제가 발생합니다

  1. 화면이 멈추면서 어떠한 클릭도 안되는 문제 또는
  2. 앱이 멈추면서 강제종료되는 문제

강제 종료될때는 아래와 같은 로그가 출력되는데요 *** 는 특정데이터라서 가렸습니다

D/WebView (19949): evaluateJavascript=            IMP.init("imp******");
D/WebView (19949):             IMP.certification({
D/WebView (19949):  "merchant_uid": "mid_******",
D/WebView (19949):  "company": "****",
D/WebView (19949):  "carrier": "***",
D/WebView (19949):  "name": "***",
D/WebView (19949):  "phone": "010********"
D/WebView (19949): }, function(response) {
D/WebView (19949):               const query = [];
D/WebView (19949):               Object.keys(response).forEach(function(key) {
D/WebView (19949):                 query.push(key + "=" + response[key]);
D/WebView (19949):               });
D/WebView (19949):               location.href = "http://detectchangingwebview/iamport/f" + "?" + query.join("&");
D/WebView (19949):             });

W/google-breakpad(19949): Chrome build fingerprint:
W/google-breakpad(19949): 1.0.4
W/google-breakpad(19949): 1
W/google-breakpad(19949): ### ### ### ### ### ### ### ### ### ### ### ### ###
F/libc    (19949): Fatal signal 6 (SIGABRT), code -6 in tid 19973 (1.raster)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'NODROPOUT/T25/T25:8.1.0/O11019/1539845665:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 19949, tid: 19973, name: 1.raster  >>> com.****.*** <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1258)] Check failed: CheckException(env).
'
    x0   0000000000000000  x1   0000000000004e05  x2   0000000000000006  x3   0000000000000008
    x4   0000000080000000  x5   0000000080000000  x6   0000000080000000  x7   0000008000000000
    x8   0000000000000083  x9   8d671053adb319e2  x10  0000000000000000  x11  0000000000000001
    x12  0000007c5cfe3880  x13  0000000000000018  x14  ffffffffffffffff  x15  0000839c01d8bf3b
    x16  0000007c80f0c2f8  x17  0000007c80ead6bc  x18  0000000013440208  x19  0000000000004ded
    x20  0000000000004e05  x21  0000007c65100988  x22  0000007c76814c28  x23  0000007c743c8300
    x24  0000000000000000  x25  0000000000000000  x26  0000000000000001  x27  0000000000000034
    x28  0000000000000001  x29  0000007c65100960  x30  0000007c80e60780
    sp   0000007c65100920  pc   0000007c80ead6c4  pstate 0000000060000000
backtrace:
    #00 pc 000000000006a6c4  /system/lib64/libc.so (tgkill+8)
    #01 pc 000000000001d77c  /system/lib64/libc.so (abort+88)
    #02 pc 0000000000002dc4  /data/app/com.****.****-****==/lib/arm64/libflutter.so (offset 0x131a000)
Lost connection to device.

코드는 예제코드와 동일하게 사용하고 있습니다 원인을 알수 있을까요?

anymate98 commented 2 years ago

안녕하세요, 아임포트 기술지원팀입니다.

문제의 원인이 명화하지 않지만 flutter 이슈 검색을 해보니 낮은 안드로이드 버전 때문일 수 있습니다. 해당 기기의 정보가 포함된 flutter doctor -v 출력을 볼 수 있을까요?

또한 다른 기기에서도 해당 문제가 발생하는지도 확인 부탁드립니다.

JeongEEE commented 2 years ago
❯ flutter doctor -v                
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5 20G71 darwin-x64, locale ko-KR)
    • Flutter version 2.2.3 at /Users/jeong/flutter
    • Framework revision f4abaa0735 (4 months ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/jeong/Library/Android/sdk
    • Platform android-30, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.0, Build version 13A233
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.61.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.27.0

[✓] Connected device (2 available)
    • X20L 101 (mobile) • 0123456789ABCDEF • android-arm64  • Android 8.0.0 (API 26)
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 94.0.4606.81

• No issues found!

현재는 X20L 101 (mobile) 기기에서만 발생합니다

anymate98 commented 2 years ago

우선 플러터 버전 한번 최신으로 업데이트보고 다시 해보시면 좋을 것 같습니다.

인증 창 나오고 화면 혹은 앱이 멈춘다는 것을 봤을 때 웹뷰 문제인 듯 싶은데 정확히 예제->인증창의 어떤 프로세스에서 문제가 발생하나요? 웹뷰를 띄웠을 때 바로 문제가 생기는지, 아니면 본인인증을 하는 도중에 문제가 생기는건지 궁금합니다. 현재로서는 안드로이드 웹뷰의 하드웨어/소프트웨어 렌더링 설정이 원인 아닐까 합니다.

JeongEEE commented 2 years ago

웹뷰를 띄웟을때 화면이 멈추는게 멈춘것처럼 보였지만 터치 위치와 웹뷰에서 클릭되는 위치가 다른것 같습니다 이전에 올린 이슈처럼 화면도 꽉차게 랜더링 되지 않고 (해당 이슈 기기는 레노버 태블릿) https://github.com/iamport/iamport_flutter/issues/42 태블릿 화면에서 스마트폰 화면처럼 랜더링되는 문제도 있습니다 (이슈 기기는 X20L 101) 테스트 세번중에 두번은 강제종료되고 한번은 터치 위치가 올바르지 않습니다

해당 이슈는 특정기기에서만 발생하구요(다른기종의 복수의 태블릿으로 개발중입니다) 크롬버전을 업데이트, 안드로이드 시스템 웹뷰 업데이트 둘다 해봤지만 해당 이슈는 계속 발생하였습니다

서비스를 급히 개시 해야하는 상황이어서 일단은 IamportCertification 위젯을 사용하지 않고 귀사의 본인인증 서비스를 웹으로 구현하여 저희 서버에 웹페이지를 구축, webview_flutter로 웹페이지를 불러와서 서비스를 제공하는 형태로 수정했습니다

특정 기기에서 발생하는 오류를 직접 재현해보지 않으면 수정이 어렵다는것을 잘 알고 있습니다 IamportCertification 위젯 내부에 사용하시는 웹뷰 또는 웹뷰와 관련된 부분이 저희가 개발하는데 사용한 태블릿과 충돌이 발생하는것 같습니다 해당 기종은 X20L 101 태블릿 입니다

anymate98 commented 2 years ago

이전의 이슈의 경우에는 태블릿이라는 기기 특성상 공통적으로 발생하는 문제라 원인 파악이 비교적 빠르게 되었지만, 이번에는 특정 기기에만 발생하는 것이라 도움을 드리기 힘들 것 같습니다. 해당 태블릿의 미디어텍 ap때문에 플러터가 잘 작동을 안하는건지, 아니면 웹뷰 플러그인의 설정이 안맞는건지 문제가 어디인지는 모르겠지만 실제 재현이 안되므로 참 어려운 문제입니다.