Search Unity

Error uploading proguard mapping file

Discussion in 'Android' started by theavijitsinha, Apr 26, 2021.

  1. theavijitsinha

    theavijitsinha

    Joined:
    Jul 21, 2018
    Posts:
    1
    I'm working on an android game using Unity 2019.4.25f1. I built the app bundle with minify option set to 'Proguard'. This generates a mapping file, but when I try to upload this mapping file on the google play console, I get an error saying 'Couldn't upload. Try again'

    To check whether there was some issue in the google play console site itself, I built an app using android studio and tried uploading that mapping file and it worked. So, there is some issue with the mapping file generated by Unity.

    Also, I noticed that the mapping file generated by Unity is much smaller than the one generated by Android Studio.
    This is the entirety of the mapping file generated by Unity. This seems wrong to me.
    Would really appreciate any help solving this.
     
    taeseong_park and FiveXGames like this.
  2. FiveXGames

    FiveXGames

    Joined:
    Apr 27, 2016
    Posts:
    43
    Now we are two with this problem.
     
    taeseong_park and theavijitsinha like this.
  3. InnerCoder

    InnerCoder

    Joined:
    Nov 16, 2020
    Posts:
    15
    Hi, same here.
     
    taeseong_park likes this.
  4. taeseong_park

    taeseong_park

    Joined:
    Jul 24, 2020
    Posts:
    7
    Hi, Same here!

    I am using Unity 2020.3.1f1,
    and I've successfully uploaded "Original file", "Native debug symbols" zip file.

    but I got 'Couldn't upload. Try again' when I tried to upload the mapping file.

    and I let me upload a screenshots of my "Player settings" and "Build settings".

    I've tried to clear all cache of chrome, and incognito mode of Chrome, and Safari incognito mode. but no luck.

    what is the problem of that?? please someone explain to me...

    and finally let me post the mapping file.

    Code (Boo):
    1. # compiler: R8
    2. # compiler_version: 1.6.67
    3. # min_api: 19
    4. # pg_map_id: b8138aa
    5. # common_typos_disable
    6. com.google.androidgamesdk.ChoreographerCallback$1 -> com.google.androidgamesdk.ChoreographerCallback$a:
    7. com.google.androidgamesdk.ChoreographerCallback$a -> com.google.androidgamesdk.ChoreographerCallback$b:
    8. com.google.androidgamesdk.SwappyDisplayManager$1 -> com.google.androidgamesdk.SwappyDisplayManager$a:
    9. com.google.androidgamesdk.SwappyDisplayManager$a -> com.google.androidgamesdk.SwappyDisplayManager$b:
    10.     java.util.concurrent.locks.Condition d -> c
    11.     java.util.concurrent.locks.Lock c -> b
    12.  
     
    tonycrisiony likes this.
  5. andersmarkendahl

    andersmarkendahl

    Joined:
    Mar 6, 2021
    Posts:
    14
    Hi!

    I am running with version 2020.3.13f1 (latest LTS version) and I have the same problem.
    The app I am trying to release is an Android game and the mapping file looks very similar to the one posted in this thread.


    Code (Boo):
    1. # compiler: R8
    2. # compiler_version: 1.6.67
    3. # min_api: 19
    4. # pg_map_id: b8138aa
    5. # common_typos_disable
    6. com.google.androidgamesdk.ChoreographerCallback$1 -> com.google.androidgamesdk.ChoreographerCallback$a:
    7. com.google.androidgamesdk.ChoreographerCallback$a -> com.google.androidgamesdk.ChoreographerCallback$b:
    8. com.google.androidgamesdk.SwappyDisplayManager$1 -> com.google.androidgamesdk.SwappyDisplayManager$a:
    9. com.google.androidgamesdk.SwappyDisplayManager$a -> com.google.androidgamesdk.SwappyDisplayManager$b:
    10.     java.util.concurrent.locks.Condition d -> c
    11.     java.util.concurrent.locks.Lock c -> b
    I get an inbox message in Google Play Console stating:
    I tried re-upload using the App Bundle explorer, but same negative result.
    My settings for generating the mapping file is:
    Code (CSharp):
    1. PlayerSettings.Android.minifyRelease = true;
    2. PlayerSettings.Android.minifyWithR8 = true;
    Is the ReTrace file corrupt in some way?
     
  6. andersmarkendahl

    andersmarkendahl

    Joined:
    Mar 6, 2021
    Posts:
    14
    Update from me.

    If I did not minify using R8, the upload worked for me.
    The mapping file then looked like a real mapping file, 1000 lines long and contained function and variables mappings.
     
    theavijitsinha and taeseong_park like this.
  7. taeseong_park

    taeseong_park

    Joined:
    Jul 24, 2020
    Posts:
    7
    @andersmarkendahl Oh your solution worked for me as well!

    I unchecked "Use R8" option on Minify section in Player Settings and build,

    and then when I upload aab file in App Bundle Explorer, mapping.txt file is automatically uploaded without uploading mapping text file manually.

    Thank you for sharing!
     

    Attached Files:

    andersmarkendahl likes this.
  8. andersmarkendahl

    andersmarkendahl

    Joined:
    Mar 6, 2021
    Posts:
    14
    Yes I also noticed that the mapping file is packed in the AAB, which is great. I will be running this way from now on.

    Strange though that R8 does not work, it being Googles replacement for the ProGuard compiler. So Unity must be doing something wrong here. I have reported this bug to the Unity team and will post again here if I manage to get an answer.

    Cheers!
     
  9. WilderMedeiros

    WilderMedeiros

    Joined:
    Nov 28, 2017
    Posts:
    3
    See about Minify on the docs:
    https://docs.unity3d.com/Manual/class-PlayerSettingsAndroid.html#Publishing

    "In most cases, it’s good practice to only apply minification to release builds, and not debug builds. This is because minification takes time, and can make the builds slower. It can also make debugging more complicated due to the optimisation that the code undergoes."