Why am I getting this error ?

[ Server ] GET /auth/me 500 13.951 ms - 1330 [ Server!] PrismaClientKnownRequestError: [ Server!] Invalid prisma.session.findUnique() invocation: [ Server!] [ Server!] [ Server!] The table public.Session does not exist in the current database. I am using the saas template on wasp and getting this error...
4 Replies
kapa.ai
kapa.ai4w ago
Hi @2euxs. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The error message you're seeing indicates that the public.Session table does not exist in your current database. This table is used by Wasp for session management, storing sessions in the database when users log in and deleting them when users log out (source (https://wasp-lang.dev/docs/auth/overview#sessions)). This error can occur if the database migrations have not been run or if there's an issue with the database connection. Here are a few steps you can take to troubleshoot: 1. Ensure your database is running. If you're using a local database for development, you can start it with the wasp start db command. 2. Run the database migrations with the wasp db migrate-dev command. This command applies any new migrations to your database, creating the necessary tables. 3. If you're still encountering the error, there might be an issue with your Prisma setup. Check your schema.prisma file to ensure it's correctly configured. If none of these steps resolve the issue, it might be helpful to provide more information about your setup, such as the version of Wasp you're using and any changes you've made to the default SaaS template. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @2euxs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
2euxs
2euxs4w ago
wasp db migrate-dev worked for me thanks @kapa.ai
kapa.ai
kapa.ai4w ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm glad to hear that running wasp db migrate-dev resolved your issue! This command is crucial as it applies any new migrations to your database, ensuring all necessary tables are created. If you have any more questions or run into any other issues, feel free to ask. Happy coding with Wasp! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
Filip
Filip4w ago
Good bot!
Want results from more Discord servers?
Add your server