Skip to content

🐛 Bug Report: Authentication API requests returning 404 Not Found on Netlify production #561

@SUMIQVERSE

Description

@SUMIQVERSE

📜 Description

The frontend application hosted on Netlify fails during the login and signup flow. While the authentication works seamlessly in a local development environment, attempting to create an account or log in on the live production domain (https://github-spy.netlify.app) results in a failure.

Root Cause Analysis:
Based on inspecting the browser's Network tab (screenshot attached), the frontend is making a POST request to the relative path /signup directly on the Netlify domain (https://github-spy.netlify.app/signup), which returns a 404 Not Found error.

Since Netlify is hosting the static frontend and the Node.js backend is hosted elsewhere, this indicates that the API Base URL environment variable (e.g., VITE_API_BASE_URL) is either:

  1. Missing in Netlify's production environment settings.
  2. Not dynamically configured within the frontend's API client (Axios/Fetch), causing it to default to a relative path instead of pointing to the deployed backend server.

Expected Behavior:
The API client should utilize a dynamically injected BASE_URL that points to the live backend server when operating in the production environment, allowing the authentication requests to resolve correctly.

Steps to Reproduce:

  1. Visit https://github-spy.netlify.app/signup
  2. Enter credentials and click "Create Account".
  3. Observe the "Something went wrong" UI error.
  4. Check the DevTools Network tab to see the 404 Not Found error on the API endpoint.

Contribution

I would love to work on fixing this API configuration bug.

Could you please assign this issue to me under GSSoC 26? I will update the API calls to use dynamic environment variables (import.meta.env) so it works correctly across both local and production environments.

What browsers are you seeing the problem on?

Firefox

📃 Relevant Screenshots (Links)

Image

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions