-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
> Task :app:bundleReleaseJsAndAssets_SentryUpload ... FAILED #2309
Comments
@hetmann we use the sentry-react-native/sentry.gradle Lines 181 to 182 in 8830dab
sentry-react-native/sentry.gradle Line 67 in 8830dab
This is usually generated by your App's build script, e.g. Can you check in your file if this could lead to negative numbers? |
@marandaneto thank you for your answer. I dig a bit and it kinda doesn't make sense
# update version code from build.gradle
increment_version_code(
version_code: build_number,
gradle_file_path: "./android/app/build.gradle"
) So I had build_number set to 1655674737 but the the task would say Also splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk true // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
} |
Not sure then, maybe Fastlane sets something to |
@marandaneto I'll try the new version and let you know the results. |
@marandaneto I updated to [13:31:26]: The increment_version_code plugin will use gradle file at (./android/app/build.gradle)!
[13:31:26]: -> line: (versionCode 1656072137)!
[13:31:26]: ☝️ Version code has been changed to 1656156647 but the sentry android versionCode is still [13:33:17]: ▸ > Task :app:[email protected]+-1700729253_-1700729253 FAILED
[13:33:17]: ▸ error: Found argument '-1' which wasn't expected, or isn't valid in this context
[13:33:17]: ▸ USAGE:
[13:33:17]: ▸ sentry-cli react-native gradle [OPTIONS] --bundle <PATH> --dist <DISTRIBUTION>... --release <RELEASE> --sourcemap <PATH> Super strange ... I will dig up more to see whats going on. |
Its not released yet, Monday you test it again with 4.0.2 |
@marandaneto I just tried Sentry RN v4.0.2 and it seems is partial fixed but I got the same error: Uploading sourcemaps for release [email protected]+1656332208 distribution 1656332208
...
> Task :app:[email protected]+-1525168254_1525168254 FAILED
error: Found argument '-1' which wasn't expected, or isn't valid in this context If you notice there is Does this make any sense? |
I had this same problem. I think the problem was that the versionCode specified in my build.gradle was high enough that when multiplied by 1000, it was higher than some maximum allowable integer (maybe google play's maximum of 2100000000?) so it would wrap around and become a negative number. Fixed it by lowering the number as low as it could be while still being higher than the last published version. |
Commenting to say what fixed it for me. I upgraded the version from 5.6.0 to 5.11.1, then ran a |
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
"@sentry/react-native": "3.4.3",
Steps to Reproduce
> Task :app:[email protected]+2112328043_2112328043
> Task :app:[email protected]+-2095294253_-2095294253 FAILED
-
sign and without itExpected Result
Build without failing :)
Actual Result
I think somewhere the Android sentryUpload task is auto generating the id/number with a
- sign
. I double checked if we changed/updated something in the code base after the this task was failing and I confirm that there was no major update, only small UI updates.wdyt @marandaneto
The text was updated successfully, but these errors were encountered: