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

Android Build Failure: Sentry JS Upload Failed #1044

Closed
5 of 11 tasks
bramski opened this issue Aug 27, 2020 · 1 comment
Closed
5 of 11 tasks

Android Build Failure: Sentry JS Upload Failed #1044

bramski opened this issue Aug 27, 2020 · 1 comment

Comments

@bramski
Copy link

bramski commented Aug 27, 2020

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 1.7.1

react-native version: 0.63.0

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:
This is a build problem.

I have following issue:

I'm attempting to build a new react-native project. it is building and running flawlessly on Android locally. I am attempting to build it now on AppCenter and getting the following build failure:

> Task :sentry_react-native:javaPreCompileRelease
2020-08-27T20:12:34.3445490Z > Task :app:mainApkListPersistenceDevelop
2020-08-27T20:12:34.4166970Z > Task :app:bundleDevelopJsAndAssets SKIPPED
2020-08-27T20:12:34.5364730Z 
2020-08-27T20:12:34.5366020Z > Task :app:bundleDevelopJsAndAssets_SentryUpload_1 FAILED
2020-08-27T20:12:34.5367810Z Processing react-native sourcemaps for Sentry upload.
2020-08-27T20:12:34.5368370Z 
2020-08-27T20:12:34.5369320Z > Task :app:bundleDevelopJsAndAssets_SentryUploadCleanUp SKIPPED
2020-08-27T20:12:34.5372370Z error: No such file or directory (os error 2)

I have a buildType for the 'develop' release as follows:

buildTypes {
  develop {
            signingConfig signingConfigs.debug
            matchingFallbacks = ['release']
        }
}

Steps to reproduce:

  • Add project to AppCenter as Android
  • Choose build configuration
  • Click Build Now

Actual result:
Build crashes.

Expected result:
Build doesn't crash.

@bramski
Copy link
Author

bramski commented Aug 27, 2020

I solved this on my own. Turns out you should really name your buildTypes with 'release' in them if you want react to bundle them for you! Here's the offending line from react.gradle:

enabled config."bundleIn${targetName}" != null
                ? config."bundleIn${targetName}"
                : config."bundleIn${variant.buildType.name.capitalize()}" != null
                    ? config."bundleIn${variant.buildType.name.capitalize()}"
                    : targetName.toLowerCase().contains("release")

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