Replies: 1 comment 1 reply
-
This is a bit confusing as you are asking about a FastAPI/Windows issue on the Supabase forum. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem:
I am running a FastAPI application with Uvicorn and Supabase as the database.
The server starts successfully (Uvicorn running on http://127.0.0.1:8000), but I cannot access it via Invoke-RestMethod or curl.
I keep getting "Connection could not be established" or "500 Internal Server Error".
What I have tried:
✅ Checked that no other processes are using port 8000 (netstat -ano | findstr :8000)
✅ Restarted Uvicorn with different options:
bash
uvicorn app:app --host 0.0.0.0 --port 8000 --log-level debug
uvicorn app:app --host 127.0.0.1 --port 8001 --log-level debug
✅ Disabled Windows Firewall temporarily to test access
✅ Verified that Supabase responds correctly via Python:
python
from config import supabase
response = supabase.table("code_snippets").select("*").execute()
print(response.data)
✅ Ran FastAPI with a minimal app.py to isolate the issue:
python
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "API is running!"}
✅ Tested with curl and Invoke-RestMethod, but still getting errors.
What I expected:
The FastAPI application should be accessible via 127.0.0.1:8000/
The /test endpoint should return { "status": "ok" }
Database queries should work correctly with Supabase
Error Message from Uvicorn:
(Paste your most recent Uvicorn error message here)
System Information:
OS: Windows 10
Python Version: 3.10.11
FastAPI Version: Latest
Uvicorn Version: Latest
Supabase SDK Version: Latest
Question:
Has anyone experienced a similar issue where FastAPI runs but does not respond?
Could there be a specific Windows networking issue that is blocking the API access?
Are there any known issues with Supabase that could interfere with FastAPI startup?
Beta Was this translation helpful? Give feedback.
All reactions