CWA log filename contains characters reserved under Windows
See original GitHub issueAvoid duplicates
- Bug is not mentioned in the FAQ
- Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
- Bug is not already reported in another issue
Technical details
- Device name: Pixel 3a emulator
- Android version: 11
- App version: 2.2.1 (and 2.3.0-RC0)
Describe the bug
Attempting to unzip an error report from CWA using the Microsoft Windows built-in Extract command results in
Error 0x80070057: The parameter is incorrect.
Steps to reproduce the issue
- On the CWA Start Screen tap the three-dot symbol
- Tap “App Information”
- Tap “Error Reports”
- Tap “SHARE AND CONTINUE”
- Tap (Google) Drive - Save to Drive
- Document title will be similar to “CWA Log 2021-05-12 14:07:40.331.zip”
- Tap “Save”
- On Microsoft Windows 10 system open https://drive.google.com/drive/my-drive
- Right click and select Download
- Downloaded filename is changed, for instance to “CWA Log 2021-05-12 14_07_40.331.zip”
- Right-click downloaded file and select “Extract All…”
- Click Extract
- Note error message “Error 0x80070057: The parameter is incorrect.”
The error is caused by the zipped filename containing colons “:” which is a reserved character for Microsoft Windows filenames. See https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions.
Expected behavior
It should be possible to view the contents of a CWA Error Report using the built-in Microsoft Windows zip Extract command. Filenaming should be consistent with Microsoft Windows rules and not cause errors.
Possible Fix
Replace “:” in the filename by “_”.
The line of code seems to be https://github.com/corona-warn-app/cwa-app-android/blob/595ab630dfad5ac1e29021c084c400054193a498/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/bugreporting/debuglog/internal/LogSnapshotter.kt#L36
Workaround
Use 7-zip to unzip the file.
Despite the error from the Microsoft Windows built-in tool, it does in fact extract the log file contents.
Internal Tracking-ID: EXPOSUREAPP-7266
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:20 (20 by maintainers)
Top GitHub Comments
Not an issue under iOS, see https://github.com/corona-warn-app/cwa-app-android/issues/3183#issuecomment-841801940 from @Ein-Tim who writes that iOS uses the filename
cwa-log
.PR #3235 is now working correctly and is ready for review.
Thanks again to @PhilippNowak96!