Title: Serverless functions return 404 via public HTTP, but work fine via "Invoke Function" — across two separate projects/repos
Hi everyone,
I'm dealing with a persistent issue on one specific project in my team, and I've run out of ideas after extensive troubleshooting. Hoping someone has seen this before.
The problem
All serverless functions inside api/*.js compile successfully, show up correctly in the deployment's "Output" tab, and execute correctly when triggered via the "Invoke Function" button in the dashboard. However, when hitting those same routes via normal public HTTP (browser, fetch, curl — anything outside the dashboard), every single one returns:
404: NOT_FOUNDCode: NOT_FOUND
This affects all functions in the project (chat.js, db.js, export.js, guia.js, keep-alive.js) — not just one.
Environment
- Team: LumenLabs (Hobby plan)
- Region:
gru1(São Paulo) - Function syntax: standard Node.js runtime handler —
export default async function handler(req, res) { ... res.status(...).json(...) } - Repo: GitHub,
mainbranch
What I've already ruled out
- Code/syntax — validated, no errors; functions run fine via "Invoke Function"
vercel.json— tested both the legacy format (builds+routes, with explicit/api/x→/api/x.jsmappings) and the modern format (rewrites, nobuilds). Both formats are identical to what two sibling projects in the same team are using successfully right now.- Deployment Protection — Vercel Authentication and Password Protection both disabled
- Firewall — active, no custom rules, all traffic logged as "Allowed"
- Domain — removed and re-added the alias domain; tested both the alias and the deployment-specific auto-generated domain directly — same 404 on both
- Cache — tested in incognito, and redeployed with "Use existing Build Cache" unchecked
- Recreated the entire project from scratch — deleted the original project and created a new one from the same GitHub repo, with fresh env vars — same result
- Created a brand new, independent repo — copied the exact same files into a second GitHub repo, connected as a new project in the same team — same 404
- Reverted a recent code change to an earlier working version of one function, to rule out an app-level regression — no change in behavior
What does work, for comparison
- The static
index.htmlin the same project loads fine - The exact same route patterns (
/api/chat,/api/db) work perfectly on two sibling projects in the same team, with equivalentvercel.jsonand function syntax - "Invoke Function" in the dashboard always succeeds
Given functions build, appear in Output, and execute correctly when invoked directly — but the public HTTP routing never reaches them, regardless of domain, vercel.json format, or even a fully recreated project — this really looks like something broken at the platform/routing level tied to this specific project (or its history), not the application code.
I already opened a support conversation and got confirmation that the function syntax is correct and standard. Posting here too in case anyone has hit something similar, or has ideas I haven't tried yet.
Sample Request IDs (for anyone from the Vercel team who wants to trace this):
gru1::dh57q-1783802334436-338080cdbfacgru1::wt5rd-1783797646538-2024ddd8b450gru1::zkbsf-1783795581502-f6f03c536b8c
Thanks in advance for any pointers!