W
Wasp5d ago
Cam Pak

Didn't do anything new. My app broke, and it's hard to determine why auth isn't working anymore

Testing locally. Cleaned the db. Re-seeded. wasp start and the non-authenticated pages work like Login, but when I log in successfully, the auth'd pages break. Was there a dep upgraded behind the scenes that broke something? I'm unfortunately at a loss.
5 Replies
kapa.ai
kapa.ai5d ago
Hi @Cam Pak. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry to hear you're experiencing issues with authentication in your Wasp app. Based on the information provided, there are a few potential solutions to try: 1. Run database migrations: It appears you might need to run wasp db migrate-dev after cleaning your database. This is a common step needed when authentication issues occur. 2. Try wasp clean followed by wasp start: This combination has helped other users with similar authentication problems, as it ensures a fresh build of your application. 3. Check your Wasp version: There have been auth-related bug fixes in recent versions. For example, version 0.12.4 fixed an import-related issue that affected authentication as mentioned in a GitHub release. 4. Prisma client initialization: After cleaning, Prisma might need to regenerate its client. This is a known issue where the Prisma client doesn't initialize properly on first start after cleaning, causing authentication to fail as documented in a GitHub issue. If you're using social authentication methods like GitHub or Google, make sure your environment variables are correctly set up in your .env.server file. If these steps don't resolve the issue, it would be helpful to know: - Which Wasp version you're using - Which authentication methods you're implementing - Any specific error messages you're seeing Let me know if any of these suggestions help or if you need further assistance! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cam Pak, 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?
Cam Pak
Cam PakOP5d ago
Using username and password
Cam Pak
Cam PakOP5d ago
GitHub
GitHub - cameronapak/cultivate: If Notion + Basecamp had a baby and...
If Notion + Basecamp had a baby and kept it simple. Self-hostable. - cameronapak/cultivate
Cam Pak
Cam PakOP4d ago
More information: the useAuth hook is continually returning: {user: undefined, status: 'loading', error: null} And now, without doing anything, it worked. May have been an ISP issue :/
toticozeni
toticozeni3d ago
Glad to see it's solved. Do report if it happens again, maybe there is something we can improve on our end to handle such cases.

Did you find this page helpful?