Errors using CalDav with OpenID #1176

Open
opened 4 months ago by TheSander562 · 1 comments

Dear back again,
so got it up and running now with my OpenID account (seeing my 2 names)
Now trying to setup CalDav and created token. But the username to login is not correct i think, do i need my both names that is see in the top right corner, or the one that is in the link?

{"message":"Internal Server Error"}

Also getting this error in the api server on latest docker img:

2022-05-23T21:23:12.726919472Z: - 	▶ echo recover.go:113 [PANIC RECOVER] runtime error: invalid memory address or nil pointer dereference goroutine 1437 [running]:
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1.1(0x15f70f0, 0x1000, 0x0, 0x0, 0x178cc98, 0xc0004e48c0)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/recover.go:93 +0x6f0
panic(0x12a91a0, 0x1e252b0)
	/usr/local/go/src/runtime/panic.go:965 +0x1b9
code.vikunja.io/api/pkg/user.getTokensForKind(0xc0011ccdd0, 0x0, 0x4, 0x4c207265646e6153, 0x7468636572626d61, 0x73, 0x0, 0x1f0d5b0)
	/go/src/code.vikunja.io/api/pkg/user/token.go:98 +0x62
code.vikunja.io/api/pkg/user.GetCaldavTokens(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/code.vikunja.io/api/pkg/user/caldav_token.go:32 +0x8f
code.vikunja.io/api/pkg/routes/caldav.BasicAuth(0xc0005291a0, 0x11, 0xc0005291b2, 0x40, 0x178cc98, 0xc0004e48c0, 0x0, 0x0, 0x0)
	/go/src/code.vikunja.io/api/pkg/routes/caldav/auth.go:48 +0x14f
github.com/labstack/echo/v4/middleware.BasicAuthWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0x1, 0x1)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/basic_auth.go:85 +0x1c3
github.com/labstack/echo/v4.(*Echo).add.func1(0x178cc98, 0xc0004e48c0, 0x401, 0x400)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:520 +0x62
github.com/labstack/echo/v4/middleware.CORSWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0xc000245900, 0x203000)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/cors.go:110 +0x178d
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0x0, 0x0)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/recover.go:119 +0x152
github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1(0x178cc98, 0xc0004e48c0, 0x0, 0x0)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/logger.go:117 +0x12c
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc0005d5680, 0x1771ca8, 0xc00088a700, 0xc0008dc300)
	/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:630 +0x2bc
net/http.serverHandler.ServeHTTP(0xc00014c0e0, 0x1771ca8, 0xc00088a700, 0xc0008dc300)
	/usr/local/go/src/net/http/server.go:2887 +0xa3
net/http.(*conn).serve(0xc0004f8dc0, 0x1775768, 0xc0008ba800)
	/usr/local/go/src/net/http/server.go:1952 +0x8cd
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x39b
goroutine 1 [chan receive, 25 minutes]:
code.vikunja.io/api/pkg/cmd.glob..func2(0x1e36180, 0x1f0d5b0, 0x0, 0x0)
	/go/src/code.vikunja.io/api/pkg/cmd/web.go:102 +0x1dd
github.com/spf13/cobra.(*Command).execute(0x1e36180, 0xc0001101f0, 0x0, 0x0, 0x1e36180, 0xc0001101f0)
	/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x1e36180, 0xc000000180, 0x200000003, 0xc000000180)
	/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
code.vikunja.io/api/pkg/cmd.Execute()
	/go/src/code.vikunja.io/api/pkg/cmd/cmd.go:44 +0x31
main.main()
	/go/src/code.vikunja.io/api/main.go:22 +0x25
goroutine 6 [select, 25 minutes]:
database/sql.(*DB).connectionOpener(0xc0005605b0, 0x17756c0, 0xc0004c0540)
	/usr/local/go/src/database/sql/sql.go:1133 +0xb5
created by database/sql.OpenDB
	/usr/local/go/src/database/sql/sql.go:740 +0x12a
goroutine 52 [chan receive, 25 minutes]:
github.com/ThreeDotsLabs/watermill/message.(*handler).handleClose(0xc000596960)
	/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:573 +0x3f
created by github.com/ThreeDotsLabs/watermill/message.(*handler).run
	/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:468 +0x265
goroutine 51 [chan receive, 25 minutes]:
github.com/ThreeDotsLabs/watermill/message.(*handler).handleClose(0xc000596fa0)
	/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:573 +0x3f
created by github.com/ThreeDotsLabs/watermill/message.(*handler).run
	/go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:468 +0x265
goroutine 1442 [select]:
github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1(0xc000321bc0, 0xc0008bed80, 0xc000529440)
	/go/pkg/mod/github.com/go-sql-driver/mys
