mckaywrigley / chatbot-ui

Come join the best place on the internet to learn AI skills. Use code "chatbotui" for an extra 20% off.
https://JoinTakeoff.com
MIT License
28.73k stars 8k forks source link

Getting Error at Sign up/Login #1377

Open yesbhautik opened 9 months ago

yesbhautik commented 9 months ago

Logs: Termius_g41lmFeh4r

Error: chrome_dee2ibgjJQ

tarek-kerbedj commented 9 months ago

I'm getting the same error , found any solutions ?

jhchundev commented 9 months ago

Have you migrated your supabase database?

superhappychris commented 9 months ago

I ran into this problem running locally and it turned out there was some kind of port conflict with docker. To fix it I ran supabase stop, restarted my computer, then ran supabase start

yesbhautik commented 9 months ago

I am using Local Method in my Ubuntu Server [because I dont wanna use vercel and supabase cloud]

yesbhautik commented 9 months ago

I'm getting the same error , found any solutions ?

I got the solution.

I have done as below & it works...

1 cloned repo 2 npm i 3 npm install supabase --save-dev 4 nano .env OR set values to env variable if you are using any panel for more security with [SUPABASE_ACCESS_TOKEN (supabase account api), NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, EMAIL_WHITELIST] 5 modified "supabase/migrations/20240108234540_setup.sql" 6 supabase link --project-ref [no need to enter any password] 7 supabase db push [need to enter password which you have set during database creation on supabase cloud] 8 npm run dev -- DONE --

[if you are in any panel and hard to modify the code or unable to access the terminal enough permission then you can perfrom step 1 to 7 at any device, doesnt matter that device is local or online then mention repo URL in your panel just set env variable and you good to go smoothly]

yesbhautik commented 9 months ago

BUT BUT BUT, I am getting one another issue. I have white listed one domain because I was getting "Email [email-id] is not allowed to sign up." But i didn't worked for me. I have to white whole email address to get signed up. What if I want to make site open for all with one specified domain or all domains?

ENV: image

ERROR: image

bv-hamanfnn commented 9 months ago

