Flutter: How to deobfuscate a stack trace?

592

Solution 1

Symbols are generated while building the apk/bundle so you could check there.

flutter build apk --obfuscate --split-debug-info=/<project-name>/<directory>

Solution 2

Firstly for obfuscation you need to run this command - > 
flutter build apk --obfuscate --split-debug-info=/<project-name>/<directory>
https://docs.flutter.dev/deployment/obfuscate

With this command the symbol files will be generated in the path which you have mentioned in the obfuscated command,
Then Create a txt file in your project and copy the obfuscated stacktrace in that file..

then follow this -> https://github.com/FirebaseExtended/flutterfire/issues/2644 , Which says Remove (.java) and add 4 spaces
Then Run this command - > 
flutter symbolize -i <stack trace file> -d /out/android/app.android-arm64.symbols
Share:
592
Arnav
Author by

Arnav

Flutter developer

Updated on December 29, 2022

Comments

  • Arnav
    Arnav over 1 year

    I am trying to deobfuscate a flutter stack trace using the command, where err.txt is my stack trace file -

    flutter symbolize -i err.txt -d /out/android/app.android-arm64.symbols
    

    However, on running I get an error, I require a file called app.android-arm64.symbols to deobfuscate my stack trace but I don't know where to find this file, as this isn't mentioned clearly in the Flutter documentation. This is the error I get:

     /out/android/app.android-arm64.symbols does not exist
    

    Can someone help me out on how to do this?

    • user207421
      user207421 almost 3 years
      You can't 'deobfuscate' using something that doesn't exist.
    • Arnav
      Arnav almost 3 years
      @user207421 I've updated my question to be more precise as to what I need help with.