Sentry-java: Android Error uploading pro guard mappings file

Created on 25 Oct 2017  路  25Comments  路  Source: getsentry/sentry-java

With the android project configured to upload the mapping (is not empty) files with gradle automatically, I get this warning:

:app:persistSentryProguardUuidsForAppReleasewarning: proguard mapping '...\release\mapping.txt' was ignored because it does not contain any line information.

compressing mappings
uploading mappings
Uploaded a total of 0 new mapping files

I tried also to upload with the sentry-cli and same happens.

Android

Most helpful comment

I'll try to improve the docs when I'm back from leave, for now the breakdown is:

sentry-cli runs on your local machine and is used to upload project files (like Proguard stuff) and should be configured in a project local sentry.properties or a ~/.sentryclirc and supports these options: https://docs.sentry.io/learn/cli/configuration/

The Java (Android) SDK runs in your app at runtime, and so this would be where you configure runtime options like the DSN, connection properties, etc. It needs to be on your classpath as it will be included i your APK and read at runtime. Details on valid options here: https://docs.sentry.io/clients/java/config/

All 25 comments

From https://docs.sentry.io/clients/java/modules/android/

Did you add the following to your Proguard rules file?

-keepattributes LineNumberTable,SourceFile
-dontwarn org.slf4j.**
-dontwarn javax.**

The LineNumberTable bit is important and I think it may be what's missing here?

Yes I did, i added in the proguard-rules.pro file

here is the log:

(...)
Obfuscating...
Printing mapping to [...\app\build\outputs\mapping\app\release\mapping.txt]...
Writing output...
Preparing output jar [\app\build\intermediates\transforms\proguard\app\release\jars\3\1f\main.jar]
   (....)
   Copying resources from program directory [...\app\build\intermediates\classes\app\release] (filtered)
Printing classes to [..\app\build\outputs\mapping\app\release\dump.txt]...
:app:persistSentryProguardUuidsForAppReleasewarning: proguard mapping '...\app\build\outputs\mapping\app\release\mapping.txt' was ignored because it does not contain any line information.

> compressing mappings
> uploading mappings
> Uploaded a total of 0 new mapping files

Can you share the mapping file with me at [email protected]?

@gfpa88 Looks like a bug in sentry-cli, working on it, thanks!

Hey.
I got similar issue after updating a project to use Android Gradle plugin version 3.0.0

Printing classes to [/home/ubuntu/project/app/build/outputs/mapping/flavor/qa/dump.txt]...
:app:crashlyticsStoreDeobsFlavorQa
:app:crashlyticsUploadDeobsFlavorQa
:app:persistSentryProguardUuidsForFlavorQaerror: No such file or directory (os error 2)
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:persistSentryProguardUuidsForFlavorQa'.
> Process 'command '/home/ubuntu/project/../node_modules/sentry-cli-binary/bin/sentry-cli'' finished with non-zero exit value 1

I use Sentry plugin version 1.6.1

Can you run the command with the environment variable SENTRY_LOG_LEVEL=debug set?

Here you go:

