Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug "Unable to Initialize Unity Engine' and "Not enough space to Install required resources"

Discussion in 'Android' started by Rassalom, Dec 9, 2021.

  1. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    Since Google Play demands aab format for builds from November 1, 2021, I believe that a lot of developers have these issues from the title.

    From our experience, it happens because of the build size. If your build is > 150 MB, critical amount of your players (~ 10%) won't be able to start the game from time to time.
    It's a huge issue when you fight for even 0,1% of retention rate to have such a thing in production. But starting from the November, you have no choice.

    We have waited for a month and keepped and eye on the issue in issuetracker here:
    https://issuetracker.unity3d.com/is...ding-app-bundle-with-split-application-binary

    I strongly disagree that the bug is 'fixed' in the versions. And even the resolution note is 'Might still be reproducible on some devices'. Yes, exactly. This is how the bug works. Some devices can't launch the game. How exactly the bug is fixed in this case?

    As an example of the game that have these issues in production right now, you can check Cookie Run: Kingdom and read reviews of the players. The problem is huge, the bug isn't fixed and we have no information when it will be fixed at all.

    Could anyone be so kind and tell us what's going on with these bugs? Will it be ever fixed or from now on this is the way how games made on Unity work?

    Thank you.
     
    Last edited: Dec 10, 2021
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    You probably mean about this specific issue, but it has always been the case with Unity that there are often showstopper issues that creep into Unity and then stay there a while (years?).

    The amount of these issues and time it takes to fix them are inversely related to the popularity / profitability of the platform and directly related to the platform's complexity.

    For example, tvOS had its controller support broken for many months on LTS. It's probably a simple platform, but it's not very popular.

    Android unfortunately is probably one of the most complex platforms, because of the OS, hardware and driver variety. It's also not top tier profitability wise, so with those two combined it seems the probability for long standing issues is high.

    But even then, I feel like Unity have been dragging their feet with Android for a while. Stuff like permissions, they refused to provide a solution for years (there was one package one solo Unity developer did on his own volition) and even now for this aab implementation, it arrived literally last second (it should be bullet proof by now) and after a lot of pressure.

    I guess what I'm trying to say is: I don't know if this bug is the new reality when publishing on Android with Unity, but be prepared that it may be, at least for a while, and that there is a big possibility more issues like it will pop up as you update to newer Unity versions, even if you stay on LTS.
     
    Rassalom likes this.
  3. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    The irony is that until yesterday a fix for this bug was planned for the LTS 2019.x version. And today this line was simply removed from the issuetracker.
     
    Last edited: Dec 10, 2021
    AcidArrow likes this.
  4. Cixelyn

    Cixelyn

    Joined:
    Jun 27, 2014
    Posts:
    7
    Chiming to +1 the issue.
    Our migration to AAB has been filled with nothing except pain and "Unable to Initialize Unity Engine" dialog boxes.

    One would imagine that the official Google Devices would work the best (We have Pixel 3 / 4a test devices), but strangely it's the Google phones that reproduce most consistently.

    From what I can gather, there's some subtle race condition causing massive issues between the initial startup of the Unity Virtual File system and Android's new bundling methods.

    We've been tracking case 1361885 (Scenes can't be loaded when building AAB with Split Binary) which looks related as well.

    Also what's more confusing is that 1372558 was marked as fixed in 2020.3.22f1, but it's still listed as a known issue in the most recent 2020.3.24f1 changelog.
     
    Last edited: Dec 10, 2021
  5. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    This is the best part. The bug wasn't fixed, but we thought that at least it's in known issues and will be fixed later. Now it's Schrodinger's bug: fixed and not-fixed at the same time...

    Same here.

    We rolled an update on 10% of our audience in the end of October. Xiaomi, Samsung, OnePlus and Pixel phones in most cases have the issues.
    The compression method doesn't change anything at all.

    We have tried to use PAD with fast-follow resources. It helps but creates a lot more bugs. Game can't be launched and stuck on logo, enviroment can't be loaded and etc.
    Also using flexible delivery mode has no sense for us in general. It was just an axperiment.
     
  6. Shisha_HWGuy

    Shisha_HWGuy

    Joined:
    Oct 19, 2021
    Posts:
    3
    +1 to the topic starter. Issue is quite important for us also.
     
    Rassalom likes this.
  7. androleocez

    androleocez

    Joined:
    Jan 12, 2013
    Posts:
    15
    @Unity Please, fix this bug immediately!
     
    Letin and Rassalom like this.
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,956
    Hi,

    there was an error from QA, https://issuetracker.unity3d.com/is...ding-app-bundle-with-split-application-binary was not reproducible and there was no fix, yet it was mistakenly Resolved as fixed. I asked QA to change the resolution status to Not Reproducible, to not mislead people.

    We're still missing a proper repro, but there's a good chance this different bug report https://issuetracker.unity3d.com/is...ab-file-with-split-application-binary-enabled will have a fix, which should fix the problem above.

    In any case, if you can reproduce the issue, we would love to look it, if you can, please submit a bug with repro project attached.

    Cheers
     
    Rassalom, AcidArrow and Cixelyn like this.
  9. Cixelyn

    Cixelyn

    Joined:
    Jun 27, 2014
    Posts:
    7
    Thanks for the update @Tomas1856 !

    Our team internally spent several days trying to make a clean reproduction project, and it's such a pain. The bug only seems to arise in projects of non-trivial complexity -- (e.g. shipping games or games about to ship). And what's worse is that since the issue is so non-deterministic (e.g. 1 out of 10 times on a fresh install on specific devices), figuring out whether a given build exhibits the issue or not is a huge slog.

    Normally I'd offer our entire project as a repro case, but it's unfortunately it's a Unity-as-a-Library project with nontrivial build steps which might complicated things significantly. @Rassalom , any chance you have a pure Unity project that you could share with them?
     
    Energy0124 likes this.
  10. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    We have a pure Unity project but it's 22GB and 5 years of work there. I can't share it due to NDA and my responsibility for the company I work on.

    @Tomas1856 May I suggest my help with reproducing it with the project you already have?
    https://issuetracker.unity3d.com/is...-application-binary-net-4-dot-x-api-and-arm64

    I have OnePlus 8T and from my experience I have this issue at least 1 out of 5 laucnhes. Sometimes it's worse and I have these issues 10 times in a row. This is the highest frequency from all of our test devices.

    I think if I repeat it with the build from the bug above, you just will need to get the same device.
     
  11. Alexandr_Bashkirev

    Alexandr_Bashkirev

    Joined:
    Dec 13, 2021
    Posts:
    1
    Hi

    We have sent repro project on 24th of November. I can’t share it here, because it is still in internal state. I hope you can find it via it’s name “Unable to initialize the Unity Engine” in builds published as .aab to play store

    Regards
     
    Cixelyn and Rassalom like this.
  12. ppopejoy

    ppopejoy

    Joined:
    Sep 25, 2013
    Posts:
    1
    +1.

    We are also getting this same issue. Most commonly on the Pixel 4 family of devices.
     
    Rassalom likes this.
  13. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    983
    We're affected by this. Not great.
     
    Rassalom likes this.
  14. hba_infinity

    hba_infinity

    Joined:
    May 30, 2016
    Posts:
    49
    I can confirm that we are also getting both the Unable to Initialize and out of storage space errors on our game after implementing Play Asset Delivery files into the game on Unity 2020.3.18f1. Before this, we were using AAB files without using PAD, and none of these issues were showing up for our players, meaning that it is most likely the PAD implementation which is causing issues. We have been able to reproduce it occasionally using Bundletool and installing the .AAB file directly onto the device, but generating a universal APK from the AAB and installing that onto the device doesn't have this issue.
     
    AlkisFortuneFish and Rassalom like this.
  15. sebastiaosantos

    sebastiaosantos

    Joined:
    Nov 18, 2015
    Posts:
    1
    In version 2020.3.25f1 the issue "Android: 'Not enough storage space to install required resources' error when building App Bundle with Split Application Binary" has been removed from the list of known issues but it is still happening. Any predictions for when they will fix this problem?
     
    Rassalom likes this.
  16. pokruchin

    pokruchin

    Joined:
    Apr 24, 2019
    Posts:
    38
    +1 on this one. We have 2019.4.32f1 and roughly 15% of all our users face the screen "Error initialize Unity Engine". It's quite a lot. Unity team, we really need some solution or workaround for this one. It's a critical issue really.
     
    Rassalom likes this.
  17. votagus

    votagus

    Joined:
    Dec 13, 2016
    Posts:
    17
    We had to do some extra optimizations with the resources to go under 150mb, we are waiting for this fix.
     
    Rassalom likes this.
  18. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    @Tomas1856 any news about this issue so far?...
     
  19. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,956
    From what I can tell, the fix landed in these versions:
    * 2019.4.35
    * 2021.2.8
    * 2020.3.26
     
  20. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    Thanks a lot for the information! This is really good news :) Is it possible that we will these versions till the end of this year?
     
  21. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,956
    Sadly, I don't think it will be available this year, seeing most of the staff is away due holidays.
     
  22. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    Anyway, it's good to know that the bug will be fixed. Thank you for your help! We really appreciate it :)
     
  23. pokruchin

    pokruchin

    Joined:
    Apr 24, 2019
    Posts:
    38
    Great news! Thank you.
     
  24. pf_ana

    pf_ana

    Joined:
    Sep 12, 2021
    Posts:
    9
    Hi, I'm from another thread for AAB and PAD issue too.
    "Unable to Initialize Unity Engine", I don't fix this but make this issue appear less.
    From the doc about PAD, the resource and StreamingAssets build in one asset pack.
    so I make the SteamingAsset to a single pack by rename the folder SteamingAssets to SteamingAssets.androidpack and add a gradle file.
    Ref here https://docs.unity3d.com/Manual/play-asset-delivery.html#generated-asset-packs
    section : Custom asset packs
    The issue still happen, but less.
    And update the google playcore, they fixed some error for fast-follow mode.
     
    Rassalom likes this.
  25. Shisha_HWGuy

    Shisha_HWGuy

    Joined:
    Oct 19, 2021
    Posts:
    3
    It looks like the fix is delivered to 2020.3.26f1. We will test it on our project.
     
  26. Rassalom

    Rassalom

    Joined:
    Feb 29, 2016
    Posts:
    17
    We are updating the game right now. I will report if there will be the issue reports from our users.
     
    rk_rathod likes this.
  27. Shisha_HWGuy

    Shisha_HWGuy

    Joined:
    Oct 19, 2021
    Posts:
    3
    Our internal tests show that we can't reproduce the issue anymore. We were able to do it before on regular basis.
     
  28. Cixelyn

    Cixelyn

    Joined:
    Jun 27, 2014
    Posts:
    7
    We're in the middle of updating our project to 2020.3.26f1 as well. Will ping back in this thread if we get any user reports of crashing.
     
  29. votagus

    votagus

    Joined:
    Dec 13, 2016
    Posts:
    17
    It seems to be fixed on our project too.
     
  30. FrasloNL

    FrasloNL

    Joined:
    Apr 7, 2017
    Posts:
    5
    Is there any ETA on the 2019.4.35 release? I would really like to update my game to get rid of this issue. The 2020/2021 versions where already released 11 days ago.
     
  31. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,956
    According to internal schedule, it should be out this week.
     
    FrasloNL and AlkisFortuneFish like this.
  32. FrasloNL

    FrasloNL

    Joined:
    Apr 7, 2017
    Posts:
    5
    Thank you for the fast answer Tomas! Also good to hear that it will be released soon, looking forward to it.
     
  33. shahros

    shahros

    Joined:
    Jun 18, 2017
    Posts:
    1
    Hi there,
    We have been using unity 2020.3.22f1 for our game but facing this certain issue can anyone confirm which unity version is working fine for this.
    Thanks
     
  34. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    397
    Rassalom likes this.
  35. sonnguyen9800

    sonnguyen9800

    Joined:
    Dec 9, 2020
    Posts:
    8
    Hello, we are using Unity 2020.3.34 (LTS) and currently facing this issue on Vivo 1906 (Android 11); and Realme C11 (2021, Android 11).

    Anyone still having similar bugs? Should we update Unity version to 2021?
     
  36. observer99

    observer99

    Joined:
    Jun 18, 2022
    Posts:
    2
    I am still getting error : "Unable to Initialize Unity Engine"
    In local build there is no error but, When build on UCB I see error on Play Console pre-launch report screenshoots

    And Universal APK which generated by play console is running correctly


    Tried 2020.3.26 - 2020.3.27 - 2020.3.35

    I may be set UCB or PreExportMethod setting incorrectly, Hope someone can share UCB setting or player settings
     
    Last edited: Jul 6, 2022
    giperwlad and sonnguyen9800 like this.
  37. giperwlad

    giperwlad

    Joined:
    Dec 9, 2022
    Posts:
    1
    Hi, were you able to fix the problem? I have the same error - unity 2020.3.42f1
     
    iivanovazur likes this.
  38. rk_rathod

    rk_rathod

    Joined:
    Feb 2, 2020
    Posts:
    3
    Do you get this issue after updating the unity version? your answer is important to us.
     
  39. loki-void

    loki-void

    Joined:
    Apr 16, 2013
    Posts:
    11
    Still getting this error on Unity 2021.3.26.f1 on dev build on device Samsung A13 with apk size 2.268 Gb
    On Poco X3 works fine
    not dev AAB Build works fine
    The apk archive contains human readable assets/bin/Data/unity_app_guid file and assets/bin/Data/Managed folder looks as usual


    2023.08.16 12:29:08.683 25511 25606 Debug Unity [VFS] Mount /data/app/~~F7JHgOynPREwXG13glVvMA==/com.gamedevltd.modernstrike-HdjLLOCROTyBhLB06HYh-g==/base.apk
    2023.08.16 12:29:08.722 25511 25606 Info Unity SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 8, Memory = 3691mb
    2023.08.16 12:29:08.722 25511 25606 Info Unity SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc0), 6 little (mask: 0x3f)
    2023.08.16 12:29:08.722 25511 25606 Info Unity ApplicationInfo com.gamedevltd.modernstrike version 1.58.0
    2023.08.16 12:29:08.722 25511 25606 Info Unity Built from '2021.3/staging' branch, Version '2021.3.26f1 (a16dc32e0ff2)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'armeabi-v7a', Stripping 'Enabled'
    2023.08.16 12:29:08.729 25511 25606 Error Unity Failed to read assets/bin/Data/unity_app_guid
    2023.08.16 12:29:08.729 25511 25606 Debug Unity Extracting il2cpp resources.
    2023.08.16 12:29:08.729 25511 25606 Debug Unity il2cpp failed to extract resources (assets/bin/Data/Managed => /storage/emulated/0/Android/data/com.gamedevltd.modernstrike/files/il2cpp)
    2023.08.16 12:29:08.730 25511 25606 Debug Unity [Wait for debugger to attach] Also use Volume Up or Down button to confirm...
    2023.08.16 12:29:08.920 25511 25511 Info Unity windowFocusChanged: false
     
    Last edited: Aug 17, 2023