cmintey / wishlist

Wishlist is a self-hosted wishlist application that you can share with your friends and family. You no longer have to wonder what to get your family for the holidays, simply check their wishlist and claim any available item!
MIT License
54 stars 1 forks source link

Bug: Unable to Log In/Sign Up to Wishlist Upon Initial Deployment #160

Closed duggym122 closed 1 week ago

duggym122 commented 1 week ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Follow the readme instructions to set up the docker container via docker-compose
  2. Attempt to access the deployed application

Expected behavior I should see the unauthenticated home/login page

Screenshots Login page shows a 500 error and no paths return any result other than a 404

Desktop:

Additional context The logs do show errors when seeding the database, but the app starts fine anyway:

prisma:error 

Invalid `prisma.user.count()` invocation:

The table `main.user` does not exist in the current database.

PrismaClientKnownRequestError: 

Invalid `prisma.user.count()` invocation:

The table `main.user` does not exist in the current database.

    at Mn.handleRequestError (/usr/src/app/node_modules/.pnpm/@prisma+client@5.20.0_prisma@5.20.0/node_modules/@prisma/client/runtime/library.js:121:7753)

    at Mn.handleAndLogRequestError (/usr/src/app/node_modules/.pnpm/@prisma+client@5.20.0_prisma@5.20.0/node_modules/@prisma/client/runtime/library.js:121:7061)

    at Mn.request (/usr/src/app/node_modules/.pnpm/@prisma+client@5.20.0_prisma@5.20.0/node_modules/@prisma/client/runtime/library.js:121:6745)

    at async l (/usr/src/app/node_modules/.pnpm/@prisma+client@5.20.0_prisma@5.20.0/node_modules/@prisma/client/runtime/library.js:130:9633)

    at async load (file:///usr/src/app/build/server/chunks/21-D0zGL3ly.js:18:21)

    at async load_server_data (file:///usr/src/app/build/server/index.js:1186:18)

    at async Promise.all (index 1)

    at async render_data (file:///usr/src/app/build/server/index.js:2436:19)

    at async resolve2 (file:///usr/src/app/build/server/index.js:3691:22)

    at async respond (file:///usr/src/app/build/server/index.js:3596:22) {

  code: 'P2021',

  clientVersion: '5.20.0',

  meta: { modelName: 'User', table: 'main.user' }

}
cmintey commented 1 week ago

I'm not able to reproduce. Looks like the db failed to initialize, maybe try deleting the db and re-starting the container. Are there errors while applying migrations?

duggym122 commented 1 week ago

This is after doing a full re-deploy from scratch a half-dozen times, but the issue ended up being that the container behaved really poorly trying a deployment where the storage was on a different machine. Even though I have my second node mapped from the primary (where the file storage is), and it works fine for other containers, Wishlist really didn't want to play ball.

I had to migrate it to the portion of my cluster hosted on the node with all the storage, and it worked fine.