angelos_lex
angelos_lex

Reputation: 1661

React Native Firebase Crashlytics Deobfuscation

I have integrated crashlytics using react-native-firebase, and i have uploaded all the required dSYMs into the console. So, the crashes are shown, but they are obfuscated and they can't be tracked down in this format.

Fatal Exception: RCTFatalException: Unhandled JS Exception: TypeError: undefined is not an object (evaluating 't.code')

This error is located at:
    in O
    in B
    in p
    in RCTView
    in Portal.Host
    in c
    in h
    in s
    in v
    in u
    in RCTView
    in RCTView
    in o
0  CoreFoundation

I had no success trying to de-obfuscate them somehow. Any ideas?

Upvotes: 4

Views: 4773

Answers (1)

Nick Moutsios
Nick Moutsios

Reputation: 86

This is a Javascript exception, and you have probably copied the raw text. If you check in the formatted text, it will look like something like this:

Unhandled JS Exception: TypeError: undefined is not an object (evaluating 't.code') This error is located at: in O in B in p in RCTView in Portal.Host ..., stack: value@1451:1379 value@1451:1558 value@1764:2262 value@1764:1616 Tl@161:77714 

This format matches the JSC (react-native) stack trace and you can use a tool like stack-beautifier to parse it in a humanly readable form. The tool also has a nice documentation of the process needed to reach a humanly readable format. In short, you will need to:

  1. Find or re-create the source maps using react-native bundle from the needed branch, again, detailed steps in the tool’s documentation on how to do this
  2. Extract the JSC stack trace into a new txt file, add new lines in the proper places (i.e. first one goes after "...stack:")
  3. Run the tool with all of the above input and you should get what you are looking for

Upvotes: 7

Related Questions