getsentry / getsentry/sentry-java

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

Đang mở
#5,531 2 bình luận 0 reaction 1 người được giao Được @markushi nhận Xem trên GitHub
Android Attachments Bug Platform: Java
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
67

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.