-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloned, installed, built or started the app, but login fails. #1
Comments
Hi, you obtain the following error? And if you open your browser console, you can see the following error? If this is your case, this means that your local version is trying to connect to the server As a temporary solution to allow you to test the application, you can use my server https://nextjs-rho-six-97.vercel.app/. Simply copy the contents of .env.production to .env.development. And run the "npm start" command again. It should work! |
Hi @pafavero , Can you give instructions on setting up a database once the Supabase project is running. Do you have a single table of bookings? I would like to run my own instance. |
https://supabase.com/docs/guides/getting-started/quickstarts/nextjs Seems Like a good start. I think I still would need the database structure from Supabase. Thanks for any advice. Hi @ThomasCarstens, Running a database in Supabase should not be particularly difficult. I can't recall any particular difficulties in using it now, but it was a year ago when I set up the db. I chose Supabase because I was looking for a free online database for non-commercial projects... |
Hello, I've encountered the exact error you described, but I'm having trouble understanding the solution. I followed the installation instructions, so why is the server not configured or installed on my machine? To resolve the issue, do I just need to copy the contents from https://nextjs-rho-six-97.vercel.app/.env.production to my .env.development file? |
Hi @fredaranha, the solution that I propouse was a temporary solution to substitute my local server http://localhost:3005/ with my public server on https://nextjs-rho-six-97.vercel.app/ I forgot to include some useful information in the readme file about how the application works and I think it was not so clear to understand. I am sorry about that. This is an experimental prototype project that I made in my spare time about a year ago, so it is far from perfect! Feel free to use it, but it has never been a real productive project! The Repo https://github.com/pafavero/book_a_seat contains all codes for the frontend and it is a pure React application (generated with create-react-app https://github.com/facebook/create-react-app ). In addition, I use nextjs as a framework to retrieve data from the db, because nextjs supports API routes (it provides a solution to build a public API). For example if the React App needs to know all reservation related to seat 1, it will makes the following API request: http://YOR_NEXTJS_URL/api/reservations?selSeat=1 I push today the nextjs project on my repo (https://github.com/pafavero/nextjs_book_a_seat ), it can be useful to see how it works. The dabase contains only 3 tables and the sql to generate them can be found here: |
Hello @pafavero , I attempted to deploy the application using the repositories https://github.com/pafavero/nextjs_book_a_seat and executed the scripts from https://github.com/pafavero/nextjs_book_a_seat/blob/main/sql/create_db.sql (note: the script is missing the step to create the schema). Subsequently, I deployed https://github.com/pafavero/book_a_seat. However, the initial error I mentioned still persists. During API testing with endpoints like "hello db" and "api/hello," everything appeared to be functioning correctly. However, when attempting to log in with the user1 account, an error was encountered. Do you have any insights or suggestions to address this issue? |
You said that the endpoints like "hello db" and "api/hello works. Where do you deploy the API? I mean, when I work locally I deploy on my local server (http://localhost:3005/), So I can successfully call the following URLs: I tried to reproduce your error, I suppose you have a problem with CORS, because the App works with 2 different domains. Do you have something like that: Do you have an error similar to this one in your browser console "Referrer Policy: strict-origin-when-cross-origin"? |
Hi @pafavero Yes, I have successfully deployed the API on my local environment using the address http://127.0.0.1:3005/, which prevented the occurrence of CORS errors. The specific error I encountered was: "uncaught (in Promise) .... focus," as illustrated in the following image |
After successfully cloning the repository, installing dependencies with npm install, and building or running the application with npm run build or npm start, you may encounter an issue when attempting to log in. The error message "No Server Response" indicates that the application is not receiving the expected response from the server during the login process.
The text was updated successfully, but these errors were encountered: