SeriesGuide icon indicating copy to clipboard operation
SeriesGuide copied to clipboard

Backup will fail if a content provider is selected for creating copies

Open du33169 opened this issue 10 months ago • 1 comments
trafficstars

Describe the bug. I use DAVx5 to back up the configurations of several applications to WebDAV. It registers as a content provider so that the user can directly select the DAVx5 filesystem when asked for a location to save a file, and then DAVx5 uploads it automatically.

I tried to create backups for SeriesGuide in the same way, but it failed and reported: IO exception: illegal seek. It did create a backup file, but with a size of 0B. The file path displayed below the "Select File" button looks like this: content://at.bitfire.davdroid.webdav/document/271, which is odd because it usually has seriesguide-movies-backup.json at the end.

I have tried other content providers and the error persisted. Backup will succeed if a normal local path is selected or creating copies is disabled.

To reproduce Steps to reproduce the behaviour:

  1. Install DAVx5 and set up a WebDAV remote.
  2. Go to SeriesGuide-Settings-AutoBackup
  3. Enable "Make a copy after every autobackup".
  4. Click 'Select File' for shows or movies
  5. Select DAVx5 file system, select directory and save
  6. Click "Create Backup
  7. The following error is displayed

Expected behaviour Backup file saved successfully.

Smartphone (please complete the following information):.

  • Device: Android
  • OS: Android 13
  • Browser: ?
  • Version: v2024.5.4

du33169 avatar Jan 02 '25 11:01 du33169

Thanks for reporting.

However, you wrote

I have tried other content providers and the error persisted.

So if no others are working, that sounds like an issue with your device, no?

Anyhow, SeriesGuide uses GSONs JsonWriter:

https://github.com/UweTrottmann/SeriesGuide/blob/42dab71e1509dc5bece090ca4f84a9d274abfb39/app/src/main/java/com/battlelancer/seriesguide/dataliberation/JsonExportTask.kt#L290C22-L290C32

I could not find any helpful info when searching the internet for "IOException: illegal seek".

I'll try to reproduce this when I have time.

UweTrottmann avatar Jan 09 '25 09:01 UweTrottmann