The basics
Nextcloud Server version:
30.0.12.2
Operating system and version:
AOSP, where adb shell getprop returns:
[ro.build.version.release]: [15]
[ro.build.display.id]: [FP5.VT2D.C.054.20250814]
Reverse proxy and version:
⪆ nginx/1.18.0
Is this the first time you’ve seen this error?
No.
When did this problem seem to first start?
2022-05-17.
Installation method:
I utilise a provider: [wim.nl.]tab.digital.
Are you using CloudFlare, mod_security, or similar?
Not that I see.
Summary of the issue you are facing
≈ versionCode=405040005 of at.bitfire.davdroid reports HTTP 400 ⪆ PT6M subsequent to addition of the account, when accessing a text/calendar file stored in a NextCloud (version: 30.0.12.2) instance’s remote.php/dav/calendars:
I want to report this an issue there, but need to confirm that this isn’t a fault of NextCloud’s first. If I learn that it is, that also saves me needing to transfer the issue.
Steps to replicate it
Merely poll the server, via CalDAV and CardDAV:
Web Browser Log entries
When I visit it now , I merely see:
{"error":"Strict Cookie has not been found in request"}
…and, upon location.reload():
16:26:52.438 GET
https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/47b29e62-1c12-497d-936f-55480815b63b.ics
[HTTP/2 412 63ms]
With the headers and cookies removed, the HAR is:
{
"log": {
"version": "1.2",
"creator": {
"name": "Firefox",
"version": "143.0.3"
},
"browser": {
"name": "Firefox",
"version": "143.0.3"
},
"pages": [
{
"id": "page_1",
"pageTimings": {
"onContentLoad": 91,
"onLoad": 118
},
"startedDateTime": "2025-10-08T16:26:52.438+01:00",
"title": "https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/47b29e62-1c12-497d-936f-55480815b63b.ics"
}
],
"entries": [
{
"startedDateTime": "2025-10-08T16:26:52.438+01:00",
"request": {
"bodySize": 0,
"method": "GET",
"url": "https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/47b29e62-1c12-497d-936f-55480815b63b.ics",
"httpVersion": "HTTP/2",
"queryString": [],
"headersSize": 889
},
"response": {
"status": 412,
"statusText": "",
"httpVersion": "HTTP/2",
"content": {
"mimeType": "application/vnd.mozilla.json.view",
"size": 55,
"encoding": "base64",
"text": "eyJlcnJvciI6IlN0cmljdCBDb29raWUgaGFzIG5vdCBiZWVuIGZvdW5kIGluIHJlcXVlc3QifQ=="
},
"redirectURL": "",
"headersSize": 1278,
"bodySize": 1333
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 0,
"ssl": 0,
"send": 0,
"wait": 63,
"receive": 0
},
"time": 63,
"_securityState": "secure",
"serverIPAddress": "104.21.3.117",
"connection": "443",
"pageref": "page_1"
}
]
}
}
jtr
October 8, 2025, 8:30pm
2
In the debug zip file from the linked discussion I saw this, which has more details on the 400 reason:
HTTP REQUEST
Request{method=PUT, url=https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/95e32c5d-ef67-4611-9c7d-920386eea6de.ics, headers=[If-None-Match:*, User-Agent:DAVx5/4.5.3-ose (dav4jvm; okhttp/5.1.0) Android/15, Accept-Language:en-GB, en;q=0.7, *;q=0.5, Accept-Encoding:br,gzip, Authorization:██]}
[...snip]
HTTP RESPONSE
Response{protocol=h2, code=400, message=, url=https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/95e32c5d-ef67-4611-9c7d-920386eea6de.ics}
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>Calendar object with uid already exists in this calendar collection.</s:message>
</d:error>
1 Like
@jtr , thank you! That at least correlates this with:
Calendar object with uid already exists in this calendar collection.
Calendar object with uid already exists in this calendar collection.
bugs.kde.org/show_bug.cgi?id=406917#c0
bugzilla.mozilla.org/show_bug.cgi?id=1717401#c12
Deleted calendar object with uid already exists in this calendar collection.
Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection.
Sabre\DAV\Exception\BadRequest: Calendar object with uid already exists in this calendar collection.
Deleted calendar object with uid already exists in this calendar collection.
If so, this might be mitigated with:
opened 03:05PM - 03 Oct 19 UTC
1. to develop
enhancement
Feature: Importing
- Before importing, send request with all UIDs to the server. (or maybe not all … but 50 at a time)
- If it doesn't give a 404, parse the calendar-data from the server and compare the LAST-MODIFIED and SEQUENCE-properties of both.
- If the version, the user wishes to import, is newer, update the event on the server.
<bountysource-plugin>
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/81351964-import-check-if-uid-already-exists-check-which-one-is-newest-and-update-if-necessary?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F45525646&utm_medium=issues&utm_source=github).
</bountysource-plugin>
However, they stipulate that the current verification mechanism is intra-calendar.
I have filed an issue with DAVx5, because I’ve little reason to believe that this is NextCloud’s fault, and I really do want this diagnosed:
opened 06:09PM - 16 Oct 25 UTC
bug
### Problem scope
- [x] I'm sure that this is a DAVx⁵ problem.
### App version…
- [x] I'm using the latest available DAVx⁵ version.
### Android version and device/firmware type
1. #### The OS
> ~~~YAML
> [ro.build.version.release]: [15]
> [ro.build.display.id]: [FP5.VT2E.C.059.20250908]
> ~~~
1. #### The Device
> ~~~YAML
> [ro.product.brand]: [Fairphone]
> [ro.build.product]: [FP5]
> ~~~
### Steps to reproduce
To reproduce it, merely synchronise:
https://github.com/user-attachments/assets/141c9dcc-9269-4129-816c-ffa6b0e52ba8
Visiting the URI ([`https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/47b29e62-1c12-497d-936f-55480815b63b.ics`](https://wim.nl.tab.digital/remote.php/dav/calendars/rokejulianlockhart/3de72895-d345-4ac4-8eec-1418e857ba7e/47b29e62-1c12-497d-936f-55480815b63b.ics)) in `firefox-142.0-1.fc42`, I see a 404 equivalent:
<p></p><img width="1279" height="689" alt="@{'Date'='20250904T224452+0100'; 'Type'='Photo'; 'Origin'='Nextcloud — Mozilla Firefox'}#" src="https://github.com/user-attachments/assets/4e6cb6c3-21bb-470e-a1f6-4029d782ecdc" /><p></p>
### Actual result
(At least ⪅ `versionCode=405040005`) reports HTTP 400 ⪅ P6M subsequent to addition of the account, when accessing a `text/calendar` file stored in a NextCloud instance (`version: 30.0.12.2`)'s `remote.php/dav/calendars`.
A temporary solution appears to be removal, then re-addition, of the affected account from `com.nextcloud.android.beta/com.owncloud.android.ui.activity.ManageAccountsActivity`. [^discussioncomment-2803653] However, it solely remediates it for ⪅ P6M, so I want to ascertain what the cause and solution are. [^discussioncomment-14312040] Additionally, ascertaining whether that method continues to remediate this is difficult:
1. ...because it removes my ability to diagnose the fault until it recurs.
1. ...due to the quantity of accounts added:
<p></p><details><p></p><img width="1224" height="2700" alt="Screenshot_20250904-225837" src="https://github.com/user-attachments/assets/8ef100a7-c3bc-489b-8aa7-c9b50bff2577" /><p></p></details><p></p>
[^discussioncomment-14312040]: [`discussions/43#discussioncomment-14312040`](https://github.com/bitfireAT/davx5-ose/discussions/43#discussioncomment-14312040)
[^discussioncomment-2803653]: [`discussions/43#discussioncomment-2803653`](https://github.com/bitfireAT/davx5-ose/discussions/43#discussioncomment-2803653)
### Expected result
Because I have little reason to expect such an error, [^NotNC] I doubt that I should see one.
[^NotNC]: [`nextcloud/calendar/issues/1508#issuecomment-3410869786`](https://github.com/nextcloud/calendar/issues/1508#issuecomment-3410869786)
### Further info
#### Diagnosis
[`davx5-debug.zip`](https://github.com/user-attachments/files/22155126/davx5-debug.zip) provides the error, alongside relevant diagnostic information, including my environment. Per the debug log, this might relate to [`issues/3333`](https://github.com/tasks/tasks/issues/3333#issuecomment-3255891626). It doesn't appear to reproduce as [`discussions/377#discussioncomment-6708873`](https://github.com/bitfireAT/davx5-ose/discussions/377#discussioncomment-6708873) does. Similarly, my environment differs to what [`discussions/912#discussion-6938458`](https://github.com/bitfireAT/davx5-ose/discussions/912#discussion-6938458) describes.
By utilising [`android.stackexchange.com/questions/203868#comment356748_247052`](https://android.stackexchange.com/questions/203868/how-to-view-network-traffic-requested-by-a-specific-app#comment356748_247052:~:text=With-,PCAPdroid,-you%20can%20see), I tracked:
<blockquote>
~~~YAML
Name: DAVx⁵
Package name: at.bitfire.davdroid
UID: 10219
Version: 4.5.4-ose
Target SDK: 36
Installed on: 04/24/24 19:22:22
Last update: 09/20/25 16:15:00
Traffic: 34.6 KB received — 22.1 KB sent
Connections: 5
~~~
</blockquote>
...during which it reproduced. If the resultant `.pcap` is of use, I shall provide it. [^Drive]
[^Drive]: [`drive.google.com/drive/folders/1FZQZpzOMtnuJB2sHOi8j7wC-Oxoa5bFS`](https://drive.google.com/drive/folders/1FZQZpzOMtnuJB2sHOi8j7wC-Oxoa5bFS?usp=sharing)