206Dorian / my-100

Eclipse Public License 2.0
2 stars 0 forks source link

Unable to signup on localHost #4

Open jsalexan opened 1 year ago

jsalexan commented 1 year ago

I'm still unable to sign up on my localhost. I've been AI chatting for a few hours and getting nowhere. I added a bunch of console logs to the handleFormSubmit function in the signup.js file:

const handleFormSubmit = async (event) => { console.log("handleFormSubmit was called"); event.preventDefault(); try { // Execute the ADD_USER mutation and extract the token from the response console.log('Executing mutation'); const mutationResponse = await addUser({ variables: { ...formState }, }); console.log("Mutation Response: ", mutationResponse); const token = mutationResponse.data.addUser.token; // Log the token in with Auth.login console.log(token) Auth.login(token); } catch (e) { console.log("Error: ", e); } };

It is not logging the Mutation Response or anything after, so I'm assuming it's not receiving a mutation response and that's the problem.

Could you two test this and see if anything is logged on your end?

206Dorian commented 1 year ago

I'll look now, Timothy hurt is foot so we're a little slow today. I'm free if you want to chat.

206Dorian commented 1 year ago

https://coolors.co/palette/006d77-83c5be-edf6f9-ffddd2-e29578

Thoughts on this color scheme?

tbarns commented 1 year ago

hey Jen! I plugged in that code and was able to signup and there were some console logs that hit but they went away too fast to see which one's i have a feeling something is just off maybe in between our codes. not sure how that could be possible. I am off tomorrow since i injured myself (nothing too serious just got to stay off my feet) so we can meet if you want. in the meantime this is some new suggestions from chatGPT if you wanna see if any of this helps. my thought is if we can't get it working on your end lets just start fresh and go from there. nothing is so far along we cant start again. Clear browser data: Try clearing your browser's cache, cookies, and local storage. This will remove any stored tokens or data that might be causing the issue.

Use a different browser: Test the app in a different browser to see if the problem persists. This can help you determine if the issue is related to a specific browser or its settings.

Check your local environment: Make sure your local environment has the correct dependencies and configurations. Compare your local setup with your teammates' setups to identify any differences that might be causing the issue.

Pull the latest changes: Ensure you have the latest version of the code by doing a git pull. Your teammates might have made changes that you haven't incorporated into your local environment yet.

Reinstall dependencies: Delete the node_modules folders both in the client and server directories, and reinstall the dependencies by running npm install or yarn in each of the directories. This can help ensure that you have the correct versions of all dependencies.

Check for user-specific conditions: Analyze the authentication logic in your code to see if there might be any user-specific conditions or edge cases that could be causing the issue. For example, check if there are any specific characters in your username or password that might be causing the problem.

Compare user accounts: If you have access to your teammates' user accounts, try logging in with their credentials to see if the issue persists. This can help you determine if the problem is related to your specific user account or data.

206Dorian commented 1 year ago

https://art-cart-gui-guys-production.herokuapp.com/login

I really like how we did the log in/register on Art Cart, Jen can we look at doing something similar?

tbarns commented 1 year ago

Hey jen, another thought is maybe trying cloning down a site I'm working on here that has the same jumping-off point. if you can log in/create a new user with this maybe we start from scratch? were not super far along so it wouldn't be a major issue and we can pair/tri-program it together.

jsalexan commented 1 year ago

Hi Guys! Sorry I'm behind. Lots of appointments yesterday and this morning.

  1. Love the color scheme! Love it.
  2. Love the login for ArtCart. Will definitely try something like that.
  3. Thanks so much for looking into that, T! I'll try a few of your suggestions this afternoon and then, if I can't make it work, I'll try the other site.
  4. I have an appointment now and then at 1, but I should be on here by 2:30.