Closed janareddyc7 closed 11 months ago
when i try to go to dashboard it says tRPC failed and routes me to login page
Hi! By the looks of it you're not logged in when accessing that route. Did you properly configure the Google OAuth credentials and try signing in?
ya i did
@quenti/next:dev: ❌ tRPC failed on recent.get: UNAUTHORIZED @quenti/next:dev: ○ Compiling /api/auth/[...nextauth] ... @quenti/next:dev: ✓ Compiled /api/auth/[...nextauth] in 4.6s (4910 modules) @quenti/next:dev: Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter? @quenti/next:dev: ○ Compiling /auth/login ... @quenti/next:dev: ✓ Compiled /auth/login in 5.9s (5141 modules) @quenti/next:dev: ○ Compiling /api/trpc/[trpc] ... @quenti/next:dev: ✓ Compiled /api/trpc/[trpc] in 2.3s (2604 modules) @quenti/next:dev: ❌ tRPC failed on recent.get: UNAUTHORIZED @quenti/next:dev: ✓ Compiled in 5.3s (5478 modules)
It shows the skeleton loader on the dashboard then automaticly takes me in to the login page
is there any solution
Also why the env folder in packages contains a lot optional things
I think I know what your issue might be. If you set up your oauth credentials properly, make sure you have a mysql database running and run yarn prisma db:push
from the root directory. If NextAuth can't save your credentials to db it'll always throw unauthorized.
i use planetscale i already did that let me try again
Also why the env folder in packages contains a lot optional things
There's a lot of other services Quenti relies on that technically won't prevent the app from starting. Cohere, Huggingface, R2, Resend and others are all optional but you'll have trouble using parts of the app that rely on them. https://github.com/quenti-io/quenti/issues/222#issuecomment-1793790236
i think hugginface is paid
i think hugginface is paid
Right, which is why Quenti isn't all that useful in a local environment unless you're willing to pay all of the infra costs
thanks
what should the env values be for these SERVER_NAME USERS_BUCKET_NAME: USERS_BUCKET_URL: ASSETS_BUCKET_NAME: ASSETS_BUCKET_URL: ENABLE_EMAIL_WHITELIST:
GRAFANA_DASHBOARD_URL: STRIPE_ORG_MONTHLY_PRICE_ID: CLICKHOUSE_HOST: CLICKHOUSE_USER: CLICKHOUSE_PASSWORD
where do you get thesse values
Currently undocumented, I'll address these briefly and close the issue since this is out of scope. You can create another issue if you'd like to request documentation, or open a discussion.
SERVER_NAME
- used to distinguish between production and staging envs on vercel
USERS_BUCKET_NAME
- the name of the Cloudflare R2 bucket used for storing user assets (profile pictures, etc.)
USERS_BUCKET_URL
- url of the users bucket
ASSETS_BUCKET_NAME
- name of the r2 bucket for assets (org images, classes, term assets)
ASSETS_BUCKET_URL
- url of assets bucket
ENABLE_EMAIL_WHITELIST
- optionally enable an email whitelist to prevent external signups
GRAFANA_DASHBOARD_URL
- grafana dashboard url
STRIPE_ORG_MONTHLY_PRICE_ID
- stripe price id for a monthly subscription
all of the clickhouse env vars should be self explanatory
tRPC failed on recent.get: UNAUTHORIZED@quenti/next:dev: ❌ tse the ref parameter? RPC failed on recent.get: UNAUTHORIZED
do you know how to fix it