Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to signup when running app locally #450

Closed
chrisg220 opened this issue Oct 19, 2024 · 5 comments · May be fixed by #732
Closed

Failing to signup when running app locally #450

chrisg220 opened this issue Oct 19, 2024 · 5 comments · May be fixed by #732

Comments

@chrisg220
Copy link

I am seeking help debugging my authentication error for the ai-chatbot template app so that I can login and play with the example chatbot application. However, I'm failing to even create a user via the UI login page.

I followed every step of the README. I renamed .env.example to .env.local and inserted my private keys for OPENAI_API_KEY, AUTH_SECRET, BLOB_READ_WRITE_TOKEN, and POSTGRES_URL. I have the app running locally on localhost:3000. I am trying to sign up by filling in an email address and password. But when I press sign up, I get the following errors in the console.

// console output

pnpm dev

> [email protected] dev /Users/christophergonzales/Projects/ai-chatbot
> next dev --turbo

  ▲ Next.js 15.0.0-canary.152 (turbo)
  - Local:        http://localhost:3000
  - Environments: .env.local

 ✓ Starting...
 ✓ Compiled in 271ms
 ✓ Ready in 990ms
 ○ Compiling /register ...
 ✓ Compiled /register in 2.5s
 GET /register 200 in 2776ms
Failed to get user from database
 POST /register 200 in 260ms
Screenshot 2024-10-18 at 6 02 21 PM
@chrisg220
Copy link
Author

I got this to work by manually migrating and building (shown below), and then re-starting the app.

tsx db/migrate && next build

I believe I followed all the steps correctly in the README, so I expected it to work when I started the app. I just wanted to follow up with my resolution in case:

  1. this is a "missing step" in the README
  2. I actually did something out of order, and anyone else who does can learn how to resolve a similar issue for them.

@zdvman
Copy link

zdvman commented Oct 21, 2024

Hi, did you solve the issue? I have the same problem.

@chrisg220
Copy link
Author

@zdvman Yes my problem was solved. Did you have the same error as me? And did you try running the commands I wrote above? What are you seeing now?

@zdvman
Copy link

zdvman commented Oct 22, 2024

@zdvman Yes my problem was solved. Did you have the same error as me? And did you try running the commands I wrote above? What are you seeing now?

Yes, I used this command and now it works. On my opinion one step of installation in description of this template is missing. Thanks.

@huyouare
Copy link

huyouare commented Nov 2, 2024

I'm also able to repro this issue upon initial installation.
Screenshot 2024-11-02 at 1 47 19 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants