Skip to content

The abs_path of the stack frame is index.android.bundle which is not a valid URL #2879

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

Closed
5 of 11 tasks
birdofpreyru opened this issue Mar 9, 2023 · 14 comments · Fixed by #2891
Closed
5 of 11 tasks
Assignees

Comments

@birdofpreyru
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.1.0

react-native version: 0.71.4

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

Link to issue

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'A_VALID_DSN_OF_SENTRY_PROJECT',
  release: 'A_VALID_RELEASE',
  dist: 'A_VALID_DIST',
});

I have following issue:

My React Native (v0.70.4) app project was correctly set up and working with Sentry (v4.8.0), in particular the source map upload and resolution used to work fine. Yesterday I updated my app, among other stuff I have upgraded @sentry/react-native v4.8.0 ⇒ v.5.1.0; and react-native v.0.70.4 ⇒ v0.71.4, without touching anything else related to the Sentry setup. After this the source map resolution in new error events fails with the message:

Invalid Absolute Path URL
The abs_path of the stack frame is index.android.bundle which is not a valid URL.

I checked that my build artifacts are still correctly uploaded, and look no different than before. The abs_path values in the event JSON have changed though:

  • For the new events, received after the upgrade, I see the values like "abs_path":"index.android.bundle"
  • In events received before the upgrade these values were like "abs_path":"app:///index.android.bundle".

Thus, in my current understanding, it is caused either by a bug or a feature in the latest releases of @sentry/react-native. I wasn't able to find any relevant info in the Sentry migration guide for v5, or in the trouble-shooring, general setup instructions, existing issues in the repo; thus asking for help to further troubleshoot and fix it.

@andrewtremblay
Copy link

I'm seeing this as well in my react native android build.
@sentry/react-native: ^5.1.0
react-native: 0.69.7

hermes has also been enabled by default, which might be a factor.

My attempts at manually uploading and automatically uploading both have led to the same error.

@vtoupet
Copy link

vtoupet commented Mar 9, 2023

Same here.
@sentry/react-native: 5.1.0
react-native: 0.71.4

It was previously working while I was on @sentry/react-native: 4.15.0.

@marandaneto
Copy link
Contributor

Take a look at https://docs.sentry.io/platforms/react-native/troubleshooting/#source-maps-with-hermes
Depending on the version, a few things changed on the RN - Hermes side, that might help if you are manually uploading source maps.

@birdofpreyru
Copy link
Author

@marandaneto I don't upload source maps manually, I rely on the standard Sentry Gradle plugin on Android, and I was using Hermes before with no problems with source maps.

@AlexanderEggers
Copy link

AlexanderEggers commented Mar 10, 2023

I have the same issue. I am using the gradle plugin to upload my source maps. Is there a reason that doesn't work with v5 anymore? Why would we be using the gradle plugin at all then? That is especially relevant because Hermes is now the recommended standard by the RN team.

@marandaneto
Copy link
Contributor

I'm not aware that it stopped working, @krystofwoldrich can you double check?

@AlexanderEggers
Copy link

v5 also broke ios for me. Switching back to v4 solved that issue

@krystofwoldrich
Copy link
Member

Thank you for the info, I'm checking it now.

@krystofwoldrich krystofwoldrich self-assigned this Mar 10, 2023
@github-project-automation github-project-automation bot moved this to Needs Discussion in [DEPRECATED] Mobile SDKs Mar 10, 2023
@krystofwoldrich krystofwoldrich moved this from Needs Discussion to Needs Investigation in [DEPRECATED] Mobile SDKs Mar 10, 2023
@McFly78
Copy link

McFly78 commented Mar 10, 2023

Same for me with @sentry/react-native: 5.1.0 on React Native 0.67.3.
When revert back to @sentry/react-native: 5.0.0 everything is OK.

@Dallas62
Copy link

Hi same issue there, was working even with hermes activated, only upgrade of sentry/react-native.

@smaslenko
Copy link

smaslenko commented Mar 12, 2023

Having the same issue with @sentry/[email protected] on:

  • Sentry On-Premise
  • react-native 0.70.6
  • Android

When reverted back to @sentry/[email protected] the issue is gone.

@krystofwoldrich
Copy link
Member

We are working on a permanent fix but for now, everyone who is using 5.1.0. Can use this workaround.

import {
  defaultStackParser,
} from '@sentry/react';

const defaultReactNativeStackParser = (stack: string, skipFirst?: number) => {
  const frames = defaultStackParser(stack, skipFirst);

  return frames.map(frame => {
    delete frame.abs_path;
    return frame;
  });
}

Sentry.init({
  stackParser: defaultReactNativeStackParser
});

@AlexanderEggers
Copy link

@krystofwoldrich I add a look via 5.1.1 and I'm still facing this issue on Android and iOS.

@krystofwoldrich
Copy link
Member

@AlexanderEggers Thanks for the info, I've answered in the new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
9 participants