dropbox-sdk-java icon indicating copy to clipboard operation
dropbox-sdk-java copied to clipboard

AuthActivity startWebAuth Crash

Open BaojunCZ opened this issue 2 years ago • 5 comments

Fatal Exception: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://www.dropbox.com/... cmp=team.opay.pay.merchant.service/com.opay.webview.WebFoundationActivity } from ProcessRecord{28b315a 21629:com.smartwallet.app/u0a265} (pid=21629, uid=10265) not exported from uid 10256 at android.os.Parcel.createExceptionOrNull(Parcel.java:2373) at android.os.Parcel.createException(Parcel.java:2357) at android.os.Parcel.readException(Parcel.java:2340) at android.os.Parcel.readException(Parcel.java:2282) at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:4128) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1732) at android.app.Activity.startActivityForResult(Activity.java:5370) at android.app.Activity.startActivityForResult(Activity.java:5328) at android.app.Activity.startActivity(Activity.java:5714) at android.app.Activity.startActivity(Activity.java:5667) at com.dropbox.core.android.AuthActivity.startWebAuth(AuthActivity.kt:295) at com.dropbox.core.android.AuthActivity.onTopResumedActivityChanged$lambda-0(AuthActivity.kt:144) at android.app.Activity.runOnUiThread(Activity.java:7138) at com.dropbox.core.android.AuthActivity.onTopResumedActivityChanged(AuthActivity.kt:134) at android.app.Activity.performTopResumedActivityChanged(Activity.java:2000) at android.app.ActivityThread.reportTopResumedActivityChanged(ActivityThread.java:4911) at android.app.ActivityThread.handleTopResumedActivityChanged(ActivityThread.java:4895) at android.app.servertransaction.TopResumedActivityChangeItem.execute(TopResumedActivityChangeItem.java:39) 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:2203) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:268) at android.app.ActivityThread.main(ActivityThread.java:8017) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)

   Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1095)
at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1643)
at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:1279)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1238)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1181)

BaojunCZ avatar Aug 04 '23 02:08 BaojunCZ

I'll be happy to help with any issues you're having with the SDK, but I'll need some more information. Please reply with:

  • the name and version number of the platform and SDK/library you are using
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)

greg-db avatar Aug 07 '23 14:08 greg-db

com.dropbox.core:dropbox-core-sdk:5.4.4 Phone: Infinix Smart 4 Plus,Infinix HOT 10S startOAuth2PKCE

BaojunCZ avatar Sep 27 '23 02:09 BaojunCZ

This issue does not reproduce for me when running startOAuth2PKCE using v5.4.4 of the Dropbox SDK.

Have you made any changes to the SDK?

What version of Android are you using?

Have you configured the AuthActivity as shown in the example here?

Please share the specific steps and code to reproduce the issue so we can look into it.

greg-db avatar Sep 27 '23 18:09 greg-db

val requestConfig = DbxRequestConfig(ClientIdentifier) val scopes = listOf( "account_info.read", "files.content.write", "files.content.read", "files.metadata.write", "files.metadata.read" ) Auth.startOAuth2PKCE(context, ApiKey, requestConfig, scopes)

I did not change the SDK.

I am also unable to reproduce the issue, only receiving many exceptions on the log collection platform. And most of the error reports come from the Transsion brand, and a small part comes from Samsung.

BaojunCZ avatar Jan 23 '24 03:01 BaojunCZ

Can you confirm if you configured the AuthActivity as shown in the example here? In particular, it looks like the android:exported="true" line may be relevant, so make sure you have that.

Also, I notice there are two different third party package names mentioned in the error output: team.opay.pay.merchant.service and com.smartwallet.app. Can you clarify what these two are?

greg-db avatar Jan 23 '24 20:01 greg-db