I am getting the same error running locally. I've tried restarting my PC, but it won't work :(

yesbhautik commented 9 months ago

restarting my PC

RESTART WILL NOT WORK 🤣, In cloud getting same error, then error inside the script.

SnakeCodeBuilder commented 9 months ago

Same issue and local app wasn't working, once stopped and restarted supabase the error messages still appeared in the terminal but the app seams to work fine for now

yesbhautik commented 9 months ago

Same issue and local app wasn't working, once stopped and restarted supabase the error messages still appeared in the terminal but the app seams to work fine for now

I have give solution for it brother. New issue is sign up restrictions.

superhappychris commented 9 months ago

@yesbhautik the second issue you ran into after getting past that first one is due to a bug in the sign up logic. The issue stems from setting both EMAIL_DOMAIN_WHITELIST and EMAIL_WHITELIST at the same time.

I just created a pr (#1406 ) with a fix, but in the meantime you should be able to get things up and running by only setting one of those whitelist environment variables at a time.

yesbhautik commented 9 months ago

only setting one of those whitelist environment variables a

Okay let me try with it

yesbhautik commented 9 months ago

@yesbhautik the second issue you ran into after getting past that first one is due to a bug in the sign up logic. The issue stems from setting both EMAIL_DOMAIN_WHITELIST and EMAIL_WHITELIST at the same time.

I just created a pr (#1406 ) with a fix, but in the meantime you should be able to get things up and running by only setting one of those whitelist environment variables at a time.

unfortunately, not worked for me 😢 .

superhappychris commented 9 months ago

@yesbhautik hmm same error as before? what does your .env file look like now?

yesbhautik commented 9 months ago

yes same error. here is my current environment var. chrome_YwxRG3Lad2

superhappychris commented 9 months ago

@yesbhautik i can't reproduce the error when i only have EMAIL_DOMAIN_WHITELIST set in my .env.local file

i'm running the app locally with npm run chat in a console window though and it looks like you're using easypanel to host the app. i suppose it's possible there's some extra setup needed to make it work with easypanel, but i'm not familiar enough with easypanel to say one way or the other. Maybe try switching that "Create .env file" toggle button at the bottom of your screenshot?

sorry, wish i could be more help, good luck!

yesbhautik commented 9 months ago

easypanel

Everything working superb, in this panel. And if evn values not getting by script then database will not connect. So tuggle on .env not make sence. Btw, your PR is not approved yet so maybe your concept will not work

yesbhautik commented 9 months ago

sign up restrictions issue resolved,

if you don't want to restrict anything then, just create variable for it and dont put any value. but if dont create any variable then it will show the restrictions ERROR.

just keep it blank as below... chrome_YumvBBbnhd

DiamondGlassDrill commented 9 months ago

Ok guys it is no fun any longer. Why did you introduced a login but whatever I do set everything to true, No email login is allowed. Nor can I ever use any longer the chatbot ui, as I get stuck at Login screen, please remove it!

yesbhautik commented 9 months ago

Ok guys it is no fun any longer. Why did you introduced a login but whatever I do set everything to true, No email login is allowed. Nor can I ever use any longer the chatbot ui, as I get stuck at Login screen, please remove it!

owner and contributer not focusing on basic stuffs [not limited to login, other many basic things which is more important then adding new features].

DiamondGlassDrill commented 9 months ago

Ok guys it is no fun any longer. Why did you introduced a login but whatever I do set everything to true, No email login is allowed. Nor can I ever use any longer the chatbot ui, as I get stuck at Login screen, please remove it!

owner and contributer not focusing on basic stuffs [not limited to login, other many basic things which is more important then adding new features].

I know @yesbhautik I do not blame here, it is just that I lost all data due to this story of Login no Login, each update some new bugs are coming from the Login feature that is not of use for many in offline mode! At least that one can switch it off/skip it and if not that it is fixed. I thought, if something it is introduced it goes through bug fixing phases before release. At least how I manage things in my team. The login issue is not the first one of its kind (I know how picky these phases are, learned a lot of these lessons the hard way)

Again not being upset with anyone it is just a pain that such a beautiful development is not of use due to the Login blocking users to use it. A visually "small" thing blocks the main use! (PS: Login and Credentials are never a small thing ;) ) It appears just from UX :)

So would be good if the devs could focus on it, as I used it for work and development heavily! Thx in advance

DiamondGlassDrill commented 9 months ago

I needed to make it work after more than a week of painful only having ChatGPT on OpenAI Here are the steps I used. --> Please investigate developers if this is the way to go and if not please take my steps to make a tutorial for others. Thx.

Adjust Supabase Configuration:

  1. Navigate to your Supabase project's configuration file, typically named config.toml.
  2. Locate the [auth] section and set signup to TRUE.
  3. In the [auth-email] section, ensure both enable_signup and double_confirm_changes are set to TRUE.

Verify Email in Supabase Studio:

  1. Open your terminal or command line interface and run supabase status to obtain the URL for your Supabase Studio.
  2. Visit the Supabase Studio URL in your web browser.
  3. On the left-hand navigation pane, click on AUTH to access the authentication settings.
  4. Add your email credentials here and mark your email as VALID to verify it.

Reset Password via Email:

  1. Still within the AUTH section, find your user account's entry.
  2. Click on the three dots menu (...) corresponding to your user entry, and select Password reset.
  3. This action will send a password reset link to your virtual email to the inbucket! To view this link, go to the Inbucket URL provided in the Supabase setup instructions, typically accessible through the Monitor section.
  4. Click on the reset link found in your inbucket email. This link redirects you back to the Chatbot Login page.
  5. Enter your email you set in the Supabase Auth Studio! and a new password. Note that this process will not give you any confirmation nor do you need to confirm your password change; simply entering a new password updates your credentials. --> Do not know how it will react on redirect... but so far it makes the beast work again. ;)
jaimejim commented 9 months ago

I am coming from https://github.com/mckaywrigley/chatbot-ui/issues/1424

I can just say that after trying the options explained above, I still did not manage to get it working on Mac (Intel CPU). Therefore I will revert to the legacy version of chatbot-ui for now.

Thank you for your work!

spammenotinoz commented 9 months ago

I'm getting the same error , found any solutions ?

I got the solution.

I have done as below & it works...

1 cloned repo 2 npm i 3 npm install supabase --save-dev 4 nano .env OR set values to env variable if you are using any panel for more security with [SUPABASE_ACCESS_TOKEN (supabase account api), NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, EMAIL_WHITELIST] 5 modified "supabase/migrations/20240108234540_setup.sql" 6 supabase link --project-ref [no need to enter any password] 7 supabase db push [need to enter password which you have set during database creation on supabase cloud] 8 npm run dev -- DONE --

[if you are in any panel and hard to modify the code or unable to access the terminal enough permission then you can perfrom step 1 to 7 at any device, doesnt matter that device is local or online then mention repo URL in your panel just set env variable and you good to go smoothly]

Thank-you!!! I did a hosted deployment fine, but locally on Ubuntu was stuck, this fixed it for me.

yesbhautik commented 9 months ago

Ok guys it is no fun any longer. Why did you introduced a login but whatever I do set everything to true, No email login is allowed. Nor can I ever use any longer the chatbot ui, as I get stuck at Login screen, please remove it!

owner and contributer not focusing on basic stuffs [not limited to login, other many basic things which is more important then adding new features].

I know @yesbhautik I do not blame here, it is just that I lost all data due to this story of Login no Login, each update some new bugs are coming from the Login feature that is not of use for many in offline mode! At least that one can switch it off/skip it and if not that it is fixed. I thought, if something it is introduced it goes through bug fixing phases before release. At least how I manage things in my team. The login issue is not the first one of its kind (I know how picky these phases are, learned a lot of these lessons the hard way)

Again not being upset with anyone it is just a pain that such a beautiful development is not of use due to the Login blocking users to use it. A visually "small" thing blocks the main use! (PS: Login and Credentials are never a small thing ;) ) It appears just from UX :)

So would be good if the devs could focus on it, as I used it for work and development heavily! Thx in advance

my solution will work, for sure. you can use your old supabase DB to restore your data

hannesrudolph commented 9 months ago

I don't get what I am doing wrong. I tried to follow the steps outlined as the fix and i still cannot create a user from the backend and I get errors like made from the front end. Before I go into my setup and exactly what I see, is there something basic I should try first?

hannesrudolph commented 9 months ago

I changed the NEXT_PUBLIC_SUPABASE_URL to my local ip. Works now.

jaimejim commented 8 months ago

Could someone maybe write a fix more clearly? I have tried it few times and still does not work. I am using MacBook pro Sonoma 2,3 GHz Quad-Core Intel Core i7.

Onat-T commented 8 months ago

Exact same issues with @jaimejim . I do not get why related issues are closed. They seem to be related to migration issues; something fundamentally wrong. Related issues are closed without explanation. The only one I found with an explanation is this by @yesbhautik , which does not work: https://github.com/mckaywrigley/chatbot-ui/issues/1427#issuecomment-1937798722

That being said, thank you very much @yesbhautik and @mckaywrigley for all your hard work! I appreciate how incredible it is that awesome people like you are putting out their hard work and trying to support others as they try to build on work! All the best and have a great week.

yesbhautik commented 8 months ago

Sorry for late reply I am outside of my desk with my family from last few days, @Mahogany95 what issue you are facing? Please explain it so i can help. Also, if you need urgent/personal help please ping me on telegram @yesbhautik or just schedule free meet with me on TopMate

lucaricciatl commented 6 months ago

I changed the NEXT_PUBLIC_SUPABASE_URL to my local ip. Works now.

it works

wancai12 commented 3 months ago

如何取消不用邮箱登录呢?