iamport / iamport-android

22 stars 6 forks source link

Android 14(SDK 34) 버전에서 java.lang.SecurityException 에러 발생 #71

Open NamJa opened 1 year ago

NamJa commented 1 year ago
2023-09-27 08:57:35.611  7154-7154  AndroidRuntime          com.secondsyndrome.dalock            E  FATAL EXCEPTION: main
    Process: com.secondsyndrome.dalock, PID: 7154
    java.lang.SecurityException: com.secondsyndrome.dalock: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
     at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
     at android.os.Parcel.createException(Parcel.java:3041)
     at android.os.Parcel.readException(Parcel.java:3024)
     at android.os.Parcel.readException(Parcel.java:2966)
     at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
     at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
     at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
     at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
     at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
     at com.iamport.sdk.presentation.viewmodel.MainViewModel.registerIamportReceiver(MainViewModel.kt:170)
     at com.iamport.sdk.presentation.activity.IamportSdk.initStart(IamportSdk.kt:276)
     at com.iamport.sdk.domain.core.Iamport.corePayment$sdk_release(Iamport.kt:332)
     at com.iamport.sdk.domain.core.Iamport$payment$1.invoke(Iamport.kt:286)
     at com.iamport.sdk.domain.core.Iamport$payment$1.invoke(Iamport.kt:285)
     at com.iamport.sdk.domain.utils.PreventOverlapRun.launch(PreventOverlapRun.kt:18)
     at com.iamport.sdk.domain.utils.PreventOverlapRun.launch$default(PreventOverlapRun.kt:15)
     at com.iamport.sdk.domain.core.Iamport.payment(Iamport.kt:285)
     at com.iamport.sdk.domain.core.Iamport.payment$default(Iamport.kt:266)
     at com.secondsyndrome.dalock.fragment.branchContract.contract.BranchUnitPaymentFragment.proceedPay$lambda$22(BranchUnitPaymentFragment.kt:527)
     at com.secondsyndrome.dalock.fragment.branchContract.contract.BranchUnitPaymentFragment.$r8$lambda$-VEtHmIJUTfIT1TVkjLkjgg1894(Unknown Source:0)
     at com.secondsyndrome.dalock.fragment.branchContract.contract.BranchUnitPaymentFragment$$ExternalSyntheticLambda9.onClick(Unknown Source:2)
     at android.view.View.performClick(View.java:7659)
     at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1211)
     at android.view.View.performClickInternal(View.java:7636)
     at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
     at android.view.View$PerformClick.run(View.java:30156)
     at android.os.Handler.handleCallback(Handler.java:958)
     at android.os.Handler.dispatchMessage(Handler.java:99)
     at android.os.Looper.loopOnce(Looper.java:205)
     at android.os.Looper.loop(Looper.java:294)
     at android.app.ActivityThread.main(ActivityThread.java:8177)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
    Caused by: android.os.RemoteException: Remote stack trace:
     at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13908)
     at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570)
     at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720)
     at android.os.Binder.execTransactInternal(Binder.java:1339)
     at android.os.Binder.execTransact(Binder.java:1275)

1.3.6 버전 사용중입니다. IamPort.payment() 함수를 실행할 때 발생합니다. MainViewModel에서 registerReceiver 함수에 RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED 중 하나가 등록되지 않아 발생한 이슈로 보이는데, 수정 부탁드립니다