Dan6erbond / jolt

The social hub for your media server. Rate, review and recommend movies and shows, as well as manage your watchlist, follow friends and more.
MIT License
166 stars 3 forks source link

Jolt is empty? DB error root #14

Closed Cebrain closed 1 year ago

Cebrain commented 1 year ago

Hey,

i wanted to check out the app but it is not working for me. The login works fine, but the app and pages are empty.

I think there is a problem with the database. I used nearly complete the default config:

    04/15/2023 11:01:41 AM
    PostgreSQL Database directory appears to contain a database; Skipping initialization
    04/15/2023 11:01:41 AM
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.682 UTC [1] LOG:  starting PostgreSQL 14.7 (Debian 14.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.683 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.683 UTC [1] LOG:  listening on IPv6 address "::", port 5432
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.700 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    04/15/2023 11:01:41 AM
    2023-04-15 09:01:41.773 UTC [27] LOG:  database system was shut down at 2023-04-10 19:35:22 UTC
    04/15/2023 11:01:42 AM
    2023-04-15 09:01:42.752 UTC [1] LOG:  database system is ready to accept connections
    04/15/2023 11:02:10 AM
    2023-04-15 09:02:10.860 UTC [41] FATAL:  role "root" does not exist
    04/15/2023 11:02:40 AM
    2023-04-15 09:02:40.990 UTC [51] FATAL:  role "root" does not exist
    04/15/2023 11:03:11 AM
    2023-04-15 09:03:11.132 UTC [60] FATAL:  role "root" does not exist
    04/15/2023 11:03:41 AM
    2023-04-15 09:03:41.279 UTC [69] FATAL:  role "root" does not exist
    04/15/2023 11:04:11 AM
    2023-04-15 09:04:11.404 UTC [79] FATAL:  role "root" does not exist
Dan6erbond commented 1 year ago

Hey. Can you provide some logs from Jolt? Currently the app doesn't show results on every page, but the latest release should yield results on the discover page.

Your feed will only show items, if someone else recommends media to you (or you use the playground to do it yourself).

Dan6erbond commented 1 year ago

You also might be running on an older version of Jolt. Try the develop tag if you want to verify that.

Cebrain commented 1 year ago

I did download the new release package or where would i need to put the develop tag? Sorry for the bad formatting

` ... 04/15/2023 11:44:29 AM

caller=fxevent/zap.go:152level=infomsg=startedts=1681551869.5801315

04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Handler: Actual request 04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Actual request no headers added: missing origin 04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Handler: Actual request 04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Actual request no headers added: missing origin 04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Handler: Actual request 04/15/2023 11:44:39 AM [cors] 2023/04/15 09:44:39 Actual response added headers: map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Origin:[*] Vary:[Origin]] 04/15/2023 11:44:39 AM

caller=graph/auth.resolvers.go:73elapsed=0.001102578error=record not foundlevel=errormsg=tracerows=0sql=SELECT * FROM "refresh_tokens" WHERE id = 4 AND "refresh_tokens"."deleted_at" IS NULL ORDER BY "refresh_tokens"."id" LIMIT 1stacktrace=github.com/dan6erbond/jolt-server/graph.(*mutationResolver).RefreshTokens /build/graph/auth.resolvers.go:73 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation_refreshTokens.func2 /build/graph/generated/generated.go:2503 github.com/99designs/gqlgen/graphql/executor.processExtensions.func4 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:72 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._fieldMiddleware /build/graph/generated/generated.go:1622 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation_refreshTokens /build/graph/generated/generated.go:2501 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation.func2 /build/graph/generated/generated.go:8651 github.com/99designs/gqlgen/graphql/executor.processExtensions.func3 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:69 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation /build/graph/generated/generated.go:8650 github.com/dan6erbond/jolt-server/graph/generated.(*executableSchema).Exec.func2 /build/graph/generated/generated.go:998 github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/executor.go:119 github.com/99designs/gqlgen/graphql/executor.processExtensions.func2 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:66 github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/executor.go:118 github.com/99designs/gqlgen/graphql/handler/transport.POST.Do /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/handler/transport/http_post.go:55 github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/handler/server.go:121 github.com/dan6erbond/jolt-server/pkg/auth.Middleware.func1.1 /build/pkg/auth/middleware.go:25 net/http.HandlerFunc.ServeHTTP /usr/local/go/src/net/http/server.go:2084 github.com/rs/cors.(*Cors).Handler.func1 /go/pkg/mod/github.com/rs/cors@v1.8.2/cors.go:231 net/http.HandlerFunc.ServeHTTP /usr/local/go/src/net/http/server.go:2084 github.com/gorilla/mux.(*Router).ServeHTTP /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 net/http.serverHandler.ServeHTTP /usr/local/go/src/net/http/server.go:2916 net/http.(*conn).serve /usr/local/go/src/net/http/server.go:1966ts=1681551879.873334

add caller=graph/auth.resolvers.go:73
add elapsed=0.001102578
add error=record not found
add level=error
add msg=trace
add rows=0
add sql=SELECT * FROM "refresh_tokens" WHERE id = 4 AND "refresh_tokens"."deleted_at" IS NULL ORDER BY "refresh_tokens"."id" LIMIT 1
add stacktrace=github.com/dan6erbond/jolt-server/graph.(*mutationResolver).RefreshTokens /build/graph/auth.resolvers.go:73 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation_refreshTokens.func2 /build/graph/generated/generated.go:2503 github.com/99designs/gqlgen/graphql/executor.processExtensions.func4 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:72 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._fieldMiddleware /build/graph/generated/generated.go:1622 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation_refreshTokens /build/graph/generated/generated.go:2501 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation.func2 /build/graph/generated/generated.go:8651 github.com/99designs/gqlgen/graphql/executor.processExtensions.func3 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:69 github.com/dan6erbond/jolt-server/graph/generated.(*executionContext)._Mutation /build/graph/generated/generated.go:8650 github.com/dan6erbond/jolt-server/graph/generated.(*executableSchema).Exec.func2 /build/graph/generated/generated.go:998 github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1.1 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/executor.go:119 github.com/99designs/gqlgen/graphql/executor.processExtensions.func2 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/extensions.go:66 github.com/99designs/gqlgen/graphql/executor.(*Executor).DispatchOperation.func1.1 /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/executor/executor.go:118 github.com/99designs/gqlgen/graphql/handler/transport.POST.Do /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/handler/transport/http_post.go:55 github.com/99designs/gqlgen/graphql/handler.(*Server).ServeHTTP /go/pkg/mod/github.com/99designs/gqlgen@v0.17.20/graphql/handler/server.go:121 github.com/dan6erbond/jolt-server/pkg/auth.Middleware.func1.1 /build/pkg/auth/middleware.go:25 net/http.HandlerFunc.ServeHTTP /usr/local/go/src/net/http/server.go:2084 github.com/rs/cors.(*Cors).Handler.func1 /go/pkg/mod/github.com/rs/cors@v1.8.2/cors.go:231 net/http.HandlerFunc.ServeHTTP /usr/local/go/src/net/http/server.go:2084 github.com/gorilla/mux.(*Router).ServeHTTP /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 net/http.serverHandler.ServeHTTP /usr/local/go/src/net/http/server.go:2916 net/http.(*conn).serve /usr/local/go/src/net/http/server.go:1966
add ts=1681551879.873334

`

jolt-app-1-2023-04-15T09-49-39.log.gz

Dan6erbond commented 1 year ago

Ah, thanks for the logs! That looks like a weird refresh tokens error. Since I just now published v0.5.2 could you flush your DB (just delete the Postgres volume) and redeploy? That should fix it!

The FATAL: role "root" does not exist error happens because of the healthcheck in my Docker compose, I have to fix that as well. 😅

Cebrain commented 1 year ago

Still same error. Do i need to download the new release package? About the TVDB Token, do i need to use the API Key v3 or the Read Access Token v4?

Dan6erbond commented 1 year ago

@Cebrain which version of Jolt are you deploying? The latest is v0.5.2.

Cebrain commented 1 year ago

I downloaded the latest package 0.5.2 and rebuild

jolt-app-1-2023-04-15T10-19-33.log.gz

Dan6erbond commented 1 year ago

Ohhh. I just realized the error probably has to do with a flushed DB.

I'll fix the error soon. In the meantime can you try clearing your localStorage/site data?

Cebrain commented 1 year ago

I deleted the ./.postgres folder, this should be enough?

Dan6erbond commented 1 year ago

I meant your browser data. You can click on the lock icon of the page URL, then remove all the site data.