Search Unity

Feature Request: Cloud Diagnostics Obfuscation Support

Discussion in 'Unity Cloud Diagnostics' started by matt_mp, May 28, 2019.

  1. matt_mp

    matt_mp

    Joined:
    Sep 6, 2018
    Posts:
    1
    After contacting support I was pointed to the forums to make a feature request.

    Would it be possible to add support for code obfuscation to cloud diagnostics?

    This would be the ability to automatically translate obfuscated code seen in reported exceptions and crashes back to readable method names with a translation file provided after building the project.

    An example of this is with this asset https://assetstore.unity.com/packages/tools/utilities/obfuscator-48919
    Code is obfuscated with random method names and a translation file is produced so that the randomised method names can be translated back their original names.

    Thanks!
     
    BAIZOR, michal-gs and Novack like this.
  2. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    Could be highly useful to have something like this, although some common ground with obfuscation methods should be considered first.
     
  3. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @matt_mp, @Novack, and @michal-gs! Thanks for your interest in this feature! I'd like to bring in @SidM1 to help go over what your main reasons would be for a feature like this. Is it mainly for additional security of your code?
     
    Novack likes this.
  4. michal-gs

    michal-gs

    Joined:
    Aug 8, 2019
    Posts:
    3
    Thanks for responding @ryanc-unity. The main reason is security and IP protection. I'm working on a codebase where builds get obfuscated and a dictionary map is provided as part of the build. Being able to provide such a dictionary to deobfuscate stacktraces in cloud diagnostics would really help. At the very least being able to have an integration with an external webhook would be enough, but currently only the first line of the stacktrace is provided in the request. Right now we have to do this manually.
     
  5. SidM1

    SidM1

    Unity Technologies

    Joined:
    Jul 22, 2019
    Posts:
    5
    Thanks for the elaboration, @michal-gs. Just for clarification: are these builds done on Cloud Build or are they local
     
  6. michal-gs

    michal-gs

    Joined:
    Aug 8, 2019
    Posts:
    3
    They are local builds @SidM1.
     
    SidM1 likes this.
  7. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    844
    @ryanc-unity and @SidM1 thanks a ton for the interest. I'll summarize our case.

    We use code obfuscation on our builds to help us deal with cheats and unconsented copies ("hacked mods"). We use IL2CPP but we found the hard way, that we need obfuscation.

    We use Unity Cloud Build for all our builds (our project deploys WebGL and Android), and we have production builds with obfuscation enabled, and QA builds with obfuscation disabled for easier issue tracking.

    When it comes to production releases, the obfuscation is a pita in regards to bug tracking: logs and stacktraces need to be "translated" using a table of the renamed class/method/etc. As @michal-gs has pointed out, being able to provide a translation table to Diagnostics to do the change for us, would be a game changer. I also agree that having a webhook would be acceptable, though the ideal remains on Cloud Diagnostic making it transparent for us.

    Finally I'd like to mention something that may help, Beebyte's Obfuscator is the goto solution in Unity for this matter.

    Thanks again.
     
    Last edited: Aug 20, 2019
    michal-gs likes this.
  8. SidM1

    SidM1

    Unity Technologies

    Joined:
    Jul 22, 2019
    Posts:
    5
    This is good information, @Novack ! Thank you!
     
    Novack likes this.
  9. SidM1

    SidM1

    Unity Technologies

    Joined:
    Jul 22, 2019
    Posts:
    5
    @matt_mp , @michal-gs , and @Novack - can you let us know if you're independent developers and/or are part of a studio? (For reference purposes as we formally record this feature request internally at our end). You may DM me with this information as well instead of responding here, as you prefer.
     
    Novack likes this.
  10. michal-gs

    michal-gs

    Joined:
    Aug 8, 2019
    Posts:
    3
    I'm in a very similar situation to @Novack. The only difference is that we run builds locally at the moment. Also agree with the other points raised.
     
    SidM1 and Novack like this.
  11. SidM1

    SidM1

    Unity Technologies

    Joined:
    Jul 22, 2019
    Posts:
    5
  12. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    any news on this? We are on the same situation than @Novack.
    I guess there's no intention on adding this feature ?
    What did you guys ended up doing If may I ask?
    Thanks!
     
  13. mdsitton

    mdsitton

    Joined:
    Jan 27, 2018
    Posts:
    66
    Also interested in this feature, this would be an amazing upgrade
     
  14. BAIZOR

    BAIZOR

    Joined:
    Jul 4, 2013
    Posts:
    112
    Also interested, any news?
     
    muscly_at_seconddive likes this.