> Task :app:persistSentryProguardUuidsForFalvorQa
[INFO] sentry_cli::api request GET https://api.github.com/repos/getsentry/sentry-cli/releases/latest
[INFO] sentry_cli::api > GET /repos/getsentry/sentry-cli/releases/latest HTTP/1.1
[INFO] sentry_cli::api > Host: api.github.com
[INFO] sentry_cli::api > Accept: */*
[INFO] sentry_cli::api > User-Agent: sentry-cli/1.21.0
[INFO] sentry_cli::api < HTTP/1.1 200 OK
[INFO] sentry_cli::api < Server: GitHub.com
[INFO] sentry_cli::api < Date: Tue, 31 Oct 2017 09:10:20 GMT
[INFO] sentry_cli::api < Content-Type: application/json; charset=utf-8
[INFO] sentry_cli::api < Content-Length: 8631
[INFO] sentry_cli::api < Status: 200 OK
[INFO] sentry_cli::api < X-RateLimit-Limit: 60
[INFO] sentry_cli::api < X-RateLimit-Remaining: 59
[INFO] sentry_cli::api < X-RateLimit-Reset: 1509444620
[INFO] sentry_cli::api < Cache-Control: public, max-age=60, s-maxage=60
[INFO] sentry_cli::api < Vary: Accept
[INFO] sentry_cli::api < ETag: "7bf0446f45661dce5b788d253ef849a1"
[INFO] sentry_cli::api < Last-Modified: Fri, 06 Oct 2017 09:04:06 GMT
[INFO] sentry_cli::api < X-GitHub-Media-Type: github.v3; format=json
[INFO] sentry_cli::api < Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
[INFO] sentry_cli::api < Access-Control-Allow-Origin: *
[INFO] sentry_cli::api < Expect-CT: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
[INFO] sentry_cli::api < Content-Security-Policy: default-src 'none'
[INFO] sentry_cli::api < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
[INFO] sentry_cli::api < X-Content-Type-Options: nosniff
[INFO] sentry_cli::api < X-Frame-Options: deny
[INFO] sentry_cli::api < X-XSS-Protection: 1; mode=block
[INFO] sentry_cli::api < X-Runtime-rack: 0.042767
[INFO] sentry_cli::api < X-GitHub-Request-Id: D217:0B4E:E64FCE:2058628:59F83DFB
[INFO] sentry_cli::api response: 200
[INFO] sentry_cli::api Looking for file named: sentry-cli-Darwin-x86_64
[INFO] sentry_cli::api body: {"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/8021257","assets_url":"https://api.github.com/repos/getsentry/sentry-cli/releases/8021257/assets","upload_url":"https://uploads.github.com/repos/getsentry/sentry-cli/releases/8021257/assets{?name,label}","html_url":"https://github.com/getsentry/sentry-cli/releases/tag/1.21.0","id":8021257,"tag_name":"1.21.0","target_commitish":"master","name":"sentry-cli 1.21.0","draft":false,"author":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2017-10-06T08:20:53Z","published_at":"2017-10-06T09:02:59Z","assets":[{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998353","id":4998353,"name":"sentry-cli-Darwin-x86_64","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":7630208,"download_count":13092,"created_at":"2017-10-06T08:33:05Z","updated_at":"2017-10-06T08:33:06Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Darwin-x86_64"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998368","id":4998368,"name":"sentry-cli-Linux-i686","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":13683712,"download_count":1175,"created_at":"2017-10-06T08:35:06Z","updated_at":"2017-10-06T08:35:07Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Linux-i686"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998359","id":4998359,"name":"sentry-cli-Linux-x86_64","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":14025680,"download_count":25774,"created_at":"2017-10-06T08:34:15Z","updated_at":"2017-10-06T08:34:16Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Linux-x86_64"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998301","id":4998301,"name":"sentry-cli-Windows-i686.exe","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":6033408,"download_count":1577,"created_at":"2017-10-06T08:25:04Z","updated_at":"2017-10-06T08:25:05Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Windows-i686.exe"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998374","id":4998374,"name":"sentry-cli-Windows-x86_64.exe","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":7243264,"download_count":21,"created_at":"2017-10-06T08:36:17Z","updated_at":"2017-10-06T08:36:18Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Windows-x86_64.exe"}],"tarball_url":"https://api.github.com/repos/getsentry/sentry-cli/tarball/1.21.0","zipball_url":"https://api.github.com/repos/getsentry/sentry-cli/zipball/1.21.0","body":"- Fix codepush command for android\r\n- Fixed added bitbucket provider support #115 "}
[INFO] sentry_cli::api body: {"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/8021257","assets_url":"https://api.github.com/repos/getsentry/sentry-cli/releases/8021257/assets","upload_url":"https://uploads.github.com/repos/getsentry/sentry-cli/releases/8021257/assets{?name,label}","html_url":"https://github.com/getsentry/sentry-cli/releases/tag/1.21.0","id":8021257,"tag_name":"1.21.0","target_commitish":"master","name":"sentry-cli 1.21.0","draft":false,"author":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2017-10-06T08:20:53Z","published_at":"2017-10-06T09:02:59Z","assets":[{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998353","id":4998353,"name":"sentry-cli-Darwin-x86_64","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":7630208,"download_count":13092,"created_at":"2017-10-06T08:33:05Z","updated_at":"2017-10-06T08:33:06Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Darwin-x86_64"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998368","id":4998368,"name":"sentry-cli-Linux-i686","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":13683712,"download_count":1175,"created_at":"2017-10-06T08:35:06Z","updated_at":"2017-10-06T08:35:07Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Linux-i686"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998359","id":4998359,"name":"sentry-cli-Linux-x86_64","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":14025680,"download_count":25774,"created_at":"2017-10-06T08:34:15Z","updated_at":"2017-10-06T08:34:16Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Linux-x86_64"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998301","id":4998301,"name":"sentry-cli-Windows-i686.exe","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":6033408,"download_count":1577,"created_at":"2017-10-06T08:25:04Z","updated_at":"2017-10-06T08:25:05Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Windows-i686.exe"},{"url":"https://api.github.com/repos/getsentry/sentry-cli/releases/assets/4998374","id":4998374,"name":"sentry-cli-Windows-x86_64.exe","label":"","uploader":{"login":"getsentry-bot","id":10587625,"avatar_url":"https://avatars3.githubusercontent.com/u/10587625?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry-bot","html_url":"https://github.com/getsentry-bot","followers_url":"https://api.github.com/users/getsentry-bot/followers","following_url":"https://api.github.com/users/getsentry-bot/following{/other_user}","gists_url":"https://api.github.com/users/getsentry-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry-bot/subscriptions","organizations_url":"https://api.github.com/users/getsentry-bot/orgs","repos_url":"https://api.github.com/users/getsentry-bot/repos","events_url":"https://api.github.com/users/getsentry-bot/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry-bot/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":7243264,"download_count":21,"created_at":"2017-10-06T08:36:17Z","updated_at":"2017-10-06T08:36:18Z","browser_download_url":"https://github.com/getsentry/sentry-cli/releases/download/1.21.0/sentry-cli-Windows-x86_64.exe"}],"tarball_url":"https://api.github.com/repos/getsentry/sentry-cli/tarball/1.21.0","zipball_url":"https://api.github.com/repos/getsentry/sentry-cli/zipball/1.21.0","body":"- Fix codepush command for android\r\n- Fixed added bitbucket provider support #115 "}
[INFO] sentry_cli::api Found asset sentry-cli-Darwin-x86_64
error: No such file or directory (os error 2)


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:persistSentryProguardUuidsForFalvorQa'.
> Process 'command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli7434098055627254812.exe'' finished with non-zero exit value 1

This was run on my local machine (MacOS) unlike the previous log that was taken from CI. The results from both were the same.

Here are also the logs when running Gradle with --debug:

> Task :app:persistSentryProguardUuidsForFalvorQa
14:07:18.695 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :app:persistSentryProguardUuidsForFalvorQa' started
14:07:18.695 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':app:persistSentryProguardUuidsForFalvorQa'
14:07:18.695 [INFO] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':app:persistSentryProguardUuidsForFalvorQa' into context took 0.0 secs.
14:07:18.696 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':app:persistSentryProguardUuidsForFalvorQa' is up-to-date
14:07:18.696 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':app:persistSentryProguardUuidsForFalvorQa' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
14:07:18.696 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':app:persistSentryProguardUuidsForFalvorQa'.
14:07:18.696 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Validate task inputs for :app:persistSentryProguardUuidsForFalvorQa' started
14:07:18.696 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Validate task inputs for :app:persistSentryProguardUuidsForFalvorQa'
14:07:18.696 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Execute exec for :app:persistSentryProguardUuidsForFalvorQa' started
14:07:18.697 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe''. Working directory: /Users/pawel/Workspace/project/android-app Command: /var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe upload-proguard --android-manifest /Users/pawel/Workspace/project/android-app/app/build/intermediates/manifests/full/Falvor/qa/AndroidManifest.xml --write-properties /Users/pawel/Workspace/project/android-app/app/build/intermediates/assets/Falvor/qa/sentry-debug-meta.properties /Users/pawel/Workspace/project/android-app/app/build/outputs/mapping/Falvor/qa/mapping.txt
14:07:18.697 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process 'command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe'': {PATH=/Users/pawel/flutter/bin:/Users/pawel/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/pawel/flutter/bin:/Users/pawel/bin:/Users/pawel/Library/Android/sdk/platform-tools:/Users/pawel/Library/Android/sdk/tools:/Users/pawel/Library/Android/sdk/platform-tools:/Users/pawel/Library/Android/sdk/tools, JAVA_ARCH=x86_64, ZDOTDIR=, SENTRY_PROPERTIES=/Users/pawel/Workspace/project/android-app/sentry.properties, TERM=xterm-256color, ANDROID_HOME=/Users/pawel/Library/Android/sdk, VERSIONER_PYTHON_VERSION=2.7, SENTRY_LOG_LEVEL=debug, LOGNAME=pawel, PWD=/Users/pawel/Workspace/project/android-app, XPC_SERVICE_NAME=0, JAVA_MAIN_CLASS_12640=org.gradle.wrapper.GradleWrapperMain, SHELL=/bin/zsh, PAGER=less, LSCOLORS=Gxfxcxdxbxegedabagacad, APP_NAME_12640=Gradle, OLDPWD=/Users/pawel/Workspace/project/android-app, USER=pawel, VERSIONER_PYTHON_PREFER_32_BIT=no, ZSH=/Users/pawel/.oh-my-zsh, APP_ICON_12640=/Users/pawel/Workspace/project/android-app/media/gradle.icns, TMPDIR=/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.twtaXrCvHv/Listeners, XPC_FLAGS=0x0, __CF_USER_TEXT_ENCODING=0x1F5:0:0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.K5yOpoeQuI/Render, LESS=-R, com.apple.java.jvmTask=CommandLine, LC_CTYPE=, SHLVL=1, HOME=/Users/pawel}
14:07:18.697 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
14:07:18.698 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe'.
14:07:18.709 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
14:07:18.709 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
14:07:18.710 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe''
14:07:18.797 [ERROR] [system.err] error: No such file or directory (os error 2)
14:07:18.799 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
14:07:18.799 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command '/var/folders/4b/cctwfw0d0vlgpwdjmchtdgwh0000gn/T/.sentry-cli3716221294323670455.exe'' finished with exit value 1 (state: FAILED)

I can see that the actual Manifest file is not located where the param is pointing to:

--android-manifest /Users/pawel/Workspace/project/android-app/app/build/intermediates/manifests/full/Falvor/qa/AndroidManifest.xml

I fact there are multiple manifest files for each ABI (we have split APKs enabled).

app/build/intermediates/manifests
|-- full
|   `-- flavor
|       `-- qa
|           |-- arm64-v8a
|           |   `-- AndroidManifest.xml
|           |-- armeabi-v7a
|           |   `-- AndroidManifest.xml
|           |-- output.json
|           |-- universal
|           |   `-- AndroidManifest.xml
|           |-- x86
|           |   `-- AndroidManifest.xml
|           `-- x86_64
|               `-- AndroidManifest.xml
...

So it looks like now you will need to handle a case when APK split is enabled:
https://issuetracker.google.com/issues/64021986#comment3
https://issuetracker.google.com/issues/64137222#comment3

I noticed that adding output.dirName to manifestOutputDirectory will result in correct path to manifest:

String manifestPath = "$manifestOutputDirectory/${output.dirName}/AndroidManifest.xml"

Here's my sample project that I used to play with it:
https://github.com/szymanskip/android-manifest-location
You can run it using:
./gradlew clean generateDebugSources

@szymanskip Fix is up here: https://github.com/getsentry/sentry-java/pull/530

The original issue here (first comment) turns out to be Windows style newlines. sentry-cli needs to be patched to fix.

It also affects the server. Plan is to fix this by tomorrow.

@bretthoerner hey, what's the status of #530 Can we expect a release anytime soon?

@mitsuhiko can you review #530?

@szymanskip I released 1.5.2 to Maven Central.

@bretthoerner Unfortunately your fix introduced different issue.
For clean build mappings were not being uploaded because the Gradle tasks responsible for that were not created.
I opened a PR #533

sentry.properties in our android project:

defaults.project={project name}
defaults.org={company name}
auth.token={token}
dsn={dsn}
environment=release
log.level=error
uncaught.handler.enabled=true
buffer.size=200
buffer.flushtime=60000
buffer.gracefulshutdown=true
buffer.shutdowntimeout=5000
async.shutdowntimeout=5000
async.queuesize=100
compression=true
maxmessagelength=1500

We can see release reports in Sentry.io console, but uploading proguard mappings fails with error:
An organization slug is required (provide with --org).

our build.gradle

...
apply plugin: 'io.sentry.android.gradle'

sentry {
    autoProguardConfig true
    autoUpload true
}

android {
...
}

dependencies {
...
    implementation 'io.sentry:sentry-android:1.7.5'
}

build/intermediates/sentry/sentry.pro gets generated so we assume that there is no need to manually add additional proguard rules.

build/intermediates/assets/app/release/sentry-debug-meta.properties also is successfully generated.

Our app has 2 flavors: "app" and "appb". Can this be an issue?

Build logs:

...
Successfully started process 'command '/var/folders/k6/y74k3p216ns25b8m8yfltvs00000gn/T/.sentry-cli1448729597102852500.exe''
> compressing mappings
> uploading mappings
error: An organization slug is required (provide with --org)

> Task :App:transformClassesAndResourcesWithProguardForAppRelease FAILED
:App:transformClassesAndResourcesWithProguardForAppRelease (Thread[Task worker for ':',5,main]) completed. Took 38.272 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':App:persistSentryProguardUuidsForAppReleaseApp-release'.
> Process 'command '/var/folders/k6/y74k3p216ns25b8m8yfltvs00000gn/T/.sentry-cli1448729597102852500.exe'' finished with non-zero exit value 1

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':App:persistSentryProguardUuidsForAppReleaseApp-release'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:398)
        at org.gradle.api.internal.TaskInternal$execute.call(Unknown Source)
        at io.sentry.android.gradle.SentryPlugin$_apply_closure2$_closure3$_closure4$_closure6.doCall(SentryPlugin.groovy:251)
        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:732)
        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/var/folders/k6/y74k3p216ns25b8m8yfltvs00000gn/T/.sentry-cli1448729597102852500.exe'' finished with non-zero exit value 1
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:389)
        at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:36)
        at org.gradle.api.tasks.AbstractExecTask.exec(AbstractExecTask.java:56)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:794)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:761)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
        ... 55 more


* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 5s
232 actionable tasks: 21 executed, 211 up-to-date

Hi @djonus, it looks like you are mixing the sentry.properties that is for the SDK runtime configuration and the sentry.properties is that is for your build machine configuration. We definitely need to rename one of those.

Settings like dsn and release go in a sentry.properties on your classpath, like app/src/main/resources. Settings like org are for the sentry-cli/Gradle build process, and it should look for them in your project root. Where is your sentry.properties currently?

@bretthoerner Thank you! Yes, it picks up org slug from sentry.properties after copy pasting it from app/src/main/resources to project root. I've been looking at https://docs.sentry.io/clients/java/config/ but I still can not figure exactly what properties goes to which sentry.properties file. Also every flavor/buildtype combination should go to separate project, but it needs to be declared in root sentry.properties. We can override it at build time, but what would be your recommendation?

@bretthoerner this helped me too. I spent 2 days on that until finding this issue thread because I had all in one properties file. I saw that it is in fact in the docs now looking for it, but could you make the "in your project root" part here bold, underlined, red and blinking? (or at least bold). I'm apparently not the only one missing it...

I'll try to improve the docs when I'm back from leave, for now the breakdown is:

sentry-cli runs on your local machine and is used to upload project files (like Proguard stuff) and should be configured in a project local sentry.properties or a ~/.sentryclirc and supports these options: https://docs.sentry.io/learn/cli/configuration/

The Java (Android) SDK runs in your app at runtime, and so this would be where you configure runtime options like the DSN, connection properties, etc. It needs to be on your classpath as it will be included i your APK and read at runtime. Details on valid options here: https://docs.sentry.io/clients/java/config/

Just leaving this here in case someone else had the same issue. Be careful when using initWith in gradle!
https://www.stkent.com/2016/10/07/proguardfiles-a-cautionary-tale.html

hey you all, did you manage to get it working? there were a few fixes about split aps, so the latest version should be fine, please let me know, thanks.

For me it is working!
But might need a clean rebuild before.

Is there a way to make this work for bundles (*.aab) as well?

@DanielHabenicht not sure if the current plugin supports App bundles, I'll have a look at it and will come back to you soon.
I'd recommend opening a new issue for that as a feature request, thanks.

@DanielHabenicht please raise a new issue for the feature bundle thing.

Was this page helpful?
0 / 5 - 0 ratings