Skip to content

[Bug] Warning in Google Console when publishing an app from Visual Studio #5186

Closed

Description

@sjorsmiltenburg

Description

When I published my app to the new (beta) Google console, i got two warnings, one of them was "This App Bundle contains Java/Kotlin code, which might be obfuscated."

I found this issue that describes my situation: apache/cordova-android#1008

From what I read it seems that the publishing procedure inside visual studio needs to be updated to upload some additional file so this warning goes away.

Activity

  1. juanferrgiraldo commented on Oct 6, 2020

    @juanferrgiraldo

    I'm facing the same issue

  2. jonathanpeppers commented on Oct 6, 2020

    @jonathanpeppers
    Member

    @sjorsmiltenburg and @juanferrgiraldo for now you can ignore this warning -- the new Google Play developer console has added this new warning.

    We will look into generating the appropriate mapping.txt / proguard.map file. Thanks!

  3. dellis1972 commented on Oct 13, 2020

    @dellis1972
    Contributor

    I did some investigation on this, if you include a custom Proguard rules file which contains the following

    -printmapping mapping.txt
    
    -keepattributes SourceFile
    -keepattributes LineNumberTable
    

    then add the file to the app project and give it a ProguardConfiguration Build Action.

    This will generate the required mapping.txt file in your project root directory. I believe this is the file you need to upload to the developer console.

  4. jonathanpeppers commented on Oct 13, 2020

    @jonathanpeppers
    Member

    I guess that Xamarin.Android could make a new $(ProguardMappingFile) property that defaults to $(OutputPath)mapping.txt for Release builds:

    https://support.google.com/googleplay/android-developer/answer/6295281?hl=en

    @sjorsmiltenburg / @juanferrgiraldo can you try Dean's example for now and see if it works for your app? Thanks!

  5. andersonvieiragomeslopes commented on Oct 16, 2020

    @andersonvieiragomeslopes

    I did some investigation on this, if you include a custom Proguard rules file which contains the following

    -printmapping mapping.txt
    
    -keepattributes SourceFile
    -keepattributes LineNumberTable
    

    then add the file to the app project and give it a ProguardConfiguration Build Action.

    This will generate the required mapping.txt file in your project root directory. I believe this is the file you need to upload to the developer console.

    This worked for me, the alert disappeared when sending a new version of the app to Google Play.

  6. UdayKumar-BH commented on Oct 27, 2020

    @UdayKumar-BH

    @jonathanpeppers @dellis1972

    During the reviewing apps publication and before the google validation I noticed these 2 warnings

    This app bundle contains java/kotlin code which might be obfuscated We recommend you upload a deobfuscation file to make your crashes and ANRs easier to analyze and debug

    This App Bundle contains native code, and you've not uploaded debug symbols We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug

    I have never enabled Proguard in my app(as my app uses other third party libraries) . is it mandatory now to enable it now to get away from these warning . Please help me understand on how to fix this?

    Thanks

  7. jonathanpeppers commented on Oct 27, 2020

    @jonathanpeppers
    Member

    This app bundle contains java/kotlin code which might be obfuscated

    I think the keyword here is "might", they don't actually know if it is obfuscated or not. If you are not using AndroidLinkTool=r8 or AndroidLinkTool=proguard, you can ignore this one.

    This App Bundle contains native code, and you've not uploaded debug symbols

    Xamarin.Android includes native code, we could potentially have a way to get the symbols for it. This is also the case for AOT, as your code has been turned into native libraries (.so files).

    It seems like there is something to do here for native libraries. @grendello / @radekdoulik is there a way to generate symbol files for AOT?

  8. UdayKumar-BH commented on Oct 27, 2020

    @UdayKumar-BH

    @jonathanpeppers ,

    Thanks for your response.

    I analyzed that, my Xamarin android app is using third-party sdk app(exposed via aar + some other jar files(i pre-assume its a native code). i see Type-Mapping file is being generated in the following path in third-party sdk app release folder(third-party sdk app folder\obj\Release\type-mapping.tx which means Proguard is enabled in the third-party sdk app). However Proguard is not enabled in the main app. should this be the reason for first warning(This app bundle contains java/kotlin code which might be obfuscated).

    Should i upload this mapping file itself to solve this problem for the main app bundle?

    Thanks in advance.

    For the second warning , i will wait for @grendello /@radekdoulik's reply (to check if there's any way to generate symbol files for AOT).

  9. UdayKumar-BH commented on Oct 29, 2020

    @UdayKumar-BH

    @jonathanpeppers ,

    Could you please suggest your opinion on the above post?

    Thanks in Advance

  10. jonathanpeppers commented on Oct 29, 2020

    @jonathanpeppers
    Member

    Yes, I think it would be fine to upload type-mapping.txt if you have other third party Java/Kotlin code that you don't know if it is obfuscated.

    You could also just look inside the library to decide if it is actually obfuscated -- if it's not, you could just ignore the warning the Google Play console is giving. I think you can just drag .aar files into Android Studio to open them and inspect Java/Kotlin types.

  11. UdayKumar-BH commented on Nov 13, 2020

    @UdayKumar-BH

    @jonathanpeppers ,

    Do we have anyway to identify and extract symbol file for debug symbols for the below error from google play

    This App Bundle contains native code, and you've not uploaded debug symbols We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug

    Thanks in Advance

  12. added 2 commits that reference this issue on Nov 17, 2020
    83a8b6d
    d91b9d5
  13. mduchev commented on Mar 12, 2021

    @mduchev

    Why is this closed? I'm still observing the same warning, as well as the one mentioned above - "This App Bundle contains native code, and you've not uploaded debug symbols.". I'm using VS 16.9.1. Is there anything additionally that I need to use, since I can't find any updates on the documentation for this as well?

  14. jonathanpeppers commented on Mar 12, 2021

    @jonathanpeppers
    Member

    We solved this for Java/Kotlin code. We are tracking the same for native C/C++ code here: #5378

  15. ghost locked as resolved and limited conversation to collaborators on Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.bugComponent does not function as intended.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions