# Blockscout Web Interface 404 Fix Guide **Date**: December 23, 2025 **Issue**: "Page not found" at https://explorer.d-bis.org/ **Status**: ๐Ÿ” **INVESTIGATING** --- ## ๐Ÿ” Current Situation ### What's Working โœ… - โœ… Blockscout container running - โœ… PostgreSQL database healthy - โœ… 115,954 blocks indexed - โœ… API endpoints responding (with parameters) - โœ… SSL/HTTPS configured - โœ… Nginx proxy working - โœ… Cloudflare tunnel routing correctly ### What's Not Working โŒ - โŒ Root path (`/`) returns "Page not found" - โŒ `/blocks` returns 404 - โŒ `/transactions` returns 404 - โŒ `/address/*` returns 404 --- ## ๐Ÿ” Analysis ### Configuration Check **Environment Variables**: - โœ… `DISABLE_WEBAPP=false` (Webapp enabled) - โœ… `DISABLE_INDEXER=false` (Indexer enabled) - โœ… `BLOCKSCOUT_HOST=explorer.d-bis.org` - โœ… `BLOCKSCOUT_PROTOCOL=https` - โœ… `SECRET_KEY_BASE` set **Status**: Configuration appears correct. --- ## ๐Ÿ“‹ Blockscout API Parameters ### Required API Parameters Blockscout API endpoints require specific parameters: #### 1. **Status Endpoint** ```bash GET /api/v2/status?module=block&action=eth_block_number ``` **Parameters**: - `module` (required): Module name (e.g., `block`, `transaction`, `account`) - `action` (required): Action name (e.g., `eth_block_number`, `eth_get_block_by_number`) #### 2. **Block Information** ```bash GET /api?module=block&action=eth_block_number ``` **Parameters**: - `module=block` - `action=eth_block_number` (or other block actions) #### 3. **Transaction Information** ```bash GET /api?module=transaction&action=eth_getTransactionByHash&txhash= ``` **Parameters**: - `module=transaction` - `action=eth_getTransactionByHash` - `txhash=` (required for transaction queries) --- ## ๐Ÿ”ง Possible Causes of 404 on Root Path ### 1. **Web Interface Not Fully Initialized** โš ๏ธ **Cause**: Blockscout web interface may need more time to initialize or needs specific data. **Check**: ```bash # Check if Phoenix endpoint is running docker logs blockscout | grep -i phoenix # Check for web interface startup messages docker logs blockscout | grep -i "webapp\|web app" ``` --- ### 2. **Missing Static Files** โš ๏ธ **Cause**: Web interface static files may not be generated. **Check**: ```bash docker exec blockscout ls -la /app/apps/explorer/priv/static/ ``` --- ### 3. **Route Configuration** โš ๏ธ **Cause**: Blockscout may need specific route configuration or initialization. **Possible Solutions**: - Check if Blockscout needs a recompilation - Verify static assets are available - Check if web interface needs specific environment variables --- ### 4. **Insufficient Indexed Data** โš ๏ธ **Current**: 115,954 blocks indexed **Note**: Even with blocks indexed, the web interface might need: - At least one transaction indexed - Address data populated - Specific data structure in place --- ## ๐Ÿ”ง Fix Options ### Option 1: Verify Web Interface is Enabled Check current configuration: ```bash docker exec blockscout env | grep DISABLE_WEBAPP ``` **Expected**: `DISABLE_WEBAPP=false` If set to `true`, update and restart: ```bash cd /opt/blockscout sed -i 's/DISABLE_WEBAPP=true/DISABLE_WEBAPP=false/' docker-compose.yml docker-compose restart blockscout ``` --- ### Option 2: Restart Blockscout Container Sometimes a restart helps initialize the web interface: ```bash cd /opt/blockscout docker-compose restart blockscout ``` Wait 2-3 minutes for full initialization. --- ### Option 3: Check Static Assets Verify static files are present: ```bash docker exec blockscout ls -la /app/apps/explorer/priv/static/ ``` If empty or missing, may need to rebuild or reinitialize. --- ### Option 4: Access via Direct IP (Test) Test if web interface works on direct IP: ```bash curl -k https://192.168.11.140/blocks ``` --- ## ๐Ÿ“ Working Endpoints (What You CAN Access) ### API Endpoints (With Parameters) 1. **Block Number**: ``` GET /api?module=block&action=eth_block_number ``` 2. **Block by Number**: ``` GET /api?module=block&action=eth_get_block_by_number&tag= ``` 3. **Transaction by Hash**: ``` GET /api?module=transaction&action=eth_getTransactionByHash&txhash= ``` 4. **Address Info**: ``` GET /api?module=account&action=eth_get_balance&address=
&tag=latest ``` --- ## ๐Ÿงช Testing Commands ### Test API Endpoints ```bash # Get latest block number curl -k "https://explorer.d-bis.org/api?module=block&action=eth_block_number" # Get block by number curl -k "https://explorer.d-bis.org/api?module=block&action=eth_get_block_by_number&tag=0x1&boolean=true" # Get transaction (if you have a transaction hash) curl -k "https://explorer.d-bis.org/api?module=transaction&action=eth_getTransactionByHash&txhash=" ``` --- ## ๐Ÿ’ก Recommendations ### Immediate Actions 1. **Check Blockscout Logs**: ```bash docker logs -f blockscout | grep -iE "(webapp|phoenix|error|404)" ``` 2. **Verify Webapp is Running**: ```bash docker exec blockscout ps aux | grep -i phoenix ``` 3. **Test Direct API Calls**: ```bash curl -k "https://explorer.d-bis.org/api?module=block&action=eth_block_number" ``` ### Short-Term 1. **Wait for More Data**: - Web interface may need more indexed data - Wait 1-2 hours for more blocks/transactions 2. **Check Documentation**: - Review Blockscout documentation for web interface requirements - Verify all required environment variables are set ### Long-Term 1. **Monitor Indexing**: - Track when web interface becomes available - Document the data requirements 2. **Document Working Routes**: - Create a guide of accessible endpoints - Document API parameter requirements --- ## ๐Ÿ“š Blockscout Required Parameters Reference ### API Endpoint Format All Blockscout API calls require: ``` GET /api?module=&action=[&] ``` ### Common Modules and Actions | Module | Actions | Required Parameters | |--------|---------|---------------------| | `block` | `eth_block_number`, `eth_get_block_by_number` | `tag` (for block by number) | | `transaction` | `eth_getTransactionByHash` | `txhash` | | `account` | `eth_get_balance`, `txlist` | `address`, `tag` | | `token` | `tokeninfo`, `tokenbalance` | `contractaddress`, `address` | | `stats` | `ethsupply`, `ethsupplyexchange` | None | ### Example API Calls ```bash # Get latest block number curl "https://explorer.d-bis.org/api?module=block&action=eth_block_number" # Get block 100 curl "https://explorer.d-bis.org/api?module=block&action=eth_get_block_by_number&tag=0x64&boolean=true" # Get transaction curl "https://explorer.d-bis.org/api?module=transaction&action=eth_getTransactionByHash&txhash=0x..." # Get address balance curl "https://explorer.d-bis.org/api?module=account&action=eth_get_balance&address=0x...&tag=latest" ``` --- ## โœ… Next Steps 1. **Verify Web Interface Status**: - Check logs for webapp initialization - Verify Phoenix endpoint is running 2. **Test API Endpoints**: - Use the API with proper parameters - Document working endpoints 3. **Monitor Progress**: - Wait for more data to be indexed - Check if web interface becomes available 4. **Check Blockscout Documentation**: - Review requirements for web interface - Verify all configuration is correct --- **Status**: ๐Ÿ” Investigating - Configuration appears correct, checking web interface initialization