Search Unity

Android cloud build breaks, local build fine

Discussion in 'Unity Build Automation' started by hessel_mm, Nov 3, 2015.

  1. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    When I build my project on cloud build, the Android build builds without errors. But when this build is installed and run, it hangs after the splash screen and adb spews loads of "W/linker" errors (I've replaced the bundle id with ****BUNDLEID****):

    Code (csharp):
    1. --------- beginning of /dev/log/main
    2. W/HwLauncher(  899): Launcher.MotionManager failed to stop TYPE_SHAKE_REARRAGE_WIDGETS
    3. I/ActivityManager(  597): Displayed ****BUNDLEID****/com.unity3d.player.UnityPlayerActivity
    4. : +261ms
    5. I/CpuGovernorPolicy(  842): cpu draw
    6. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/mscorl
    7. ib.dll.so" not found
    8. W/linker  (17929): error:
    9. W/linker  (17929): library "libmaliinstr.so" not found
    10. W/linker  (17929): error:
    11. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    12. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    13. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    14. W/libc    (17929): pthread_create sched_setscheduler call failed: Operation not permitted
    15. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    16. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    17. W/audio_hw_primary(  288): adev_set_parameters: unknown kvpairs: output_device=2
    18. W/audio_hw_primary(  288): out_set_parameters : unknown parameter close_pa=false
    19. E/audio_hw_primary(  288): Unable to open /proc/apcm/status
    20. I/Audio_Tuning_Tool(  288): set_output_values: outdevices = 0002
    21. I/Audio_Tuning_Tool(  288): set_analog_volume: index = 0
    22. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/UnityE
    23. ngine.dll.so" not found
    24. W/linker  (17929): error:
    25. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/Assemb
    26. ly-CSharp-firstpass.dll.so" not found
    27. W/linker  (17929): error:
    28. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/Assemb
    29. ly-CSharp.dll.so" not found
    30. W/linker  (17929): error:
    31. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/UnityE
    32. ngine.Analytics.dll.so" not found
    33. W/linker  (17929): error:
    34. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/UnityE
    35. ngine.Networking.dll.so" not found
    36. W/linker  (17929): error:
    37. I/tfa9887_hal(  288): [tfa9887_run] in tfa9887_run g_tfa9887_state = 0 g_audio_sence = 0,sence= 0
    38. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/UnityE
    39. ngine.UI.dll.so" not found
    40. W/linker  (17929): error:
    41. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/UnityE
    42. ngine.CloudBuild.dll.so" not found
    43. W/linker  (17929): error:
    44. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/DOTwee
    45. n.dll.so" not found
    46. W/linker  (17929): error:
    47. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/DOTwee
    48. n43.dll.so" not found
    49. W/linker  (17929): error:
    50. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/DOTwee
    51. n46.dll.so" not found
    52. W/linker  (17929): error:
    53. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/DOTwee
    54. n50.dll.so" not found
    55. W/linker  (17929): error:
    56. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/P31Res
    57. tKit.dll.so" not found
    58. W/linker  (17929): error:
    59. I/tfa9887_hal(  288): [tfa9887_run] using with sample_rate = 48000, port = 1, str_sence = music
    60. I/tfa9887_hal(  288): [enable_ec]Disable ec
    61. I/Audio_Tuning_Tool(  288): set_output_values: outdevices = 0002
    62. I/Audio_Tuning_Tool(  288): set_analog_volume: index = 0
    63. I/audio_hw_primary(  288): start_audio_algo : active_input is null
    64. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/System
    65. .Core.dll.so" not found
    66. W/linker  (17929): error:
    67. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/System
    68. .Core.dll.so" not found
    69. W/linker  (17929): error:
    70. W/linker  (17929): library "/data/app/****BUNDLEID****-2.apk/assets/bin/Data/Managed/System
    71. .dll.so" not found
    72. ...
    The weird thing is that some of the logs and errors after that seem to be referring to existing scripts (but the filename is unknown), meaning that some Debug.Log messages come trough. You even see a part of the assets from the app...

    It is as if half the app is loaded and the other half is missing. Which sounds like it has something to do with the Split Application Binary option (which is turned on), maybe?

    For clarity: the build runs fine when I build locally. And the cloud builds used to run fine a couple of days ago.
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    I'm also seeing an issue similar if not the same. Very recently, Cloud Build was making working android builds. Now the android app hangs at the splash screen. Making a build locally has no issues.

    Update: Cloud build has just made a working build. I literally changed nothing. Exact same repo state, exact same settings. No idea what caused the problem, and I have no idea if it's going to continue happening in the future. o_O

    Update: Local build just got stuck at the loading screen. Still trying to locate the source of the problem.

    Update: My problem was stemming from an internal race condition during initialization which seemed to change results on a per-build basis. One build would launch every time, one build would crash every time. Very strange, but I've resolved my issue, which is likely a different issue than the OP is experiencing.
     
    Last edited: Nov 3, 2015
  3. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    Update: the same issue suddenly occurred on a different machine. Reimporting all assets seemed to fixed the issue (it was missing references to scripts all of a sudden, so I guess the library got corrupted somehow).

    So I disabled the caching of the library folder and tried again, no results yet but I have high hopes.

    I was wondering though, the "Start clean builds" option does that clear the Library too? And, why is there no clean build per platform option?
     
  4. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    If your library is possibly corrupted, you may want to try using "reimport all assets" option when you rightclick on an asset in the editor to rebuild it. It's time consuming and potentially problematic depending on your setup, but can sometime eradicate errors due to corrupted assets or inconsistencies in the library. Make sure your current project state is backed up before doing that of course, just in case it somehow makes it worse.
     
  5. hessel_mm

    hessel_mm

    Joined:
    Mar 12, 2014
    Posts:
    44
    Yes, I know that Reimporting all assets works, but I am referring to the cloud builds. I usually have the cache library option turned on, but I assume there is a quick way to clean it (i.e. Reimport all) and build.
     
  6. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    332
    Hey @hessel_mm
    Cloud build has a "Clean Build All" option in the drop down of the "Start New Builds" button. This purges the cached library in Unity Cloud Build and reimport all assets before starting the build.
     
    PDZ likes this.