Admob Security Exception : Permission Denial

一世执手 提交于 2019-12-10 13:15:07

问题


I tap on my AdView and open alibaba app page in play store and then installed it. After that, I started to get this error and my app crashed whenever I tap on the AdView. After uninstalling this alibaba app, I was able to tap and view the ads.

Now I'm curious why this happened?

Caused by java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://www.googleadservices.com/... flg=0x10000000 cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba.android.intl.weex.activity.WeexPageActivity } from ProcessRecord{800f07c 11735:com.figengungor.konuscevir/u0a452} (pid=11735, uid=10452) not exported from uid 10256

Here is my full crash report:

Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.figengungor.konuscevir/com.google.android.gms.ads.AdActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://www.googleadservices.com/... flg=0x10000000 cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba.android.intl.weex.activity.WeexPageActivity } from ProcessRecord{800f07c 11735:com.figengungor.konuscevir/u0a452} (pid=11735, uid=10452) not exported from uid 10256
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2726)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2787)
android.app.ActivityThread.-wrap12 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1504)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6247)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:872)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:762)
arrow_drop_down
Caused by java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://www.googleadservices.com/... flg=0x10000000 cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba.android.intl.weex.activity.WeexPageActivity } from ProcessRecord{800f07c 11735:com.figengungor.konuscevir/u0a452} (pid=11735, uid=10452) not exported from uid 10256
android.os.Parcel.readException (Parcel.java:1683)
android.os.Parcel.readException (Parcel.java:1636)
android.app.ActivityManagerProxy.startActivity (ActivityManagerNative.java:3141)
android.app.Instrumentation.execStartActivity (Instrumentation.java:1520)
android.app.Activity.startActivityForResult (Activity.java:4317)
android.app.Activity.startActivityForResult (Activity.java:4276)
android.app.Activity.startActivity (Activity.java:4600)
android.app.Activity.startActivity (Activity.java:4568)
com.google.android.gms.ads.internal.util.ac.a (:com.google.android.gms.DynamiteModulesA:1154)
com.google.android.gms.ads.internal.overlay.a.a (:com.google.android.gms.DynamiteModulesA:93)
com.google.android.gms.ads.internal.overlay.a.a (:com.google.android.gms.DynamiteModulesA:36)
com.google.android.gms.ads.internal.overlay.m.a (:com.google.android.gms.DynamiteModulesA:366)
com.google.android.gms.ads.internal.overlay.client.c.onTransact (:com.google.android.gms.DynamiteModulesA:58)
android.os.Binder.transact (Binder.java:499)
com.google.android.gms.b.ahc.a ()
com.google.android.gms.ads.AdActivity.onCreate ()
android.app.Activity.performCreate (Activity.java:6757)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1119)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2679)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2787)
android.app.ActivityThread.-wrap12 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1504)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6247)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:872)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:762)

回答1:


It's not a bug in your app, but this is a bug in the "Alibaba B2B trade" app. From that app's apk:

$ aapt l -a Alibaba\ com\ B2B\ Trade\ App_v4.15.1.apk | grep -A 17 WeexPageActivity 
      E: activity (line=1284)
        A: android:theme(0x01010000)=@0x7f0a010d
        A: android:name(0x01010003)="com.alibaba.android.intl.weex.activity.WeexPageActivity" (Raw: "com.alibaba.android.intl.weex.activity.WeexPageActivity")
        A: android:exported(0x01010010)=(type 0x12)0x0
        A: android:screenOrientation(0x0101001e)=(type 0x10)0xffffffff
        A: android:configChanges(0x0101001f)=(type 0x11)0x4a0
        E: intent-filter (line=1290)
          E: action (line=1291)
            A: android:name(0x01010003)="android.intent.action.VIEW" (Raw: "android.intent.action.VIEW")
          E: category (line=1293)
            A: android:name(0x01010003)="android.intent.category.DEFAULT" (Raw: "android.intent.category.DEFAULT")
          E: category (line=1294)
            A: android:name(0x01010003)="com.alibaba.android.intl.category.WEEX" (Raw: "com.alibaba.android.intl.category.WEEX")
          E: data (line=1296)
            A: android:scheme(0x01010027)="http" (Raw: "http")
          E: data (line=1297)
            A: android:scheme(0x01010027)="https" (Raw: "https")
          E: data (line=1298)
            A: android:scheme(0x01010027)="file" (Raw: "file")

It looks like they registered http/https/file schemes (without specifying an host) to an unexported Activity. So every app that tries to start an intent with one of these scheme will crash.

My 2 cents: Android shouldn't crash the app, it should ignore unexported activities in this case.

More details here. They've been notified and should fix their app soon.



来源:https://stackoverflow.com/questions/41526695/admob-security-exception-permission-denial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!