Archon icon indicating copy to clipboard operation
Archon copied to clipboard

πŸ› [Bug]: Unable to verify projects schema. Please ensure the backend is running and database is accessible.

Open iamlasse opened this issue 3 months ago β€’ 12 comments

Archon Version

0.0.0

Bug Severity

πŸ”΄ Critical - App unusable

Bug Description

Under projects: Unable to verify projects schema. Please ensure the backend is running and database is accessible. I've followed the install instructions again, added the anon key for supabase, (the service role key caused server to be unhealthy) and started the docker containers. Loaded up frontend and ran migrations in supabase.

Steps to Reproduce

...

Expected Behavior

Well I was expecting the app to just work lol

Actual Behavior

It didn't...

Error Details (if any)

Unable to verify projects schema. Please ensure the backend is running and database is accessible.

Affected Component

πŸ–₯️ User Interface

Browser & OS

Mac Os, Brave

Additional Context

No response

Service Status (check all that are working)

  • [ ] πŸ–₯️ Frontend UI (http://localhost:3737)
  • [ ] βš™οΈ Main Server (http://localhost:8181)
  • [ ] πŸ”— MCP Service (localhost:8051)
  • [ ] πŸ€– Agents Service (http://localhost:8052)
  • [ ] πŸ’Ύ Supabase Database (connected)

iamlasse avatar Sep 13 '25 09:09 iamlasse

I see all these console errors

Image

iamlasse avatar Sep 13 '25 09:09 iamlasse

Hey, did you run the migration file to create the tables?

Also the Service Key is needed. Anon key does not work.

Supabase Cloud or Self-Hosted?

leex279 avatar Sep 13 '25 10:09 leex279

The tables exist in supabase and the key is in the .env yes. I tried either key anon or service role. Both didn't work.

iamlasse avatar Sep 13 '25 11:09 iamlasse

ok, can you provide the docker / console logs please, so we got the exact errors?

Also => Self-hosted or cloud supabase?

leex279 avatar Sep 13 '25 12:09 leex279

OK,

Supabase => cloud

I disabled all the RLS in supabase hoping it was a key/auth error, didn't change the issue...

Console errors: Image

Docker server logs (no errors)

INFO: Will watch for changes in these directories: ['/app'] INFO: Uvicorn running on http://0.0.0.0:8181 (Press CTRL+C to quit) INFO: Started reloader process [1] using WatchFiles INFO: Started server process [7] INFO: Waiting for application startup. 2025-09-13 12:09:57 | root | INFO | πŸ“‹ Logging configured (Logfire: disabled) 2025-09-13 12:09:57 | src.server.main | INFO | βœ… Credentials initialized 2025-09-13 12:09:57 | api | INFO | πŸ”₯ Logfire initialized for backend 2025-09-13 12:09:57 | src.server.services.crawler_manager | INFO | === CRAWLER INITIALIZATION START === 2025-09-13 12:09:59 | src.server.services.crawler_manager | INFO | === CRAWLER INITIALIZATION SUCCESS === 2025-09-13 12:09:59 | src.server.services.crawler_manager | INFO | Crawler instance: <crawl4ai.async_webcrawler.AsyncWebCrawler object at 0xffff226126f0> 2025-09-13 12:09:59 | src.server.services.crawler_manager | INFO | Initialized: True 2025-09-13 12:10:00 | api | INFO | βœ… Using polling for real-time updates 2025-09-13 12:10:00 | src.server.services.prompt_service | INFO | Loading prompts from database... 2025-09-13 12:10:00 | src.server.services.prompt_service | INFO | Loaded 3 prompts into memory 2025-09-13 12:10:00 | api | INFO | βœ… Prompt service initialized 2025-09-13 12:10:00 | api | INFO | πŸŽ‰ Archon backend started successfully! INFO: Application startup complete. 12:10:58.908 Listing active operations 12:10:58.931 Active operations listed | count=0 2025-09-13 12:11:13 | src.server.services.projects.task_service | ERROR | Error listing tasks: {'message': 'invalid input syntax for type uuid: "temp-1757765472680"', 'code': '22P02', 'hint': None, 'details': None} 12:11:13.883 Creating new project | title=Test | github_repo=None 2025-09-13 12:11:13 | src.server.services.projects.project_creation_service | INFO | πŸ—οΈ [PROJECT-CREATION] Starting create_project_with_ai for progress_id: direct, title: Test 2025-09-13 12:11:14 | src.server.services.projects.project_creation_service | INFO | Created project 6968ed4d-de23-4b5c-be85-e19f3b4d91af in database 2025-09-13 12:11:14 | src.server.services.projects.project_creation_service | WARNING | AI generation failed, continuing with basic project: No module named 'src.server.agents' 12:11:15.145 Project created successfully | project_id=6968ed4d-de23-4b5c-be85-e19f3b4d91af 12:11:22.907 Getting project features | project_id=6968ed4d-de23-4b5c-be85-e19f3b4d91af 12:11:23.252 Project features retrieved | project_id=6968ed4d-de23-4b5c-be85-e19f3b4d91af | feature_count=0

Docker frontend (no errors)

[email protected] dev npx vite

VITE v5.4.19 ready in 395 ms

➜ Local: http://localhost:3737/ ➜ Network: http://192.168.117.3:3737/ πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/progress/ to http://archon-server:8181/api/progress/ πŸ”„ [VITE PROXY] Forwarding: GET /api/knowledge-items/summary?page=1&per_page=100 to http://archon-server:8181/api/knowledge-items/summary?page=1&per_page=100 πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/projects to http://archon-server:8181/api/projects πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/task-counts to http://archon-server:8181/api/projects/task-counts πŸ”„ [VITE PROXY] Forwarding: POST /api/projects to http://archon-server:8181/api/projects πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/task-counts to http://archon-server:8181/api/projects/task-counts πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/temp-1757765472680/tasks to http://archon-server:8181/api/projects/temp-1757765472680/tasks πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/task-counts to http://archon-server:8181/api/projects/task-counts πŸ”„ [VITE PROXY] Forwarding: GET /api/projects to http://archon-server:8181/api/projects πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/tasks to http://archon-server:8181/api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/tasks πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/task-counts to http://archon-server:8181/api/projects/task-counts πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/task-counts to http://archon-server:8181/api/projects/task-counts πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/features to http://archon-server:8181/api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/features πŸ”„ [VITE PROXY] Forwarding: GET /api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/tasks to http://archon-server:8181/api/projects/6968ed4d-de23-4b5c-be85-e19f3b4d91af/tasks πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health πŸ”„ [VITE PROXY] Forwarding: GET /api/health to http://archon-server:8181/api/health

iamlasse avatar Sep 13 '25 12:09 iamlasse

thanks, I think this must be a configuration error. Can you post your .env file as well please (redact your service key)

Also do you run all locally on your desktop or do you install on a server?

leex279 avatar Sep 13 '25 12:09 leex279

`# Minimal startup configuration - only Supabase connection required
# All other settings (API keys, model choices, RAG flags) are managed via the Settings page

# Get your SUPABASE_URL from the Data API section of your Supabase project settings -
# https://supabase.com/dashboard/project/<your project ID>/settings/api
SUPABASE_URL=https://ynhgmuluqmberveippic.supabase.co

# ⚠️ CRITICAL: You MUST use the SERVICE ROLE key, NOT the Anon key! ⚠️
# 
# COMMON MISTAKE: Using the anon (public) key will cause ALL saves to fail with "permission denied"!
#
# How to get the CORRECT key:
# 1. Go to: https://supabase.com/dashboard/project/<your project ID>/settings/api
# 2. In the Settings menu, click on "API keys" 
# 3. Find "Project API keys" section
# 4. You will see TWO keys - choose carefully:
#    ❌ anon (public): WRONG - This is shorter, starts with "eyJhbGc..." and contains "anon" in the JWT
#    βœ… service_role (secret): CORRECT - This is longer and contains "service_role" in the JWT
#
# The service_role key is typically much longer than the anon key.
# If you see errors like "Failed to save" or "Permission denied", you're using the wrong key!
#
# On the Supabase dashboard, it's labeled as "service_role" under "Project API keys"
# SUPABASE_SERVICE_KEY=
SUPABASE_SERVICE_KEY=
# Optional: Set log level for debugging
LOGFIRE_TOKEN=
LOG_LEVEL=INFO

# Service Ports Configuration
# These ports are used for external access to the services
HOST=localhost
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737
ARCHON_DOCS_PORT=3838

# Frontend Configuration
# VITE_ALLOWED_HOSTS: Comma-separated list of additional hosts allowed for Vite dev server
# Example: VITE_ALLOWED_HOSTS=192.168.1.100,myhost.local,example.com
# If not set, defaults to localhost, 127.0.0.1, ::1, and the HOST value above
VITE_ALLOWED_HOSTS=

# Development Tools
# VITE_SHOW_DEVTOOLS: Show TanStack Query DevTools (for developers only)
# Set to "true" to enable the DevTools panel in bottom right corner
# Defaults to "false" for end users
VITE_SHOW_DEVTOOLS=false

# When enabled, PROD mode will proxy ARCHON_SERVER_PORT through ARCHON_UI_PORT. This exposes both the 
# Archon UI and API through a single port. This is useful when deploying Archon behind a reverse 
# proxy where you want to expose the frontend on a single external domain.
PROD=false

# Embedding Configuration
# Dimensions for embedding vectors (1536 for OpenAI text-embedding-3-small)
EMBEDDING_DIMENSIONS=1536

# NOTE: All other configuration has been moved to database management!
# Run the credentials_setup.sql file in your Supabase SQL editor to set up the credentials table.
# Then use the Settings page in the web UI to manage:
# - OPENAI_API_KEY (encrypted)
# - MODEL_CHOICE 
# - TRANSPORT settings
# - RAG strategy flags (USE_CONTEXTUAL_EMBEDDINGS, USE_HYBRID_SEARCH, etc.)
# - Crawler settings:
#   * CRAWL_MAX_CONCURRENT (default: 10) - Max concurrent pages per crawl operation
#   * CRAWL_BATCH_SIZE (default: 50) - URLs processed per batch
#   * MEMORY_THRESHOLD_PERCENT (default: 80) - Memory % before throttling
#   * DISPATCHER_CHECK_INTERVAL (default: 0.5) - Memory check interval in seconds
`

iamlasse avatar Sep 13 '25 12:09 iamlasse

can you please pull latest main run the migrations and try again, let me know if you still have issues

Wirasm avatar Sep 18 '25 10:09 Wirasm

I am also facing the same

chayan-pf avatar Sep 25 '25 04:09 chayan-pf

I am experiencing same issue.

scarselli avatar Oct 02 '25 00:10 scarselli

I encountered the same error and can’t fix it

AntonLisovoy avatar Oct 05 '25 13:10 AntonLisovoy

Setting the environment variable PROD to true helped solve issue for me.

AntonLisovoy avatar Oct 05 '25 15:10 AntonLisovoy