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

Proguard Mappings are not uploaded using expo plugin #4400

Open
rtorrente opened this issue Dec 22, 2024 · 3 comments
Open

Proguard Mappings are not uploaded using expo plugin #4400

rtorrente opened this issue Dec 22, 2024 · 3 comments

Comments

@rtorrente
Copy link

What React Native libraries do you use?

React Navigation, Hermes, Expo Application Services (EAS), Expo (mobile only)

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.3.0

How does your development environment look like?

expo-env-info 1.2.1 environment info:
System:
OS: macOS 15.2
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm
Managers:
CocoaPods: 1.16.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2
IDEs:
Xcode: 16.2/16C5032a - /usr/bin/xcodebuild
npmPackages:
expo: ~52.0.20 => 52.0.20
react: 18.3.1 => 18.3.1
react-native: 0.76.5 => 0.76.5
Expo Workflow: managed
New arch : disabled
Hermes: Enabled

Sentry.init()

  Sentry.init({
    dsn: SENTRY_CONFIG.DSN,
    debug: false,
    environment: SENTRY_CONFIG.environment,
    autoSessionTracking: true,
    attachScreenshot: true,
    attachStacktrace: true,
    tracesSampleRate: SENTRY_CONFIG.tracesSampleRate,
    tracePropagationTargets: [
      APP_CONFIG.WP_URL,
    ],
    integrations: [navigationIntegration],
  });

And config on app.json expo

    [
      "@sentry/react-native/expo",
      {
        organization: "ORG",
        project: process.env.SENTRY_PROJECT_NAME,
        url: "https://sentry.io",
      },
    ],

Steps to Reproduce

1 : Enable R8 and Proguard using expo-build-properties plugin

Config look like :

[
      "expo-build-properties",
      {
        android: {
          enableProguardInReleaseBuilds: true,
          enableShrinkResourcesInReleaseBuilds: true,
        },
        ios: {
          useFrameworks: "static",
        },
      },
],

2 : Build with EAS for android

Expected Result

Proguard mapping are uploaded on Sentry

Actual Result

Source maps are uploaded but proguard mapping aren't uploaded.
So on issue, there is a "Unminify code" button

@antonis
Copy link
Collaborator

antonis commented Dec 23, 2024

Hello @rtorrente 👋
You can use Sentry's Gradle integration to upload the Android ProGuard mapping files. Please check the Sentry Android Gradle Plugin documentation for more information on this.
Let us know if that helps 🙏

Also please note that we're winding down for the holidays, so responses will be slower than usual.

@rtorrente
Copy link
Author

Hey @antonis,
Thanks for your reply, the Android gradle Plugin is not included automaticaly when we add the @sentry/react-native/expo plugin in expo app.json ?

The problem is that we don't have direct access to gradle file with expo and expo config plugin are used for that

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 23, 2024
@antonis
Copy link
Collaborator

antonis commented Dec 23, 2024

Thank you for your response @rtorrente 🙇

We will investigate this further and iterate back. Since you cannot directly access the Gradle file to add the Android Gradle Plugin, I would suggest manually uploading the mapping files as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Discussion
Development

No branches or pull requests

2 participants