0xProject / 0x-launch-kit

Start an exchange in under a minute
https://0x.org/launch-kit
Apache License 2.0
380 stars 236 forks source link

backend_1 | { code: -32000, message: 'unknown block' } #21

Open satroan opened 5 years ago

satroan commented 5 years ago

Hey I am trying to find a resolution to this, also in the future can we have a FAQ/wiki for common problems or error code and fixes. Thanks last log backend_1 | "PERMANENT_CLEANUP_INTERVAL_MS": 10000, backend_1 | "MAX_PER_PAGE": 1000, backend_1 | "DEFAULT_ERC20_TOKEN_PRECISION": 18 backend_1 | } backend_1 | { code: -32000, message: 'unknown block' }

tomhschmidt commented 5 years ago

What are you using for a node? This is a common error that Infura returns if it's under heavy load or the request fails.

matYang commented 5 years ago

I saw similar error messages when launching the launch kit, using rinkeby.infura v3 APIs. The errors were repeated for like 20 times and stopped, did not seem to affect the launch kit functionalities afterwards

satroan commented 5 years ago

Thanks for mentioning I saw no documented solution so it was a huge block for me. So you are saying to repeatedly try until the error resolves? Which for your case was a like the ~20th time?

SvenMeyer commented 4 years ago

Setup a (new) account with infura.io, created a project, used that link to Rinkeby via https, but ... same problem here. Can't post an order, or looks more like as if they can not be retrieved.

GET http://localhost:3000/v3/orders?makerAssetData=0xf47261b00000000000000000000000008080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa&page=1&takerAssetData=0xf47261b0000000000000000000000000c778417e063141139fce010982780140aa0cd5ab 404 (Not Found)
orderbook:1 GET http://localhost:3000/v3/orderbook?baseAssetData=0xf47261b00000000000000000000000008080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa&quoteAssetData=0xf47261b0000000000000000000000000c778417e063141139fce010982780140aa0cd5ab 404 (Not Found)
backend.js:6 0x-launch-kit-frontend::Store::Market::Actions getAllOrders: fetch orders from the relayer failed. Error: 404 - Not Found
GET http://localhost:3000/v3/orders?makerAssetData=0xf47261b00000000000000000000000008080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa&page=1&takerAssetData=0xf47261b0000000000000000000000000c778417e063141139fce010982780140aa0cd5ab
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /v3/orders</pre>
</body>
</html>

    at e.<anonymous> (http_client.js:475)
    at http_client.js:125
    at Object.next (http_client.js:55)
    at o (http_client.js:7)
r @ backend.js:6
t.<computed> @ logdown.min.js:149
(anonymous) @ actions.ts:65
c @ runtime.js:45
(anonymous) @ runtime.js:264
e.<computed> @ runtime.js:98
n @ asyncToGenerator.js:3
f @ asyncToGenerator.js:29
Promise.then (async)
n @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ actions.ts:49
(anonymous) @ index.js:8
dispatch @ redux.js:613
(anonymous) @ actions.ts:250
c @ runtime.js:45