Search Unity

App does crash when installing the App via APK

Discussion in 'Android' started by SomehowLuke, Aug 21, 2019.

  1. SomehowLuke

    SomehowLuke

    Joined:
    Nov 11, 2015
    Posts:
    34
    Hello, I am having a wired problem with my app.

    When I am using IL2CPP instead of Mono, which is required to publish with Google Play Store (ARM64) my app crashes on clean install:

    - Delete previous build from device
    - Delete all old cache data and app data
    - Or I use a clean phone that never had the app installed before

    I do the App-Install via

    - Build an Run
    - or manually via APK

    (Does not matter if Dev-Build or Release-Build)

    Once the App ist installed I run the App and get follwoing log:

    Code (CSharp):
    1.  
    2. 2019-08-21 16:16:42.766 5752-8635/? D/MdnieScenarioControlService:  packageName : com.Company.App    className : com.unity3d.player.UnityPlayerActivity
    3. 2019-08-21 16:16:43.450 32688-32708/com.Company.App D/Unity: Remaining time:8s
    4. 2019-08-21 16:16:44.495 32688-32708/com.Company.App D/Unity: Remaining time:7s
    5. 2019-08-21 16:16:45.539 32688-32708/com.Company.App D/Unity: Remaining time:6s
    6. 2019-08-21 16:16:46.582 32688-32708/com.Company.App D/Unity: Remaining time:5s
    7. 2019-08-21 16:16:47.614 32688-32708/com.Company.App D/Unity: Remaining time:4s
    8. 2019-08-21 16:16:48.652 32688-32708/com.Company.App D/Unity: Remaining time:3s
    9. 2019-08-21 16:16:49.693 32688-32708/com.Company.App D/Unity: Remaining time:2s
    10. 2019-08-21 16:16:50.737 32688-32708/com.Company.App D/Unity: Remaining time:1s
    11. 2019-08-21 16:16:51.783 32688-32708/com.Company.App D/Unity: Remaining time:0s
    12. 2019-08-21 16:16:52.460 32688-32708/com.Company.App D/Unity: Timed out. Continuing without host connection.
    13. 2019-08-21 16:16:52.460 32688-32708/com.Company.App D/Unity: Started listening to [0.0.0.0:55060]
    14. 2019-08-21 16:16:52.460 32688-32708/com.Company.App D/Unity: Starting managed debugger on port 56534
    15.  
    16. 2019-08-21 16:16:52.489 32688-32708/com.Company.App E/CRASH: pid: 32688, tid: 32708, name: UnityMain  >>> com.Company.App <<<
    17.  
    18. 2019-08-21 16:16:52.499 5217-5217/? E/audit: type=1701 audit(1566397012.493:1931): auid=4294967295 uid=10336 gid=10336 ses=4294967295 subj=u:r:untrusted_app:s0:c80,c257,c512,c768 pid=32688 comm="UnityMain" exe="/system/bin/app_process64" sig=11 res=1
    19. 2019-08-21 16:16:52.568 5752-7690/? W/InputDispatcher: channel 'ae736bb com.Company.App/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9, fd=577
    20. 2019-08-21 16:16:52.568 5752-7690/? E/InputDispatcher: channel 'ae736bb com.Company.App/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    21.  
    22. 2019-08-21 16:16:52.651 5752-5784/? E/WindowManager: RemoteException occurs on reporting focusChanged, w=Window{ae736bb u0 com.Company.App/com.unity3d.player.UnityPlayerActivity}
    23.     android.os.DeadObjectException
    24.         at android.os.BinderProxy.transactNative(Native Method)
    25.         at android.os.BinderProxy.transact(Binder.java:1140)
    26.         at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:500)
    27.         at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3894)
    28.         at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5472)
    29.         at android.os.Handler.dispatchMessage(Handler.java:106)
    30.         at android.os.Looper.loop(Looper.java:214)
    31.         at android.os.HandlerThread.run(HandlerThread.java:65)
    32.         at com.android.server.ServiceThread.run(ServiceThread.java:44)
    But if I go to "App-Info" on my Android Device and delete all regarding "app data", the app runs perfectly.
    So something must go wrong during installation of the app and creating the first data before starting the app.

    Do you have any ideas how that could be?

    Thanks and best regards!
     
    Last edited: Aug 21, 2019
  2. SomehowLuke

    SomehowLuke

    Joined:
    Nov 11, 2015
    Posts:
    34
    After some more reserach I found following additional log:

    Code (CSharp):
    1.  
    2. 2019-08-21 19:23:38.917 11163-11206/com.Company.App A/libc: C:\Program Files\Unity\Hub\Editor\2019.2.1f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp:1013: static Il2CppClass *il2cpp::vm::MetadataCache::GetTypeInfoFromTypeDefinitionIndex(TypeDefinitionIndex): assertion "index >= 0 && static_cast<uint32_t>(index) < s_GlobalMetadataHeader->typeDefinitionsCount / sizeof(Il2CppTypeDefinition)" failed
    3. 2019-08-21 19:23:38.918 11163-11206/com.Company.App E/CRASH: pid: 11163, tid: 11206, name: UnityMain  >>> com.Company.App <<<
    4.  
     
  3. unity_aE5NuH9Slo3aQw

    unity_aE5NuH9Slo3aQw

    Joined:
    Jul 23, 2019
    Posts:
    1
    Getting the same error log.
    Any idea?
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,736
    Does the same error occur, if you change the bundle identifier for your app?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you actually name your package com.Company.App ?
     
  6. dayjur

    dayjur

    Joined:
    Sep 6, 2014
    Posts:
    128
    if you change the bundle id error does not occur
     
  7. unity_9460FB1EA99EC1823D00

    unity_9460FB1EA99EC1823D00

    Joined:
    Aug 3, 2021
    Posts:
    12
    @JeffDUnity3D i am also facing the same problem in unity 2019.4.16f. image_2021_08_09T07_42_09_557Z.png