getsentry / getsentry/sentry-java

Missing attachments in ANR events captured with new implementation (v2 - ApplicationExitInfo)

未关闭
#5,531 2 条评论 0 个 reaction 已指派 1 人 已被 @markushi 认领 在 GitHub 查看
Android Attachments Bug Platform: Java
主要语言
Kotlin
星标
1.4k
派生
478
平均合并
2 天 23 小时
30 天内合并 PR
67

描述

### Integration

sentry-android

### Build System

Gradle

### AGP Version

8.14.0

### Proguard

Enabled

### Other Error Monitoring Solution

No

### Version

8.41.0+

### Steps to Reproduce

1. Paste following snippet in https://github.com/getsentry/sentry-java/blob/main/sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MyApplication.java#L20

```
File publicAppDir = getExternalFilesDir(android.os.Environment.DIRECTORY_DOCUMENTS);
File targetFile = new File(publicAppDir, "my_app_file.txt");

try (FileOutputStream fos = new FileOutputStream(targetFile)) {
String textData = "This is text saved inside the app-specific external folder.";
fos.write(textData.getBytes());
} catch (IOException e) {
e.printStackTrace();
}

Sentry.configureScope(scope -> {
Attachment attachment = new Attachment(targetFile.getAbsolutePath());
scope.addAttachment(attachment);
});
```
2. Build and run sample app on Android 11+ device
3. Issue an ANR

### Expected Result

Attachment is present in ANR report

### Actual Result

No attachments

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。