Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.22k stars 424 forks source link

Bad Request 400 #847

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi

Since I updated my ArchLinux ARM Server I have a problem with Bad Request 400.

I realised it later so I can't reproduce it. I don't even know what I updated or when the problem started. It was working before without any problems.

Every time if I wanna add a Contact to my Android Phone (or CardBook) - with Davdroid and Android Version 8.1.0 I get the following error:

HTTP REQUEST: Request{method=PUT, url=http://192.168.1.xx:5232/user/50bc3f12-1b10-47cf-0ee6-72b18541ed39/ab3b3246-920b-42a3-9cbd-c6321a7cfdab.vcf, tag=null} BEGIN:VCARD VERSION:3.0 PRODID:+//IDN bitfire.at//DAVdroid/1.11.5-ose ez-vcard/0.10.4 UID:ab3b3246-920b-42a3-9cbd-c6321a7cfdab FN:Name N:Name TEL;TYPE=cell:Number EMAIL:name@provider.com BDAY:day REV:2018-07-17T10:07:47Z END:VCARD HTTP RESPONSE: Response{protocol=http/1.1, code=400, message=Bad Request, url=http://192.168.1.76:5232/user/50bc3f12-1b10-47cf-0ee6-72b18541ed39/ab3b3246-920b-42a3-9cbd-c6321a7cfdab.vcf} Bad Request

On CardBook 2018.07.18 13:26:31:146 : User : Contact Name failed to be created on server (url : http://192.168.1.76:5232/user/50bc3f12-1b10-47cf-0ee6-72b18541ed39/0f2b56d0-e754-4fa9-af2d-e2deb0d8c782.vcf, status : 400)

Sometimes it is working when I add a new contact. All my calendar and todos are working. It's so weird. I can't find the problem.

systemctl status radicale WARNING: Bad PUT request on '/user/50bc3f12-1b10-47cf-0ee6-72b18541ed39/2b2000b7-a0f9-486f-92ce-c210c9680fe5.vcf': At line 8: In transformToNative, unhandled exception on line 8: In transformToNative, unhandled exception on line 8: <class 'ValueError'>: invalid literal for int() with base 10: '7-' (<REV{}2018-07-18T01:27:14Z>)

I tried vCard 3 and 4.

Hm...

Arvedui commented 5 years ago

This is an issue with current vobject not with radicale. Just downgrade python-vobject to version 0.9.5.

This issue is tracked in eventable/vobject#120

ghost commented 5 years ago

Thank you very much. That solved the problem.

Edit I leave it open until the updates are fixed.

wpercy commented 5 years ago

Should be resolved in vObject 0.9.6.1

ghost commented 5 years ago

Hey

Just tried the new version again ( I had it installed before i guess). Not working. python-vobject-0.9.5-4 is working for me.

mattconnell commented 5 years ago

Affected by the vobject bug here as well.

In the hopes that some other wandering soul may find this, the Gentoo ebuild for Radicale 2.1.10 specifies vobject 0.9.6, which means if you update to that version you're affected by this as well.

I simply downgraded Radicale to 2.1.8 (the previous version available via portage) and vobject to 0.9.5 and that solved my issues.

dagbdagb commented 5 years ago

@ArchbishopFlabrus thanks. Useful info indeed.

potuz commented 5 years ago

Has this really been solved in vobject 0.9.6.1? I am running Radicale-2.1.10, vobject-0.9.6.1 and python-dateutil-2.7.5 on Gentoo and hit this Bad Request with Davdroid 2.2.2

mattconnell commented 5 years ago

Has this really been solved in vobject 0.9.6.1? I am running Radicale-2.1.10, vobject-0.9.6.1 and python-dateutil-2.7.5 on Gentoo and hit this Bad Request with Davdroid 2.2.2

I upgraded to those three versions tonight and I am not experiencing the issue anymore.

download13 commented 1 month ago

This has popped back up for me in version 3.2.1.0.

Bad PUT request on '[calendarPathCensored]' (read_components): At line 5: In transformToNative, unhandled exception on line 5: <class 'AttributeError'>: 'datetime.date' object has no attribute 'tzinfo' (<CREATED{'VALUE': ['DATE']}20240528>)

EDIT: Only happens when importing via thunderbird. My android calendar app imports just fine.

EDIT2: attaching the ics file that caused it.

BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
CALSCALE:GREGORIAN
PRODID:-//WordPress - MECv6.5.6//EN
X-ORIGINAL-URL:https://www.350spokane.org/
X-WR-CALNAME:350 Spokane
X-WR-CALDESC:Community action in Spokane for a safe, just climate
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VEVENT
CLASS:PUBLIC
UID:MEC-39b8f721582654655a6999aabe905204@350spokane.org
DTSTART:20240612T003000Z
DTEND:20240612T020000Z
DTSTAMP:20240529T051700Z
CREATED:20240528
LAST-MODIFIED:20240603
PRIORITY:5
TRANSP:OPAQUE
SUMMARY:Expo +50 Town Hall – The Future of Sustainability and Resilience in Spokane
DESCRIPTION:Join a panel of local experts on Tuesday, June 11th at the South Hill Library as they\ndiscuss the future of sustainability and resilience in Spokane.\nModerator: Larry Luton, 350 Spokane activist\nPanel:\n\nProfessor Brian Henning, Director and Founder of Gonzaga’s Institute for Climate, Water and the Environment\nProfessor Margo Hill, Associate Professor in the EWU Planning Program and member of the Spokane Tribe\nElyse Hochstadt, Spokane Zero Waste\nDr. Matt Hollon, UW Medical School and Rockwood Multicare\nNaghmana Sherazi, The Lands Council, Climate Justice Program Director and Board Member of 350 Spokane, a climate action nonprofit\nKelly Thomas, Operations Manager for Mayor Lisa Brown and organizer of the Mayor’s Resilience Team\n\n \nLearn more about the City of Spokane’s Sustainability Action Plan ( https://my.spokanecity.org/bcc/committees/public-infrastructure-environment-and-sustainability/sustainability-action-subcommittee/ ).\n
URL:https://www.350spokane.org/events/expo-50-town-hall/
LOCATION:3324 S Perry St, Spokane, WA 99203
ATTACH;FMTTYPE=image/jpeg:https://i0.wp.com/www.350spokane.org/wp-content/uploads/2024/05/Expo50-Town-Hall-Poster.jpg?fit=1545%2C2000&#038;ssl=1
END:VEVENT
END:VCALENDAR
pbiering commented 1 month ago

Problem:

`datetime.date' object has no attribute 'tzinfo' (<CREATED{'VALUE': ['DATE']}20240528>

problematic line is

CREATED:20240528

Assumed item was created by

PRODID:-//WordPress - MECv6.5.6//EN

to my knowledge vobject (which is parsing an item) has less/zero support for all the broken clients around...so one has to fix the unit which creates broken items.