u/Interesting-Cod-3889

FASTAPI website stuck on infinite loading

So I’m trying to make a really basic inventory management website for university using FastAPI and Uvicorn and I’ve somehow ended up in debugging hell

The requirement is that the whole thing should mostly work through backend endpoints. We’re not allowed to use Jinja templates and javaScript is only supposed to be used for fetch API calls. Even filtering, sorting, searching and CRUD operations are supposed to happen through backend endpoints instead of frontend logic.

I’m using FastAPI for backend and plain HTML/CSS/vanilla JS for frontend. The frontend basically does fetch calls.

I already created and activated a virtual environment, installed FastAPI, Uvicorn and python-multipart and the server actually starts fine. Terminal says “Application startup complete” and even "where uvicorn" confirms it’s using the venv version.

But the browser just keeps loading forever.

No proper error. No crash, at first I thought it was a directory issue bcz I previously messed around with project folders and renamed stuff but now everything looks correct. Frontend folder exists, backend exists, HTML files exist, static mounting exists, JS files exist, everything.

I even opened browser dev tools and checked the Network tab and it’s literally empty. Nothing shows up there at all which confused me even more because it feels like the browser isn’t even reaching the request stage.

I’m still pretty new to FastAPI/backend so if anyone has dealt with this “loads forever with no obvious error” situation before, please save me 🙏🏻

reddit.com
u/Interesting-Cod-3889 — 10 days ago