Skip to content

2 errors: failed to fetch + cannot connect to backend server #130

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

Open
neno-is-ooo opened this issue Apr 25, 2025 · 6 comments
Open

2 errors: failed to fetch + cannot connect to backend server #130

neno-is-ooo opened this issue Apr 25, 2025 · 6 comments

Comments

@neno-is-ooo
Copy link

neno-is-ooo commented Apr 25, 2025

Console Error

Error: Failed to fetch

src/lib/api.ts (449:28) @ startAgent

  447 |     console.log(`[API] Starting agent for thread ${threadId} using ${API_URL}/thread/${threadId}/agent/start`);
  448 |     
> 449 |     const response = await fetch(`${API_URL}/thread/${threadId}/agent/start`, {
      |                            ^
  450 |       method: 'POST',
  451 |       headers: {
  452 |         'Content-Type': 'application/json',
Call Stack
2

startAgent
src/lib/api.ts (449:28)
async handleSubmit
src/app/(dashboard)/dashboard/page.tsx (91:9)


Console Error

Error: Cannot connect to backend server. Please check your internet connection and make sure the backend is running.

src/lib/api.ts (473:13) @ startAgent

471 |     // Provide clearer error message for network errors
 472 |     if (error instanceof TypeError && error.message.includes('Failed to fetch')) {
> 473 |       throw new Error(`Cannot connect to backend server. Please check your internet connection and make sure the backend is running.`);
     |             ^
 474 |     }
 475 |     
 476 |     throw error;
Call Stack
2

startAgent
src/lib/api.ts (473:13)
async handleSubmit
src/app/(dashboard)/dashboard/page.tsx (91:9)

@neno-is-ooo
Copy link
Author

both ofc running just fine

Image Image

@Deorbiting
Copy link

Same Issue here

1 similar comment
@sahariarpku
Copy link

Same Issue here

@Deorbiting
Copy link

Deorbiting commented Apr 26, 2025

Fix

1 - Go to Open Supabase dashboard → Settings → API → Data API.

2 - In “Exposed schemas” add basejump

3 - Save it,

4 - run supabase db push

5 - restart backend

Seemed to fix it for me

@sahariarpku
Copy link

localhost/:1 Access to fetch at 'http://localhost:8000/api/thread/14b47de4-085b-408c-be62-f6ab1f4f66f0/agent/start' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
:8000/api/thread/14b47de4-085b-408c-be62-f6ab1f4f66f0/agent/start:1

       Failed to load resource: net::ERR_FAILED

intercept-console-error.js:50 [API] Failed to start agent: TypeError: Failed to fetch
at startAgent (api.ts:427:28)
at async createAgentWithPrompt (hero-section.tsx:116:7)
error @ intercept-console-error.js:50
intercept-console-error.js:50 Error creating agent: Error: Cannot connect to backend server. Please check your internet connection and make sure the backend is running.
at startAgent (api.ts:452:13)
at async createAgentWithPrompt (hero-section.tsx:116:7)
error @ intercept-console-error.js:50

@phrxgoa
Copy link

phrxgoa commented Apr 26, 2025

You need to run the supabase thing inside the backend folder

#84 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants