Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle legacy crash logs and use proper architecture in symbolicate.js #621

Merged
merged 7 commits into from
Jul 1, 2022

Conversation

ayoy
Copy link
Collaborator

@ayoy ayoy commented Jun 21, 2022

Task/Issue URL: https://app.asana.com/0/0/1202475379856923/f

Description:
I updated symbolicate.js to:

  • specify crash log architecture while looking up symbols in the dSYM file
  • handle old crash log format in addition to IPS
  • fix symbolicating IPS crash logs that contain Application-Specific Backtrace (previously the script wouldn't symbolicate symbols outside of asiBacktraces)
  • recognize IPS crash format based on file content, not extension (to handle crashlogs downloaded from Asana more seamlessly) – after symbolication, an IPS file is renamed from .crash if needed
  • the script does not require the app binary to be present anymore (it only uses the dSYM file)

Steps to test this PR:

  1. Download some valid crash reports from Asana (i.e. displaying correct app version), put them in the directory, e.g. scripts/symbolicate/crashes.
  2. Download dSYM files from Asana and put them in scripts/symbolicate/binaries according to scripts/symbolicate/binaries/README.md (see screenshot).
  3. Change directory to scripts/symbolicate and run the script: ./symbolicate.js crashes.
  4. Verify that crash logs are symbolicated and IPS files have .ips extension.

Screenshot 2022-06-21 at 09 41 51


Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this works great when you've got a complete crash report.

I initially tried with a crash report where the app was killed due to Code Signature Invalid, and for that report the list of images used was incomplete and didn't have the correct names. The script of course failed in that case - but I don't know what else we can do with crashes like that.

If we were to go further down this road, I would suggest using Git LFS so that we can store dSYM files there and make it easier on us to pull these down automatically – but since we have the chance of moving to automatic symbolication using our own remote instance, I don't think it's worth thinking about for now.

@samsymons samsymons assigned ayoy and unassigned samsymons Jul 1, 2022
@ayoy
Copy link
Collaborator Author

ayoy commented Jul 1, 2022

Thanks @samsymons! That's right, the error handling could be improved, but as it's only a semi-automatic tool for now (needs crashlogs to be downloaded manually before symbolication) I'm solving it by just not downloading "broken" crash reports :) Agreed that Git LFS would do the job (or even uploading dsyms to GitHub releases!). I'm still mentally in the closed-source software world and I haven't thought about it, but in fact our debug symbols will eventually not be a secret :)

@ayoy ayoy merged commit ddaf8ea into develop Jul 1, 2022
@ayoy ayoy deleted the dominik/symbolicate branch July 1, 2022 07:17
samsymons added a commit that referenced this pull request Jul 4, 2022
# By Dominik Kapusta (5) and others
# Via Dominik Kapusta (1) and GitHub (1)
* develop:
  Use updated BSK branch (#627)
  Version 0.26.5
  Embedded files updated
  Update BSK for iOS app group (#630)
  Recently Closed Menu Item (#617)
  Close dashboard when closing tab with cmd + w (#628)
  chore(deps): bump Autofill to 4.7.0 (#631)
  Handle legacy crash logs and use proper architecture in symbolicate.js (#621)
  Detect when Chrome login fails due to keychain prompt denial (#633)
  Correctly display unprotected sites on dashboard (#624)
  Update homefavicon (#625)
  Update sparkle-sandbox.sh README to highlight proper usage
  Replace altool with notarytool in release build script (#623)
  Update embedded data
  Bump version to 0.26.4
  Update homepage history feed after burning (#620)
  Firefox data import improvements (#622)
  Set version to 0.26.3

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
samsymons added a commit that referenced this pull request Jul 8, 2022
# By Fernando Bunn (6) and others
# Via Chris Brind (3) and others
* develop:
  update files and bump release verison
  Check the image rule compilation error correctly (#635)
  Check that the alerting WKWebView is currently selected. (#637)
  Fix issue when unplugging external monitor (#629)
  Select tabs when browser is not focused (#632)
  Revert "Update BSK for iOS app group (#630)" (#634)
  Use updated BSK branch (#627)
  Version 0.26.5
  Embedded files updated
  Update BSK for iOS app group (#630)
  Recently Closed Menu Item (#617)
  Close dashboard when closing tab with cmd + w (#628)
  chore(deps): bump Autofill to 4.7.0 (#631)
  Handle legacy crash logs and use proper architecture in symbolicate.js (#621)
  Detect when Chrome login fails due to keychain prompt denial (#633)
  Correctly display unprotected sites on dashboard (#624)
  Update homefavicon (#625)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants