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

Source code not found with custom bundle service #1094

Closed
5 of 11 tasks
15matias15 opened this issue Sep 21, 2020 · 1 comment
Closed
5 of 11 tasks

Source code not found with custom bundle service #1094

15matias15 opened this issue Sep 21, 2020 · 1 comment

Comments

@15matias15
Copy link

15matias15 commented Sep 21, 2020

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 1.8.2

react-native version: 0.63.2

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: CONSTANTS.sentry_dsn,
          environment,
          release: `${client}-${BuildConfig.VERSION_CODE.toString()}-${BuildCondig.BUNDLE_VERSION.toString()}`,
        });
});

I have following issue:

We have our build-in-house bundle service, that provide with the latest RN bundle to the app according to the version and for that we have the next config in our gradle file:

project.ext.react = [
        enableHermes: true,  // clean and rebuild if changing
        nodeExecutableAndArgs: ["node", "--max_old_space_size=8192"],
        bundleInDebug        : false,
        bundleInRelease      : false,
        entryFile: "index.android.ts",
]

I assume that as bundleInDebug & bundleInRelease as set as false, when I run apply from: "../../node_modules/@sentry/react-native/sentry.gradle" I'm getting an error, so I'm uploading the RN bundle through sentry-cli with:

 - node_modules/hermes-engine/linux64-bin/hermesc -O -emit-binary -output-source-map -out=android/app/src/$CLIENT/assets/main.jsbundle /android/app/src/$CLIENT/assets/index.android.bundle
 - node_modules/react-native/scripts/compose-source-maps.js android/app/src/$CLIENT/assets/index.android.bundle.map android/app/src/$CLIENT/assets/main.jsbundle.map -o android/app/src/$CLIENT/assets/index.android.bundle.map
 - mv android/app/src/$CLIENT/assets/main.jsbundle android/app/src/$CLIENT/assets/index.android.bundle
 - node_modules/.bin/sentry-cli releases files $CLIENT-$VERSION_CODE-$BUNDLE_VERSION upload-sourcemaps --dist $CLIENT-$BUNDLE_VERSION --strip-prefix ./ --rewrite --validate android/app/src/$CLIENT/assets/

That generate the next artifact:

image

But then when I see the errors on the dashboard, the source code it's missing:

image

Steps to reproduce:

  • Step 1
  • Step 2

Actual result:

[Actual result]

Expected result:

[Expected result]

@15matias15
Copy link
Author

I just notice that sentry find the bundle with dist not with release, I add the dist to the init and now it's working

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

No branches or pull requests

1 participant