Dear back again, so got it up and running now with my OpenID account (seeing my 2 names) Now trying to setup CalDav and created token. But the username to login is not correct i think, do i need my both names that is see in the top right corner, or the one that is in the link? ``` {"message":"Internal Server Error"} ``` Also getting this error in the api server on latest docker img: ``` 2022-05-23T21:23:12.726919472Z: - ▶ echo recover.go:113 [PANIC RECOVER] runtime error: invalid memory address or nil pointer dereference goroutine 1437 [running]: github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1.1(0x15f70f0, 0x1000, 0x0, 0x0, 0x178cc98, 0xc0004e48c0) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/recover.go:93 +0x6f0 panic(0x12a91a0, 0x1e252b0) /usr/local/go/src/runtime/panic.go:965 +0x1b9 code.vikunja.io/api/pkg/user.getTokensForKind(0xc0011ccdd0, 0x0, 0x4, 0x4c207265646e6153, 0x7468636572626d61, 0x73, 0x0, 0x1f0d5b0) /go/src/code.vikunja.io/api/pkg/user/token.go:98 +0x62 code.vikunja.io/api/pkg/user.GetCaldavTokens(0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /go/src/code.vikunja.io/api/pkg/user/caldav_token.go:32 +0x8f code.vikunja.io/api/pkg/routes/caldav.BasicAuth(0xc0005291a0, 0x11, 0xc0005291b2, 0x40, 0x178cc98, 0xc0004e48c0, 0x0, 0x0, 0x0) /go/src/code.vikunja.io/api/pkg/routes/caldav/auth.go:48 +0x14f github.com/labstack/echo/v4/middleware.BasicAuthWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0x1, 0x1) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/basic_auth.go:85 +0x1c3 github.com/labstack/echo/v4.(*Echo).add.func1(0x178cc98, 0xc0004e48c0, 0x401, 0x400) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:520 +0x62 github.com/labstack/echo/v4/middleware.CORSWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0xc000245900, 0x203000) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/cors.go:110 +0x178d github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1(0x178cc98, 0xc0004e48c0, 0x0, 0x0) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/recover.go:119 +0x152 github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1(0x178cc98, 0xc0004e48c0, 0x0, 0x0) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/logger.go:117 +0x12c github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc0005d5680, 0x1771ca8, 0xc00088a700, 0xc0008dc300) /go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:630 +0x2bc net/http.serverHandler.ServeHTTP(0xc00014c0e0, 0x1771ca8, 0xc00088a700, 0xc0008dc300) /usr/local/go/src/net/http/server.go:2887 +0xa3 net/http.(*conn).serve(0xc0004f8dc0, 0x1775768, 0xc0008ba800) /usr/local/go/src/net/http/server.go:1952 +0x8cd created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3013 +0x39b goroutine 1 [chan receive, 25 minutes]: code.vikunja.io/api/pkg/cmd.glob..func2(0x1e36180, 0x1f0d5b0, 0x0, 0x0) /go/src/code.vikunja.io/api/pkg/cmd/web.go:102 +0x1dd github.com/spf13/cobra.(*Command).execute(0x1e36180, 0xc0001101f0, 0x0, 0x0, 0x1e36180, 0xc0001101f0) /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860 +0x2c2 github.com/spf13/cobra.(*Command).ExecuteC(0x1e36180, 0xc000000180, 0x200000003, 0xc000000180) /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902 code.vikunja.io/api/pkg/cmd.Execute() /go/src/code.vikunja.io/api/pkg/cmd/cmd.go:44 +0x31 main.main() /go/src/code.vikunja.io/api/main.go:22 +0x25 goroutine 6 [select, 25 minutes]: database/sql.(*DB).connectionOpener(0xc0005605b0, 0x17756c0, 0xc0004c0540) /usr/local/go/src/database/sql/sql.go:1133 +0xb5 created by database/sql.OpenDB /usr/local/go/src/database/sql/sql.go:740 +0x12a goroutine 52 [chan receive, 25 minutes]: github.com/ThreeDotsLabs/watermill/message.(*handler).handleClose(0xc000596960) /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:573 +0x3f created by github.com/ThreeDotsLabs/watermill/message.(*handler).run /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:468 +0x265 goroutine 51 [chan receive, 25 minutes]: github.com/ThreeDotsLabs/watermill/message.(*handler).handleClose(0xc000596fa0) /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:573 +0x3f created by github.com/ThreeDotsLabs/watermill/message.(*handler).run /go/pkg/mod/github.com/!three!dots!labs/watermill@v1.1.1/message/router.go:468 +0x265 goroutine 1442 [select]: github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1(0xc000321bc0, 0xc0008bed80, 0xc000529440) /go/pkg/mod/github.com/go-sql-driver/mys ```
konrad added the
kind/bug
label 4 months ago
Owner

Did you use the username shown with the token?

Did you use the username shown with the token?
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/api#1176
Loading…
There is no content yet.