AugurProject / augur

Augur v2 - Prediction Market Protocol and Client
MIT License
455 stars 143 forks source link

Error: expected chainID to be 123456 but got 103 #8107

Closed Troublor closed 4 years ago

Troublor commented 4 years ago

Describe the bug I deploy Augur following the instructions like this:

docker kill $(docker ps -a -q);
docker system prune -af
yarn clean
yarn
yarn build
yarn docker:all
yarn build -w
yarn workspace @augurproject/ui dev

After these, I open localhost:8080 in the Chrome and see this popup (as shown in the screenshot). I tried to click the button Connect, but it just reload the page and show this popup again. The console shows there is an error:

{"error_string":"expected chainID to be 123456 but got 103","level":"error","msg":"Mesh previously started on different Ethereum chain; switch chainId or remove DB","myPeerID":"16Uiu2HAm49qAqS938P78UoPxW4iHBzhQ5hoF7LU95KxNpkjDtn8u","time":"2020-06-22T20:26:13+08:00"}
Uncaught (in promise) Error: expected chainID to be 123456 but got 103
    at syscall/js.valueNew (wasm_exec.js:385)
    at syscall_js.valueNew (:8080/zerox.wasm:wasm-function[1369]:0x101400)
    at syscall_js.Value.New (:8080/zerox.wasm:wasm-function[1351]:0xff3c7)
    at github.com_0xProject_0x_mesh_packages_browser_go_jsutil.ErrorToJS (:8080/zerox.wasm:wasm-function[16839]:0xed98f5)
    at github.com_0xProject_0x_mesh_packages_browser_go_jsutil.WrapInPromise.func1.1 (:8080/zerox.wasm:wasm-function[16843]:0xeda527)
    at wasm_pc_f_loop (:8080/zerox.wasm:wasm-function[979]:0xd542a)
    at wasm_export_resume (:8080/zerox.wasm:wasm-function[978]:0xd540b)
    at class_1.global.Go.class_1._resume (wasm_exec.js:510)
    at eval (wasm_exec.js:520)
    at eval (browserfs.js:798)

It seems that Mesh somehow caches the chainID previously when I made some bad attempts, but this time when I run Augur, it finds the chainID is different from previous and throws this error.

The error message suggests to "remove DB", but I don't find any instructions about how to do this.

Screenshots Screenshot 2020-06-22 at 20 26 22

Desktop :

Troublor commented 4 years ago

The configuration printed out in the console is this:

{
  "networkId": "103",
  "ethereum": {
    "http": "http://localhost:8545",
    "ws": "ws://localhost:8546",
    "rpcRetryCount": 5,
    "rpcRetryInterval": 0,
    "rpcConcurrency": 40,
    "useWeb3Transport": true
  },
  "gas": {
    "price": 1000000000,
    "limit": 9500000
  },
  "deploy": {
    "isProduction": false,
    "enableFaucets": true,
    "normalTime": true,
    "writeArtifacts": true,
    "serial": true,
    "externalAddresses": {}
  },
  "warpSync": {
    "enabled": false,
    "autoReport": false
  },
  "uniswap": {
    "exchangeRateBufferMultiplier": 1.075
  },
  "gsn": {
    "enabled": true,
    "minDaiForSignerETHBalanceInDAI": 40,
    "desiredSignerBalanceInETH": 0.04
  },
  "zeroX": {
    "rpc": {
      "enabled": false,
      "ws": "ws://localhost:60557"
    },
    "mesh": {
      "enabled": true,
      "useBootstrapList": true,
      "bootstrapList": [
        "/dns4/localhost/tcp/60558/ipfs/16Uiu2HAmRMgvPQV2UYKXuuCnNaFLpc36PhLp2UKVcL1ePseVcz4y",
        "/dns4/localhost/tcp/60559/ws/ipfs/16Uiu2HAmRMgvPQV2UYKXuuCnNaFLpc36PhLp2UKVcL1ePseVcz4y"
      ]
    }
  },
  "syncing": {
    "enabled": true
  },
  "sdk": {
    "enabled": false,
    "ws": "ws://localhost:60557"
  },
  "server": {
    "httpPort": 9003,
    "startHTTP": true,
    "httpsPort": 9004,
    "startHTTPS": true,
    "wsPort": 9001,
    "startWS": true,
    "wssPort": 9002,
    "startWSS": true
  },
  "uploadBlockNumber": 5,
  "logLevel": 3,
  "showReloadModal": true,
  "averageBlocktime": 2000,
  "addresses": {
    "Augur": "0xFCaf25bF38E7C86612a25ff18CB8e09aB07c9885",
    "Universe": "0x82a37C54267b1e9D94C37895Fe26EC232aA55030",
    "LegacyReputationToken": "0xB4D7f6747CEFbDcA11bDDd92a16134dc95B0DD9B",
    "Cash": "0x5f3341EA5989aD3129E325027b8d908b63709A00",
    "CashFaucet": "0x5f3341EA5989aD3129E325027b8d908b63709A00",
    "BuyParticipationTokens": "0xB78B2B637d3861E601E54C00c054972c18A5e991",
    "RedeemStake": "0x5F3105cc774a5593b5e678B8536FC92DB4dCD4A2",
    "WarpSync": "0x7a8f8e48D4CC990BBD8E088FB027e850486e8e0C",
    "ShareToken": "0x8470F1Aac60a08D2282616f19A4C52718847b847",
    "HotLoading": "0x948FE39685DF87B87004a37DcB92Bd18c6D70a5e",
    "Affiliates": "0x905419e7A1f96A973AB8988Ba19C84135C6f7122",
    "AffiliateValidator": "0xF265D8D30a1A2CdB9857e124010b02765c9a7c70",
    "OICash": "0xE78A332d0f96AA9A56b876C20125ba8A88619D07",
    "AugurWalletRegistry": "0x1FD9274a2FE0E86f5A7b5Bde57b93C8C9b62e21d",
    "AugurWalletRegistryV2": "0x6e968FE21894A35Ba59ee8EC6f60Ea0DDC3a59E5",
    "UniswapV2Factory": "0xB15d4981B977706DcD7350075A12354f2F18f6BC",
    "UniswapV2Router01": "0xDCA9bef5199984ECe425aBe150f50b46fE9cF397",
    "RelayHubV2": "0x6Ec11F087a874d491e6C051ff829E0fB61bd950A",
    "EthExchange": "0x3bD856BeB8a0a885Cd8177Af89Cab74f7B1dbeD2",
    "AuditFunds": "0x6cfC125DF7Ba27B26138CdBCd5804137dC3BA1A6",
    "ERC20Proxy": "0xf28fc4b34a7c4534dD3E40e0ad5Df6F2cb69Aec0",
    "ERC721Proxy": "0x850212e53c1d8898740dd776E78C77B87D94F234",
    "ERC1155Proxy": "0x15152AaDcA3C571B0Ba332e1020FCeA43F95A3F9",
    "MultiAssetProxy": "0x2F8F57DBd52Ee20f9258C5232cfbbAb0f8D478F1",
    "Exchange": "0x2e90e3C430C1470d62587c8983755D717f46F617",
    "Coordinator": "0x3b02e6f3D9748F0db00afe3E570E8fC0201285Cd",
    "CoordinatorRegistry": "0x31361B2733223010bB1867E36a3e6abe6cA7403C",
    "ChaiBridge": "0x92B570781580AE220F8b3EA8A6802dc79e71C77b",
    "DevUtils": "0xA00A7F098dde7e5FFB66C30305E287A6E86CA499",
    "WETH9": "0x9dA930a2ca12C197e687DB22dB3fA318FD8AA60a",
    "ZRXToken": "0x67a75EBbcd5B6Fd8217D3F856D10F4F6b517a272",
    "Time": "0x2eF25877B254d6391B843Df25Dd7A8b0A243BEe9",
    "AugurTrading": "0x25Ff5dc79A7c4e34254ff0f4a19d69E491201DD3",
    "CancelOrder": "0xE60c9fe85aEE7B4848a97271dA8c86323CdFb897",
    "CreateOrder": "0x92AF28244b4f60BAe4A299F75FF6d2f738E398B2",
    "FillOrder": "0xD65f9c350eD35e8339a228fF27Efd2d9BBA17C0b",
    "Orders": "0xa2207BB135287a4EB3ae4De32A0b99d112ae57B0",
    "ProfitLoss": "0xa2A073790EC3ed745afC374F76B73c3178f5536C",
    "SimulateTrade": "0x658655115E55fa3433B9686865f011874BD71083",
    "Trade": "0x642e1eaeD86d4075253c34c307D34362d2247D18",
    "ZeroXTrade": "0x6749E370e7B1955FFa924F4f75f5F12653C7512C"
  }
}
pgebheim commented 4 years ago

The database the 0x uses to track orders in the browser stores the network to which it was last connected. When switching between networks you need to make sure to delete that from your browser:

Chrome: Open dev tools while looking at the Augur UI (ctrl+alt+i) click the Application tab Expand IndexedDB from the left side bar tree view Click on 0x-mesh/mesh_dexie_db or 0x-mesh/mesh_db and choose "Delete" from the main details pane.