Skip to content

Backup of Calendar - Exception while saving one calendar stops saving all following calendars #16220

@bohni

Description

@bohni

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Have multiple calendars
  2. Activate Backups of Contatcs and Calendars
  3. Wait till backups where created
  4. Check backed up calendars

Expected behaviour

All calendars should be backed up

Actual behaviour

I have multiple calendars, but only two of them are being backed up

Android version

16

Device brand and model

Google Pixel 8

Stock or custom OS?

Stock

Nextcloud android app version

3.34.1

Nextcloud server version

32.0.3

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

Additional information

I digged into the logs and found a DateTimeExeption while saving an event.
Sorry, didn't save / overwrote the log while repairing that buggy event. :-(

This exception aborted the whole backup and only the two calendars before the coruppted one where saved.
The reason is the following loop, that doesn't handle possible exceptions from class SaveCalendar:

Handling those excpetions could create an additional file "CalendarName-Timestamp-error.txt" with the message of that exception. So users can repair those buggy events.

Maybe, those exceptions should already be handled while saving those buggy events

So a backup file could be created for the calendar, that does not contain the buggy event(s), and the error file could list all events, that could not be saved. Because the events could be read before saving, the event details can be written to the error file, too.

Edit: After deleting that buggy event, all calendars get backed up again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions