-
Notifications
You must be signed in to change notification settings - Fork 38
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
Enabling Hermes changes Minified JS URL to //reactnativehost/address at index.android.bundle #124
Comments
@michaelmurad You can add a custom rewrite pattern in your config. See the React Native section here: https://docs.rollbar.com/docs/source-maps#react-native New patterns can be added to the default list in later releases of rollbar-react-native, but adding it to your config will allow you to get it working without the wait. |
@waltjones But is it just a matter of adding a custom rewrite pattern in config? As I can see there is difference in stacktrace format in JSON sent to rollbar when Hermes is enabled. When Hermes is disabled then the value of notifier.diagnostic.raw_error.stack I see in occurrence raw JSON is:
But when Hermes is enabled then it looks like that:
So it seems that stacktrace format is different when Hermes is enabled and I am not sure if rollbar do well in that case |
@koloszko The rewrite pattern is applied to each path in the stack after the raw stack string is parsed. The parser for the stack strings is pretty good at handling different formats, though I don't know what it produces for your example. Unless it fails to parse at all, a custom rewrite pattern is still probably the best solution. The value at |
Can someone share the rewrite pattern you are using? Thanks. |
For the format in the original report ('//reactnativehost/address at index.android.bundle'), this should work:
If your URLs are different, or if that pattern doesn't work for you, let me know what your URLs look like. |
Hi @waltjones thanks for your help! I was able to make it work with that regex. |
@waltjones it didn't work for me. My address looks like this: |
Prior to enabling Hermes on Android the Minified JS URL would be
//reactnativehost/index.android.bundle.
After enabling Hermes it is now
//reactnativehost/address at index.android.bundle
Is there any known way to fix this and get it back to
index.android.bundle
?Thanks so much for the awesome work and for your time.
The text was updated successfully, but these errors were encountered: