CalDAV fails with "user is not user element, is *user.User" #157

Closed
opened 2020-03-31 14:44:10 +00:00 by deanishe · 5 comments

[caldav]

Vikunja api version 0.11+13-7b619bd084

Trying to connect Vikunja to my iPhone via CalDAV, I get the error:

#033[31m2020-03-31T14:37:07.568011969Z: ERROR#011▶ caldav/PrincipalHandler 008#033[0m [user is not user element, is *user.User]

Below is the full log of the request.

2020-03-31T14:37:07.299321343Z: WEB #011▶ 37.201.229.97  PROPFIND 401 /dav/principals/dean/ 72.717µs - iOS/13.4 (17E255)
accountsd/1.0
[xorm] [debug] 2020/03/31 14:37:07.377367 [cacheGet] find sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1[dean]
[xorm] [debug] 2020/03/31 14:37:07.377394 [redis_cacher]  GetIds|tableName:users|sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1-[dean]|key:xorm:sql:users:3380042290
[xorm] [debug] 2020/03/31 14:37:07.379132 [cacheGet] cache ids:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1[[1]]
[xorm] [debug] 2020/03/31 14:37:07.379178 [redis_cacher] PutIds|tableName:users|sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1-[dean]|key:xorm:sql:users:3380042290|obj:#015#002#001#002
#001
#020#002#001#001#002PK#001
#001#020
#017
#001#001#005int64#004#002
#002|type:string
[xorm] [debug] 2020/03/31 14:37:07.379188 [redis_cacher] registerGobConcreteType:string
[xorm] [debug] 2020/03/31 14:37:07.379194 [redis_cacher] serialize type:string
[xorm] [debug] 2020/03/31 14:37:07.379206 [cacheGet] get bean:users[1]
[xorm] [debug] 2020/03/31 14:37:07.379217 [redis_cacher] [xorm/redis_cacher] GetBean|tableName:users|id:#020#002#001#001#002PK#001
#001#020
#016
#001#005int64#004#002
#002|key:xorm:bean:users:#020#002#001#001#002PK#001
#001#020
#016
#001#005int64#004#002
#002
[xorm] [debug] 2020/03/31 14:37:07.383394 [cacheGet] cache bean:users[1] &{1 dean $2a$11$<snip>. <snip>@<snip>.com true   1582314592 1582314617 <nil>}
[xorm] [debug] 2020/03/31 14:37:07.383415 [redis_cacher] PutBean|tableName:users|id:#020#002#001#001#002PK#001
#001#020
#016
#001#005int64#004#002
#002|key:xorm:bean:users:#020#002#001#001#002PK#001
#001#020
#016
#001#005int64#004#002
#002|type:*user.User
[xorm] [debug] 2020/03/31 14:37:07.383426 [redis_cacher] registerGobConcreteType:*user.User
[xorm] [debug] 2020/03/31 14:37:07.383440 [redis_cacher] serialize type:*user.User
#033[31m2020-03-31T14:37:07.568011969Z: ERROR#011▶ caldav/PrincipalHandler 008#033[0m [user is not user element, is *user.User]
[user is not user element, is *user.User]
2020-03-31T14:37:07.569252077Z: WEB #011▶ 37.201.229.97  PROPFIND 500 /dav/principals/dean/ 191.997801ms - iOS/13.4 (17E255) accountsd/1.0
[caldav] ``` Vikunja api version 0.11+13-7b619bd084 ``` Trying to connect Vikunja to my iPhone via CalDAV, I get the error: ``` #033[31m2020-03-31T14:37:07.568011969Z: ERROR#011▶ caldav/PrincipalHandler 008#033[0m [user is not user element, is *user.User] ``` Below is the full log of the request. ``` 2020-03-31T14:37:07.299321343Z: WEB #011▶ 37.201.229.97 PROPFIND 401 /dav/principals/dean/ 72.717µs - iOS/13.4 (17E255) accountsd/1.0 [xorm] [debug] 2020/03/31 14:37:07.377367 [cacheGet] find sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1[dean] [xorm] [debug] 2020/03/31 14:37:07.377394 [redis_cacher] GetIds|tableName:users|sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1-[dean]|key:xorm:sql:users:3380042290 [xorm] [debug] 2020/03/31 14:37:07.379132 [cacheGet] cache ids:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1[[1]] [xorm] [debug] 2020/03/31 14:37:07.379178 [redis_cacher] PutIds|tableName:users|sql:SELECT `id` FROM `users` WHERE `username`=? LIMIT 1-[dean]|key:xorm:sql:users:3380042290|obj:#015#002#001#002 #001 #020#002#001#001#002PK#001 #001#020 #017 #001#001#005int64#004#002 #002|type:string [xorm] [debug] 2020/03/31 14:37:07.379188 [redis_cacher] registerGobConcreteType:string [xorm] [debug] 2020/03/31 14:37:07.379194 [redis_cacher] serialize type:string [xorm] [debug] 2020/03/31 14:37:07.379206 [cacheGet] get bean:users[1] [xorm] [debug] 2020/03/31 14:37:07.379217 [redis_cacher] [xorm/redis_cacher] GetBean|tableName:users|id:#020#002#001#001#002PK#001 #001#020 #016 #001#005int64#004#002 #002|key:xorm:bean:users:#020#002#001#001#002PK#001 #001#020 #016 #001#005int64#004#002 #002 [xorm] [debug] 2020/03/31 14:37:07.383394 [cacheGet] cache bean:users[1] &{1 dean $2a$11$<snip>. <snip>@<snip>.com true 1582314592 1582314617 <nil>} [xorm] [debug] 2020/03/31 14:37:07.383415 [redis_cacher] PutBean|tableName:users|id:#020#002#001#001#002PK#001 #001#020 #016 #001#005int64#004#002 #002|key:xorm:bean:users:#020#002#001#001#002PK#001 #001#020 #016 #001#005int64#004#002 #002|type:*user.User [xorm] [debug] 2020/03/31 14:37:07.383426 [redis_cacher] registerGobConcreteType:*user.User [xorm] [debug] 2020/03/31 14:37:07.383440 [redis_cacher] serialize type:*user.User #033[31m2020-03-31T14:37:07.568011969Z: ERROR#011▶ caldav/PrincipalHandler 008#033[0m [user is not user element, is *user.User] [user is not user element, is *user.User] 2020-03-31T14:37:07.569252077Z: WEB #011▶ 37.201.229.97 PROPFIND 500 /dav/principals/dean/ 191.997801ms - iOS/13.4 (17E255) accountsd/1.0 ```
Owner

Can confirm this is reproducable on my local env, I'll take a look.

Can confirm this is reproducable on my local env, I'll take a look.
Owner

I've pushed a fix in 11246b948f please test again. A release will be ready in a few minutes, once ci is done.

I've pushed a fix in https://kolaente.dev/vikunja/api/commit/11246b948fd98b0b319660b81f65a0804ce15efc please test again. A release will be ready in a few minutes, once [ci is done](https://drone.kolaente.de/vikunja/api/1129/2/1).
Author

Thanks. The error is gone, and I can add the Vikunja account successfully.

Unfortunately, it doesn't work with Reminders.app or BusyCal.app on iOS (13) or macOS (10.13/High Sierra) 😕

Thanks. The error is gone, and I can add the Vikunja account successfully. Unfortunately, it doesn't work with Reminders.app or BusyCal.app on iOS (13) or macOS (10.13/High Sierra) :confused:
Owner

Anything in the logs which may indicate why it does not work?

Do you want to open a new issue about that?

Anything in the logs which may indicate why it does not work? Do you want to open a new issue about that?
Author

I'll look into it more closely tomorrow. It's throwing a lot of 405s for the PROPPATCH method on /dav/lists/N, but I've no idea what the client is trying to achieve with that.

At any rate, the clients retrieve the lists themselves, but not the tasks. I can also add a task successfully from Reminders.app, and it appears on Vikunja, but it disappears from Reminders.app more or less immediately :(

Thanks again for the super-fast help.

I'll look into it more closely tomorrow. It's throwing a lot of `405`s for the `PROPPATCH` method on `/dav/lists/N`, but I've no idea what the client is trying to achieve with that. At any rate, the clients retrieve the lists themselves, but not the tasks. I can also add a task successfully from Reminders.app, and it appears on Vikunja, but it disappears from Reminders.app more or less immediately :( Thanks again for the super-fast help.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#157
No description provided.