Skip to content

Commit

Permalink
fix(android): proguardUuid loading (#3591)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Feb 12, 2024
1 parent 7835531 commit ae9f909
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This release contains upgrade of `sentry-android` dependency to major version 7.
### Fixes

- Upload Debug Symbols Build Phase continues when `node` not found in `WITH_ENVIRONMENT` ([#3573](https://github.com/getsentry/sentry-react-native/pull/3573))
- Fix `proguardUuid` loading on Android ([#3591](https://github.com/getsentry/sentry-react-native/pull/3591))

### Dependencies

Expand Down
16 changes: 13 additions & 3 deletions android/src/main/java/io/sentry/react/RNSentryModuleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,21 @@ public WritableMap stopProfiling() {
return proguardUuid;
}
isProguardDebugMetaLoaded = true;
final @Nullable Properties debugMeta = (new AssetsDebugMetaLoader(this.getReactApplicationContext(), logger)).loadDebugMeta();
if (debugMeta != null) {
final @Nullable List<Properties> debugMetaList = (new AssetsDebugMetaLoader(this.getReactApplicationContext(),
logger)).loadDebugMeta();
if (debugMetaList == null) {
return null;
}

for (Properties debugMeta : debugMetaList) {
proguardUuid = DebugMetaPropertiesApplier.getProguardUuid(debugMeta);
return proguardUuid;
if (proguardUuid != null) {
logger.log(SentryLevel.INFO, "Proguard uuid found: " + proguardUuid);
return proguardUuid;
}
}

logger.log(SentryLevel.WARNING, "No proguard uuid found in debug meta properties file!");
return null;
}

Expand Down

0 comments on commit ae9f909

Please sign in to comment.