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

Rageshake server does not accept "log.gz" as a valid file suffix", as used by element-android #40

Closed
michaelkaye opened this issue Jan 18, 2022 · 3 comments

Comments

@michaelkaye
Copy link
Contributor

michaelkaye commented Jan 18, 2022

Describe the bug

element-android submits rageshakes with gzipped file parts, eg:

https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt#L700 creates gzipped files named with a .gz extension

https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt#L299 creates Parts with the filename set to the name

Rageshake server rejects the name and overwrites with a good one as it doesn't match the regular expression here:

https://github.com/matrix-org/rageshake/blob/master/submit.go#L427

It then replaces it with a logs-0000.gz style extension.

This makes it hard to handle crash data, logcat data and log files separately.

So rather than getting the following files:

logcat.log.gz
logs-1.log.gz
logs-2.log.gz
logs-3.log.gz
logs-4.log.gz
logs-5.log.gz
logs-6.log.gz
logs-7.log.gz

We get the following files:

logs-0000.txt.gz (this is the logcat one)
logs-0001.txt.gz
logs-0002.txt.gz
logs-0003.txt.gz
logs-0004.txt.gz
logs-0005.txt.gz
logs-0006.txt.gz
logs-0007.txt.gz

Unsure whether to fix in the rageshake server (and accept *.gz as a valid extension) or if we should fix in element-android going forward and accept currently deployed apps' log submissions will be made into generic logs-0000.txt.gz files.

@michaelkaye
Copy link
Contributor Author

This is also true of element-web, which submits logs (i believe) with a name similar to instance-123152 - however it's less of a problem there as all logs are of the same type; and it submits them in reverse chronological order, so it's easier to manage.

@michaelkaye
Copy link
Contributor Author

This is now deployed on the matrix.org server, logs are now named correctly when uploaded.

@bmarty
Copy link

bmarty commented Jan 26, 2022

Thanks a lot for this fix @michaelkaye ! I was wondering since a long time why we had this diff in the files name.
I confirm that we now have better filenames on the rageshakes:
image

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

No branches or pull requests

2 participants