Search Unity

Deeplink crash when clicked from overlayed facebook messenger

Discussion in 'Android' started by flashmandv, Nov 16, 2019.

  1. flashmandv

    flashmandv

    Joined:
    Mar 26, 2015
    Posts:
    156
    So we implemented deeplinks in our app, but despite having android:launchMode="singleTask" (or singleInstance) - the game tries to open new game instance and crashes when you have the facebook messenger app open on top of the game and you click the deep link. If messenger is not in overlay mode (not on top), then the deep link works just fine.

    AndroidManifest MainActivity:
    Code (CSharp):
    1.     <activity android:name="com.playrento.deeplink.RentoUnityPlayerActivity" android:label="@string/app_name" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:launchMode="singleTask" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    2.       <intent-filter>
    3.         <action android:name="android.intent.action.MAIN" />
    4.         <category android:name="android.intent.category.LAUNCHER" />
    5.       </intent-filter>
    6.          
    7.      <intent-filter>
    8.         <action android:name="android.intent.action.VIEW" />
    9.         <category android:name="android.intent.category.DEFAULT" />
    10.         <category android:name="android.intent.category.BROWSABLE" />
    11.         <data android:scheme="http" android:host="playrento.com" android:pathPrefix="/inv" />
    12.         <data android:scheme="https" android:host="playrento.com" android:path="/inv" />
    13.       </intent-filter>
    14.    
    15.       <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    16.       <meta-data android:name="android.app.lib_name" android:value="unity" />
    17.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    18.       <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    19.      
    If I use the default com.unity3d.player.UnityPlayerActivity , the game still crashes.
    Unity version is 2018.1.1f1

    Here is the logcat output:
    Code (Boo):
    1.  
    2. 11-16 17:38:27.349 14312-14312/ W/Unity: Timeout while trying to pause the Unity Engine.
    3. 11-16 17:38:27.362 14312-14312/ W/Unity: Failed to get permission info for com.htc.launcher.permission.READ_SETTINGS, manifest likely missing custom permission declaration
    4. 11-16 17:38:27.362 14312-14312/ W/Unity: Permission com.htc.launcher.permission.READ_SETTINGS ignored
    5. 11-16 17:38:27.363 14312-14312/ W/Unity: Failed to get permission info for com.htc.launcher.permission.UPDATE_SHORTCUT, manifest likely missing custom permission declaration
    6. 11-16 17:38:27.363 14312-14312/ W/Unity: Permission com.htc.launcher.permission.UPDATE_SHORTCUT ignored
    7. 11-16 17:38:27.363 14312-14312/ W/Unity: Failed to get permission info for com.sonyericsson.home.permission.BROADCAST_BADGE, manifest likely missing custom permission declaration
    8. 11-16 17:38:27.363 14312-14312/ W/Unity: Permission com.sonyericsson.home.permission.BROADCAST_BADGE ignored
    9. 11-16 17:38:27.363 14312-14312/ W/Unity: Failed to get permission info for com.sonymobile.home.permission.PROVIDER_INSERT_BADGE, manifest likely missing custom permission declaration
    10. 11-16 17:38:27.363 14312-14312/ W/Unity: Permission com.sonymobile.home.permission.PROVIDER_INSERT_BADGE ignored
    11. 11-16 17:38:27.363 14312-14312/ W/Unity: Failed to get permission info for com.anddoes.launcher.permission.UPDATE_COUNT, manifest likely missing custom permission declaration
    12. 11-16 17:38:27.363 14312-14312/ W/Unity: Permission com.anddoes.launcher.permission.UPDATE_COUNT ignored
    13. 11-16 17:38:27.364 14312-14312/ W/Unity: Failed to get permission info for com.majeur.launcher.permission.UPDATE_BADGE, manifest likely missing custom permission declaration
    14. 11-16 17:38:27.364 14312-14312/ W/Unity: Permission com.majeur.launcher.permission.UPDATE_BADGE ignored
    15. 11-16 17:38:27.364 14312-14312/ W/Unity: Failed to get permission info for com.huawei.android.launcher.permission.CHANGE_BADGE, manifest likely missing custom permission declaration
    16. 11-16 17:38:27.364 14312-14312/ W/Unity: Permission com.huawei.android.launcher.permission.CHANGE_BADGE ignored
    17. 11-16 17:38:27.364 14312-14312/ W/Unity: Failed to get permission info for com.huawei.android.launcher.permission.READ_SETTINGS, manifest likely missing custom permission declaration
    18. 11-16 17:38:27.364 14312-14312/ W/Unity: Permission com.huawei.android.launcher.permission.READ_SETTINGS ignored
    19. 11-16 17:38:27.364 14312-14312/ W/Unity: Failed to get permission info for com.huawei.android.launcher.permission.WRITE_SETTINGS, manifest likely missing custom permission declaration
    20. 11-16 17:38:27.364 14312-14312/ W/Unity: Permission com.huawei.android.launcher.permission.WRITE_SETTINGS ignored
    21. 11-16 17:38:27.365 14312-14312/ W/Unity: Failed to get permission info for android.permission.READ_APP_BADGE, manifest likely missing custom permission declaration
    22. 11-16 17:38:27.365 14312-14312/ W/Unity: Permission android.permission.READ_APP_BADGE ignored
    23. 11-16 17:38:27.365 14312-14312/ W/Unity: Failed to get permission info for com.oppo.launcher.permission.READ_SETTINGS, manifest likely missing custom permission declaration
    24. 11-16 17:38:27.365 14312-14312/ W/Unity: Permission com.oppo.launcher.permission.READ_SETTINGS ignored
    25. 11-16 17:38:27.365 14312-14312/ W/Unity: Failed to get permission info for com.oppo.launcher.permission.WRITE_SETTINGS, manifest likely missing custom permission declaration
    26. 11-16 17:38:27.365 14312-14312/ W/Unity: Permission com.oppo.launcher.permission.WRITE_SETTINGS ignored
    27. 11-16 17:38:27.365 14312-14312/ W/Unity: Failed to get permission info for me.everything.badger.permission.BADGE_COUNT_READ, manifest likely missing custom permission declaration
    28. 11-16 17:38:27.365 14312-14312/ W/Unity: Permission me.everything.badger.permission.BADGE_COUNT_READ ignored
    29. 11-16 17:38:27.366 14312-14312/ W/Unity: Failed to get permission info for me.everything.badger.permission.BADGE_COUNT_WRITE, manifest likely missing custom permission declaration
    30. 11-16 17:38:27.366 14312-14312/ W/Unity: Permission me.everything.badger.permission.BADGE_COUNT_WRITE ignored
    31. 11-16 17:38:27.367 14312-14312/ W/Unity: Failed to get permission info for com.amazon.device.messaging.permission.RECEIVE, manifest likely missing custom permission declaration
    32. 11-16 17:38:27.367 14312-14312/ W/Unity: Permission com.amazon.device.messaging.permission.RECEIVE ignored
    33. 11-16 17:38:27.378 14312-14312/ D/com.playrento.deeplink.RentoUnityPlayerActivity: onCreate android.intent.action.VIEW http://playrento.com/inv/lGQQrKW8fKDwNy9IkmrqmQ==
    34. 11-16 17:38:27.378 14312-14312/ D/com.playrento.deeplink.RentoUnityPlayerActivity: onDeeplink http://playrento.com/inv/lGQQrKW8fKDwNy9IkmrqmQ==
    35. 11-16 17:38:27.381 14312-14312/ I/API: onResume()
    36. 11-16 17:38:27.382 14312-14312/ I/Unity: onResume
    37. 11-16 17:38:27.385 14312-14312/ D/InputTransport: Input channel constructed: fd=112
    38. 11-16 17:38:27.386 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: setView = DecorView@33384e5[RentoUnityPlayerActivity] touchMode=true
    39. 11-16 17:38:27.400 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: dispatchAttachedToWindow
    40. 11-16 17:38:27.410 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1920,1080] result=0x27 surface={isValid=true 480042258432} surfaceGenerationChanged=true
    41. 11-16 17:38:27.417 14312-14312/ D/SurfaceView: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1920,1080] result=0x7 surface={Surface(name=null)/@0xd8b8bba isValid=true 480042262016}
    42. 11-16 17:38:27.417 14312-15935/ D/Unity: SetWindow 0 0x6fc4bf9e10
    43. 11-16 17:38:27.417 14312-15935/ D/Unity: SetWindow 0 0x6fc4bf9e10
    44. 11-16 17:38:27.433 14312-14312/ D/SurfaceView: Relayout returned: oldFrame=[0,0][1920,1080] newFrame=[0,0][1920,1080] result=0x5 surface={Surface(name=null)/@0x4cc2b98 isValid=false 0}
    45. 11-16 17:38:31.434 14312-14312/ W/Unity: Timeout while trying detaching primary window.
    46. 11-16 17:38:31.439 14312-14312/ D/ViewRootImpl@57d3e5f[RentoUnityPlayerActivity]: Relayout returned: oldFrame=[0,0][1920,1080] newFrame=[0,0][1920,1080] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true
    47. 11-16 17:38:31.439 14312-14312/ I/Choreographer: Skipped 237 frames!  The application may be doing too much work on its main thread.
    48. 11-16 17:38:31.442 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: Relayout returned: oldFrame=[0,0][1920,1080] newFrame=[0,0][1920,1080] result=0x1 surface={isValid=true 480042258432} surfaceGenerationChanged=false
    49. 11-16 17:38:31.445 14312-14312/ D/SurfaceView: Relayout returned: oldFrame=[0,0][1920,1080] newFrame=[0,0][1920,1080] result=0x1 surface={Surface(name=null)/@0xd8b8bba isValid=true 480117405696}
    50. 11-16 17:38:31.456 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
    51. 11-16 17:38:31.456 14312-14312/ D/ViewRootImpl@a464bdc[RentoUnityPlayerActivity]: MSG_WINDOW_FOCUS_CHANGED 1
    52. 11-16 17:38:31.456 14312-14312/ I/Unity: windowFocusChanged: true
    53. 11-16 17:38:31.456 14312-15935/ D/Unity: [EGL] Attaching window :0x6fc4bf9e10
    54. 11-16 17:38:31.457 14312-15935/ E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000064
    55. 11-16 17:38:31.457 14312-15935/ E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    56. 11-16 17:38:31.457 14312-14312/ V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@4d95a6b nm : air.bg.lan.Monopoli ic=null
    57. 11-16 17:38:31.457 14312-14312/ I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
    58. 11-16 17:38:31.457 14312-15935/ E/CRASH: Build fingerprint: 'samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXU6ERF5:user/release-keys'
    59. 11-16 17:38:31.457 14312-15935/ E/CRASH: Revision: '11'
    60. 11-16 17:38:31.457 14312-15935/ E/CRASH: pid: 14312, tid: 15935, name: UnityMain  >>> air.bg.lan.Monopoli <<<
    61. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x0   0000000000000000  x1   0000007039d2c010  x2   335bed0a6da17f42  x3   0000000000000008
    62. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x4   000000000000006b  x5   0000006fcb441300  x6   335bed0a6da17f42  x7   0000007036efe0a8
    63. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x8   0000007009894a78  x9   0000000000000001  x10  0000000000004001  x11  0000000000000000
    64. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x12  0000006fff5fe0c0  x13  0000000000000080  x14  000000000000000c  x15  2e8ba2e8ba2e8ba3
    65. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x16  000000700980e1a0  x17  0000007039ccef50  x18  00000000733f3428  x19  0000000000000001
    66. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x20  0000007009939000  x21  000000700993a000  x22  0000000000000000  x23  0000000033494050
    67. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x24  00000000332518c0  x25  0000000032da1c00  x26  0000000000000001  x27  00000000333ea000
    68. 11-16 17:38:31.457 14312-15935/ E/CRASH:     x28  00000000708b4558  x29  0000006fff5fe500  x30  0000007008a5da78
    69. 11-16 17:38:31.457 14312-15935/ E/CRASH:     sp   0000006fff5fe4e0  pc   0000007008a5da78  pstate 0000000060000000
    70. 11-16 17:38:31.457 14312-15935/ E/CRASH: backtrace:
    71. 11-16 17:38:31.461 14312-14312/ D/InputTransport: Input channel constructed: fd=110
    72. 11-16 17:38:31.461 14312-14312/ D/InputTransport: Input channel destroyed: fd=96
    73. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #00  pc 00000000008601e8  /data/app/air.bg.lan.Monopoli-2/lib/arm64/libunity.so
    74. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #01  pc 000000000084c994  /data/app/air.bg.lan.Monopoli-2/lib/arm64/libunity.so
    75. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #02  pc 000000000000c6c8  /system/bin/app_process64 (InvokeUserSignalHandler+304)
    76. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #03  pc 000000000018b374  /system/lib64/libart.so (art::FaultManager::HandleFault(int, siginfo*, void*)+364)
    77. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #04  pc 00000000000004e0  [vdso] (__kernel_rt_sigreturn)
    78. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #05  pc 000000000083da78  /data/app/air.bg.lan.Monopoli-2/lib/arm64/libunity.so
    79. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #06  pc 00000000008472a4  /data/app/air.bg.lan.Monopoli-2/lib/arm64/libunity.so
    80. 11-16 17:38:31.464 14312-15935/ E/CRASH:     #07  pc 0000000001988a0c  /data/app/air.bg.lan.Monopoli-2/oat/arm64/base.odex (oatexec+2427404)
    81. 11-16 17:38:31.488 14312-15935/ E/AndroidRuntime: FATAL EXCEPTION: UnityMain
    82.                                                                      Process: air.bg.lan.Monopoli, PID: 14312
    83.                                                                      java.lang.Error: FATAL EXCEPTION [UnityMain]
    84.                                                                      Unity version     : 2018.1.1f1
    85.                                                                      Device model      : samsung SM-G920F
    86.                                                                      Device fingerprint: samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXU6ERF5:user/release-keys
    87.                                                                    
    88.                                                                      Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000064
    89.                                                                      Build fingerprint: 'samsung/zerofltexx/zeroflte:7.0/NRD90M/G920FXXU6ERF5:user/release-keys'
    90.                                                                      Revision: '11'
    91.                                                                      pid: 14312, tid: 15935, name: UnityMain  >>> air.bg.lan.Monopoli <<<
    92.                                                                          x0   0000000000000000  x1   0000007039d2c010  x2   335bed0a6da17f42  x3   0000000000000008
    93.                                                                          x4   000000000000006b  x5   0000006fcb441300  x6   335bed0a6da17f42  x7   0000007036efe0a8
    94.                                                                          x8   0000007009894a78  x9   0000000000000001  x10  0000000000004001  x11  0000000000000000
    95.                                                                          x12  0000006fff5fe0c0  x13  0000000000000080  x14  000000000000000c  x15  2e8ba2e8ba2e8ba3
    96.                                                                          x16  000000700980e1a0  x17  0000007039ccef50  x18  00000000733f3428  x19  0000000000000001
    97.                                                                          x20  0000007009939000  x21  000000700993a000  x22  0000000000000000  x23  0000000033494050
    98.                                                                          x24  00000000332518c0  x25  0000000032da1c00  x26  0000000000000001  x27  00000000333ea000
    99.                                                                          x28  00000000708b4558  x29  0000006fff5fe500  x30  0000007008a5da78
    100.                                                                          sp   0000006fff5fe4e0  pc   0000007008a5da78  pstate 0000000060000000
    101.                                                                    
    102.                                                                          at libunity.008601e8(Native Method)
    103.                                                                          at libunity.0084c994(Native Method)
    104.                                                                          at app_process64.InvokeUserSignalHandler(InvokeUserSignalHandler:304)
    105.                                                                          at libart.art::FaultManager::HandleFault(int, siginfo*, void*)(FaultManager:364)
    106.                                                                          at [vdso].__kernel_rt_sigreturn(__kernel_rt_sigreturn:0)
    107.                                                                          at libunity.0083da78(Native Method)
    108.                                                                          at libunity.008472a4(Native Method)
    109.                                                                          at base.oatexec(oatexec:2427404)
    110.  
     
    Last edited: Nov 16, 2019