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

Supply UUID for Proguard Uploads #914

Closed
jan-auer opened this issue Feb 25, 2021 · 13 comments
Closed

Supply UUID for Proguard Uploads #914

jan-auer opened this issue Feb 25, 2021 · 13 comments

Comments

@jan-auer
Copy link
Member

During Proguard file uploads, sentry-cli computes a hash of the proguard mapping contents and assigns it as UUID for the file. Getting this UUID into SDK configuration during a build is error prone.

Instead, there could be an externally provided random UUID, that sentry-cli attaches the file to. There is precedent for this in the DIF upload, where sentry-cli overrides the identifiers of PDBs.

See getsentry/sentry-android-gradle-plugin#37

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@btseytlinTCP
Copy link

btseytlinTCP commented Feb 23, 2022

Hello! Is this scenario still possible? I'm running into an issue where the UUID in my sentry-debug-meta.properties

io.sentry.ProguardUuids=THE_VALID_UUID
sentry-debug-meta.properties

We then upload the mapping via sentry-cli
sentry-cli --auth-token $SENTRY_AUTH_TOKEN upload-proguard --write-properties sentry-debug-meta.properties mapping.txt

We then look into the project on Sentry and the Proguard page shows THE_VALID_UUID.

Then I send an event into Sentry and it's still obfsucated and says that I'm missing the correct mapping file
image

We're not sure where this UUID is coming from, but it seems like it is either randomly associated or randomly generated. I am noticing that @kamilogorek moved this to the backlog and removed stale.

For possibly helpful additional context, we're uploading the mapping and properties file to a server where we then run sentry-cli to upload it (past our VPNs). Perhaps there's some disassociation happening as a result of that?

Thanks so much for the help

@kamilogorek
Copy link
Contributor

@marandaneto @jan-auer do you know anything about this by any chance?

@marandaneto
Copy link
Contributor

@jan-auer sentry-cli already supports this parameter and the Gradle plugin uses it

@marandaneto
Copy link
Contributor

Hello! Is this scenario still possible? I'm running into an issue where the UUID in my sentry-debug-meta.properties

io.sentry.ProguardUuids=THE_VALID_UUID sentry-debug-meta.properties

We then upload the mapping via sentry-cli sentry-cli --auth-token $SENTRY_AUTH_TOKEN upload-proguard --write-properties sentry-debug-meta.properties mapping.txt

We then look into the project on Sentry and the Proguard page shows THE_VALID_UUID.

Then I send an event into Sentry and it's still obfsucated and says that I'm missing the correct mapping file image

We're not sure where this UUID is coming from, but it seems like it is either randomly associated or randomly generated. I am noticing that @kamilogorek moved this to the backlog and removed stale.

For possibly helpful additional context, we're uploading the mapping and properties file to a server where we then run sentry-cli to upload it (past our VPNs). Perhaps there's some disassociation happening as a result of that?

Thanks so much for the help

Please use the Gradle plugin for generating and uploading the proguard file.

In case you wanna upload the proguard file yourself, See this issue.
TLDR, Do not use the --write-properties anymore.

@btseytlinTCP
Copy link

@marandaneto , as discussed in this thread: getsentry/sentry-java#1912, we're unable to use the gradle plugin due to our VPN setup. We need to drop the files in a bucket and then run the sentry-cli from that environment.

@marandaneto
Copy link
Contributor

Is sentry-cli uuid setting completely broken?

AFAIK, there's nothing broken and everything works as expected, either using the Gradle plugin or sentry-cli directly.
Can you link me to an issue on sentry.io or your own self-hosted server, so I can inspect the event payload?

@btseytlinTCP
Copy link

btseytlinTCP commented Feb 24, 2022

(Unfortunately, our server is behind a VPN so I wouldn't be able to share/link an issue like you mentioned)

Oh, okay, so looking further, instead of --write-properties, our command should look like

old:
sentry-cli --auth-token $SENTRY_AUTH_TOKEN upload-proguard --write-properties sentry-debug-meta.properties mapping.txt

new:
sentry-cli --auth-token $SENTRY_AUTH_TOKEN upload-proguard --uuid A_VALID_UUID mapping.txt

Would that be right?

@marandaneto
Copy link
Contributor

yes, and use the very same A_VALID_UUID in your Android Manifest configuration, See getsentry/sentry-docs#4431

No need of having the sentry-debug-meta.properties file anymore, please delete it from the assets folder in your Android build.

@btseytlinTCP
Copy link

Wouldn't adding a UUID to the manifest then result in the same UUID for every mapping upload? Is that fine?

btseytlinTCP added a commit to btseytlinTCP/sentry-docs that referenced this issue Feb 24, 2022
Based on this comment from @marandaneto, the --write-properties syntax is no longer preferred. Instead, use --uuid getsentry/sentry-cli#914 (comment)
@btseytlinTCP
Copy link

--uuid worked for me! I haven't confirmed whether there would be issues on subsequent uploads with the same UUID.

@marandaneto might this documentation update make sense then? getsentry/sentry-docs#4764. Apologies if I am violating any practices of this repo, it is my first PR here.

@marandaneto
Copy link
Contributor

Wouldn't adding a UUID to the manifest then result in the same UUID for every mapping upload? Is that fine?

Every time the mapping file changes, you need to upload it with a new id and update the Manifest with the very same new id too, that's what the Gradle plugin does, automatically.

@btseytlinTCP
Copy link

Okay good to know, i'll include that in the docs

kamilogorek pushed a commit to getsentry/sentry-docs that referenced this issue Feb 28, 2022
* Write Properties is not recommended. Use --uuid

Based on this comment from @marandaneto, the --write-properties syntax is no longer preferred. Instead, use --uuid getsentry/sentry-cli#914 (comment)

* Update dif.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants