Android app crashes when opening branch link
I’m using cordova+branch.io+xwalk
When opening app using branch link my app fails (Android 6.0.1). App doesn’t fail when I open it as usual clicking on its icon. In adb logcat I see these errors:
06-02 19:47:33.596 778 2108 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=https://52i6.app.link/… cmp=com.android.chrome/com.google.android.apps.chrome.Main (has extras)} from uid 10027 on display 0
06-02 19:47:33.624 778 2059 D ConnectivityService: listenForNetwork for Listen from uid/pid:10035/2437 for NetworkRequest [ id=261, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
06-02 19:47:33.644 778 14759 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=document://3833?https://52i6.app.link/hzuaxyTNRt flg=0x82000 cmp=com.android.chrome/org.chromium.chrome.browser.document.DocumentActivity (has extras)} from uid 10035 on display 0
06-02 19:47:33.739 778 946 I ActivityManager: Start proc 10662:com.android.chrome:sandboxed_process4/u0i60 for service com.android.chrome/org.chromium.content.app.SandboxedProcessService4
06-02 19:47:33.790 10678 10678 W com.android.chrome:sandboxed_process4: type=1400 audit(0.0:700134): avc: denied { search } for comm=4173796E635461736B202331 name=”com.android.chrome” dev=”mmcblk0p28″ ino=81540 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
06-02 19:47:33.790 10678 10678 W com.android.chrome:sandboxed_process4: type=1400 audit(0.0:700135): avc: denied { search } for comm=4173796E635461736B202331 name=”com.android.chrome” dev=”mmcblk0p28″ ino=81540 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
06-02 19:47:33.790 10678 10678 W com.android.chrome:sandboxed_process4: type=1400 audit(0.0:700136): avc: denied { search } for comm=4173796E635461736B202331 name=”com.android.chrome” dev=”mmcblk0p28″ ino=81540 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
06-02 19:47:33.800 10662 10678 W FileUtils: Failed to chmod(/data/user/0/com.android.chrome/app_chrome): android.system.ErrnoException: chmod failed: EACCES (Permission denied)
I’ve removed all functions that use branch API but it still crashes.
UPD Sorry, that was my fault.
When app is opened using a branch link it receives address like ‘ example://open?link_click_id=xxx’ . This route doesn’t exist in my app. That’s why app crashed.
Hope it will help somebody 🙂