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

fix(react-native): fix sourcemaps for iOS builds with hermes #1197

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

andreybutov
Copy link
Collaborator

Status

READY

Description

This PR fixes sourcemap generation for iOS builds with hermes enabled. Related issue: #1182

Steps to Test or Reproduce

  • From a test React Native app (0.72+, to make sure hermes is the default engine), install the Honeybadger RN library, initialize with your project API key and a unique revision string.
  Honeybadger.configure({ 
    apiKey: '<your project API key>, 
    revision: 'test-revision-1',
    debug: true,
    environment: 'production'
  });
  • Implement some code that will cause an exception. throw new Error("test") on a button press will work fine.
  • Run the app in release mode. npx react-native run-ios --mode Release
  • Generate and upload sourcemaps to Honeybadger. Make sure the --revision argument matches the revision in the initialization code. npx honeybadger-upload-sourcemaps --apiKey <your api key> --revision test-revision-1
  • Cause the crash in the app.
  • The Honeybadger dashboard should show the crash with the top-most backtrace line pointing to the correct file and line. The function name might not be correctly reflected, depending on how/where the error was thrown, but the file and line should be accurate.

Copy link
Contributor

@BethanyBerkowitz BethanyBerkowitz left a comment

Choose a reason for hiding this comment

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

It works!

Screen Shot 2023-10-04 at 3 56 56 PM

@subzero10 subzero10 merged commit d516ef0 into master Oct 5, 2023
@subzero10 subzero10 deleted the sourcemaps_ios_hermes branch October 5, 2023 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react-native @honeybadger-io/react-native
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants