safe-global / safe-infrastructure

One `docker-compose.yml` file to rule them all
MIT License
58 stars 96 forks source link

404 when fetch safe account info from TxService #156

Closed jerry-nerd closed 2 months ago

jerry-nerd commented 2 months ago

I built a safe service locally for testing followed the instrucitons here. The problem is that it loads forever in the indexing step when I create a new safe account.

I have refererred stackexchange and issue 143. I am sure the shortName is correct, the master copies and proxy factory are auto loaded. Infact ,I am using sepolia's chaininfo.

I am also using domain name,not localhost.(The same issue with localhost).

The error in TxService:

2024-08-08 10:56:38,283 MT::GET::api/v1/about/singletons/::110::200::/txs/api/v1/about/singletons/
2024-08-08 10:56:38,318 MT::GET::api/v1/safes/<str:address>/::19::404::/txs/api/v1/safes/0xf84bD1bC369459b7dB0c27f5229562C35246726B/
2024-08-08 10:57:22,922 MT::GET::api/v1/safes/<str:address>/::2::404::/txs/api/v1/safes/0xf84bD1bC369459b7dB0c27f5229562C35246726B/
2024-08-08 10:58:46,582 MT::GET::api/v1/about/singletons/::4::200::/txs/api/v1/about/singletons/
2024-08-08 10:58:46,615 MT::GET::api/v1/safes/<str:address>/::1::404::/txs/api/v1/safes/0xf84bD1bC369459b7dB0c27f5229562C35246726B/
2024-08-08 10:59:31,686 MT::GET::api/v1/safes/<str:address>/::1::404::/txs/api/v1/safes/0xf84bD1bC369459b7dB0c27f5229562C35246726B/
2024-08-08 12:59:35,320 MT::GET::api/v1/owners/<str:address>/safes/::4::304::/txs/api/v1/owners/0x41920e11FC5313eE6bfF4042f274632a8C7a722D/safes/
2024-08-08 12:59:36,475 MT::GET::api/v1/owners/<str:address>/safes/::3::304::/txs/api/v1/owners/0x41920e11FC5313eE6bfF4042f274632a8C7a722D/safes/

logs in cgw:

{"build_number":"3f0937f","level":"info","message":{"chain_id":null,"client_ip":"172.16.4.252","detail":null,"method":"GET","origin":null,"path":"/v1/owners/0x41920e11FC5313eE6bfF4042f274632a8C7a722D/safes","response_time_ms":44.51273899991065,"route":"/v1/owners/:ownerAddress/safes","safe_app_user_agent":null,"status_code":200},"request_id":"7a734054-5975-4d60-a0c1-0702eec1ea30","timestamp":"2024-08-08T12:21:23.245Z","version":"v1.51.0"}
{"build_number":"3f0937f","level":"warn","message":"Error while getting Safe overview: Error: An error occurred ","request_id":"8e983e59-c5d5-4658-a19a-5a69102c449c","timestamp":"2024-08-08T12:21:23.433Z","version":"v1.51.0"}
{"build_number":"3f0937f","level":"warn","message":"Error while getting Safe overview: Error: An error occurred ","request_id":"8e983e59-c5d5-4658-a19a-5a69102c449c","timestamp":"2024-08-08T12:21:23.433Z","version":"v1.51.0"}
{"build_number":"3f0937f","level":"info","message":{"chain_id":null,"client_ip":"172.16.4.252","detail":null,"method":"GET","origin":null,"path":"/v1/safes?trusted=true&exclude_spam=false&currency=usd&wallet_address=0x41920e11FC5313eE6bfF4042f274632a8C7a722D&safes=11155111%3A0x253656342E4aE2a25A4E808e3BF0C15aC107e1D0%2C11155111%3A0xf84bD1bC369459b7dB0c27f5229562C35246726B","response_time_ms":46.11024899967015,"route":"/v1/safes","safe_app_user_agent":null,"status_code":200},"request_id":"8e983e59-c5d5-4658-a19a-5a69102c449c","timestamp":"2024-08-08T12:21:23.433Z","version":"v1.51.0"}
{"build_number":"3f0937f","level":"info","message":{"chain_id":"11155111","client_ip":"172.16.4.252","detail":"An error occurred","method":"GET","origin":null,"path":"/v1/chains/11155111/safes/0xf84bD1bC369459b7dB0c27f5229562C35246726B","response_time_ms":1.1202940000221133,"route":"/v1/chains/:chainId/safes/:safeAddress","safe_app_user_agent":null,"status_code":404},"request_id":"c2eeda12-a135-4af1-942d-f6a37ad1c2c9","timestamp":"2024-08-08T12:21:24.673Z","version":"v1.51.0"}

The chain info from /cgw/v1/chains/11155111:

{
  "chainId": "11155111",
  "chainName": "Sepolia",
  "description": "Ethereum Testnet Sepolia",
  "chainLogoUri": "http://localhost:8000/cfg/media/chains/11155111/chain_logo.png",
  "l2": true,
  "isTestnet": true,
  "nativeCurrency": {
    "name": "Sepolia Ether",
    "symbol": "ETH",
    "decimals": 18,
    "logoUri": "http://localhost:8000/cfg/media/chains/11155111/currency_logo.png"
  },
  "transactionService": "https://testnet-safe.nal.network/txs",
  "blockExplorerUriTemplate": {
    "address": "https://sepolia.etherscan.io/address/{{address}}",
    "txHash": "https://sepolia.etherscan.io/tx/{{txHash}}",
    "api": "https://api-sepolia.etherscan.io/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}"
  },
  "disabledWallets": [],
  "ensRegistryAddress": "0x8FADE66B79cC9f707aB26799354482EB93a5B7dD",
  "features": [],
  "gasPrice": [],
  "publicRpcUri": {
    "authentication": "NO_AUTHENTICATION",
    "value": "https://rpc.sepolia.org"
  },
  "rpcUri": {
    "authentication": "NO_AUTHENTICATION",
    "value": "https://rpc.sepolia.org"
  },
  "safeAppsRpcUri": {
    "authentication": "NO_AUTHENTICATION",
    "value": "https://rpc.sepolia.org"
  },
  "shortName": "sep",
  "theme": {
    "textColor": "#ffffff",
    "backgroundColor": "#000000"
  },
  "balancesProvider": {
    "chainName": null,
    "enabled": false
  }
}

The version I am using:

CFG_VERSION=v2.83.0
CGW_VERSION=v1.51.0
TXS_VERSION=v5.3.1
UI_VERSION=v1.39.2
EVENTS_VERSION=v0.12.0
bob-fly commented 2 months ago

I have met the same issue.

jerry-nerd commented 2 months ago

I have met the same issue.

I have both localhost:8000 and domain on linux server, now the domain one with my testnet is ok for "txs/api/v1/safes/{address} " request after I add master-copy contract and proxy-factory contracts on txs-service.

But not resolved with Sepolia testnet with domain name. The sepolia testnet do not need to add this two contracts on txs-service

jerry-nerd commented 2 months ago

I have met the same issue.

You can check replies on this issue : https://github.com/safe-global/safe-infrastructure/issues/141