lumina/ERRORS.md
2025-11-29 23:13:05 +03:00

5.9 KiB

Lumina 3D Block Explorer - Error Log & Solutions

Current Issues (2025-11-29)

1. API Connection Failures ✅ SOLUTION AVAILABLE

Status: CRITICAL Error: net::ERR_CONNECTION_REFUSED on localhost:3000 Root Cause: API is running but database has no data Solution: The API needs to fetch data from Horizon. Use public Horizon endpoints:

Quick Fix - Use Public Horizon Directly:

# Update ui/.env
REACT_APP_HORIZON_URL_PUBLIC=https://horizon.stellar.lobstr.co
# OR
REACT_APP_HORIZON_URL_PUBLIC=https://horizon.stellar.org

Available Horizon Providers:

For Full History:

  • Blockdaemon (paid)
  • Validation Cloud (paid)

Current Status: API is running on port 3000 but returns empty data because MongoDB is empty. The app can work without the API by connecting directly to Horizon for real-time data.

2. Branding Issues ✅ FIXED

Status: COMPLETED Changes Made:

  • ✅ Updated ui/static-template/index.html - Changed title to "Lumina | 3D Stellar Block Explorer"
  • ✅ Updated ui/views/layout/top-menu-view.js - Changed logo to "Lumina" with gradient
  • ✅ Updated ui/views/layout/footer-view.js - Changed copyright to "Lumina"
  • ✅ Removed outdated warning banner from ui/views/layout/layout-view.js

3. UI/UX Design Issues 🔄 IN PROGRESS

Status: TODO Problems:

  • Color scheme is outdated (blue/cyan theme)
  • Layout not modern
  • Typography needs improvement

Proposed Modern Design:

/* Modern Dark Theme with Purple/Blue Gradients */
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--dark-bg: #0f0f23;
--card-bg: rgba(255, 255, 255, 0.05);
--glass-effect: backdrop-filter: blur(10px);

Improvements Needed:

  • Glassmorphism cards
  • Smooth animations
  • Better spacing (8px grid system)
  • Modern typography (Inter or SF Pro)
  • Gradient accents
  • Hover effects

4. Buffer/XDR Decoding Errors ⚠️ PARTIALLY FIXED

Status: WORKAROUND APPLIED Error: The first argument must be one of type string, Buffer... Cause: API returns undefined/null when database is empty Current Fix: Added window.Buffer = Buffer in app.js Remaining Issue: Errors occur when API returns no data

Better Solution: Add error boundaries and null checks:

// In ledger-activity-view.js
if (!ledgerData || !ledgerData.header_xdr) {
    return <div>No ledger data available</div>
}

5. Service Worker Registration ✅ CAN IGNORE

Status: NON-CRITICAL (Development only) Error: The script has an unsupported MIME type ('text/html') Cause: service-worker.js not served correctly in dev mode Impact: None - service workers are for production PWA features Solution: Disable in development or ignore

6. WebSocket Connection Failures ✅ CAN IGNORE

Status: NON-CRITICAL Error: WebSocket connection to 'ws://localhost:9001/ws' failed Cause: Webpack dev server WebSocket reconnection attempts Impact: Hot reload requires manual refresh Solution: Normal behavior when server restarts

Root Cause Analysis

Why API Returns Empty Data

  1. MongoDB is empty - No ledger data ingested
  2. Elasticsearch is empty - No indexed data
  3. Solution: Either:
    • Run data ingestion process (requires full node)
    • OR bypass API and use Horizon directly for real-time data
    • OR use the 3D view which connects directly to Horizon

Database Requirements (Optional)

The API requires these ONLY for historical analytics:

  • MongoDB (for ledger data storage)
  • Elasticsearch (for search functionality)
  • Redis (optional, for caching)

The 3D visualization works WITHOUT these - it connects directly to Horizon!

Immediate Action Items

Priority 1: Get App Working

  1. ✅ Branding updated to Lumina
  2. 🔄 Navigate to 3D view: http://localhost:9001/graph/3d/public
  3. ✅ 3D view connects directly to Horizon (no API needed)

Priority 2: Fix Explorer Pages

  1. Add error boundaries for missing data
  2. Show friendly messages when API is unavailable
  3. Add "View in 3D" buttons as fallback

Priority 3: UI Improvements

  1. Implement modern color scheme
  2. Add glassmorphism effects
  3. Improve typography and spacing
  4. Add loading skeletons

Working Features

✅ What Works Now:

  • 3D Transaction Visualization (connects to Horizon directly)
  • Real-time transaction streaming
  • DEX visualization
  • Soroban contract visualization
  • VR mode
  • Keyboard shortcuts

❌ What Needs API/Database:

  • Asset statistics
  • Historical ledger data
  • Search functionality
  • Account history
  • Asset lists

Quick Start Guide

Option 1: Use 3D View (No API needed)

# Just start UI
cd ui && pnpm dev-server
# Visit: http://localhost:9001/graph/3d/public

Option 2: Full Setup (With API)

# Start databases
docker-compose up -d

# Start API
cd api && node api.js

# Start UI
cd ui && pnpm dev-server

# Ingest data (separate process)
# This requires running a Stellar Core node or using captive core

Option 3: Hybrid (API for health, Horizon for data)

# Current setup - API runs but returns empty data
# UI falls back to Horizon for real-time data
# 3D view works perfectly

Horizon Provider Configuration

For Development (Free):

  • Use SDF Public Horizon: https://horizon.stellar.org
  • Or LOBSTR: https://horizon.stellar.lobstr.co

For Production (Paid, Full History):

  • Blockdaemon: Full historical data
  • Validation Cloud: Full historical data
  • QuickNode: Recent data only
  • Ankr: Recent data only

Next Steps

  1. Immediate: Test 3D view - it should work now
  2. Short-term: Add error handling for empty API responses
  3. Medium-term: Redesign UI with modern theme
  4. Long-term: Set up data ingestion or use Horizon API wrapper