element-hq / element-hq/element-ios

Rageshake tries to upload multiple logs at the same time.

Open
#6,595 0 comments 0 reactions 0 assignees View on GitHub
A-Rageshakes O-Uncommon S-Minor T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. i rageshaked
2. looking at the subsequent logs of the rageshake, it looks to have tried to upload multiple times - and ended up with two overlapping requests:

```
2022-08-19 12:02:34.175 Element[454:119460] [MXBugReport] zipLogFiles: Zipped 15 logs (72.1 MB to 9.1 MB) in 1021.181ms
2022-08-19 12:03:33.574 Element[454:38024] [MXBugReport] sendBugReport failed. There is already a submission in progress. state: 2
2022-08-19 12:04:34.190 Element[454:38024] [MXBugReport] sendBugReport failed. There is already a submission in progress. state: 2
2022-08-19 12:05:02.651 Element[454:122396] [MXBugReport] zipLogFiles: Zipped 15 logs (69.4 MB to 8.9 MB) in 742.709ms
2022-08-19 12:05:44.904 Element[454:38024] [MXBugReport] sendBugReport: report failed. Error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad request (400)" UserInfo={NSLocalizedDescription=Request failed: bad request (400), NSUnderlyingError=0x13bd33db0 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo={NSLocalizedDescription=Request failed: unacceptable content-type: text/html, NSErrorFailingURLKey=https://riot.im/bugreports/submit, com.alamofire.serialization.response.error.data={length = 155, bytes = 0x3c68746d 6c3e0d0a 3c686561 643e3c74 ... 2f68746d 6c3e0d0a }, com.alamofire.serialization.response.error.response= { URL: https://riot.im/bugreports/submit } { Status Code: 400, Headers {
2022-08-19 12:07:06.101 Element[454:38024] [MXBugReport] sendBugReport: report failed. Error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad request (400)" UserInfo={NSLocalizedDescription=Request failed: bad request (400), NSUnderlyingError=0x29d9ef480 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: text/html" UserInfo={NSLocalizedDescription=Request failed: unacceptable content-type: text/html, NSErrorFailingURLKey=https://riot.im/bugreports/submit, com.alamofire.serialization.response.error.data={length = 155, bytes = 0x3c68746d 6c3e0d0a 3c686561 643e3c74 ... 2f68746d 6c3e0d0a }, com.alamofire.serialization.response.error.response= { URL: https://riot.im/bugreports/submit } { Status Code: 400, Headers {
2022-08-19 12:07:50.039 Element[454:38024] [MXBugReport] sendBugReport: report done in 1512.343ms
```

It looks like there are 4 separate attempts to rageshake happening there, despite me only hitting the button once. Is something trying to retry, and then overlap?

Meanwihle the requests failed with 400 due to something to do with https://github.com/vector-im/element-ios/issues/6594 (os possibly this issue)?

### Outcome

#### What did you expect?

Rageshakes should not try to upload multiple times and end up overlapping.

### Your phone model

_No response_

### Operating system version

_No response_

### Application version

1.8.25-debug

### Homeserver

matrix.org

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.