explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Explorer can't start, Error: Parse error

Open sfoxdev opened this issue 8 years ago • 14 comments

Hello, I'm trying to start explorer for coin BIT (https://github.com/bitcf/bitcf/releases), but get such error:

[email protected] start /srv/explorer node --stack-size=10000 ./bin/cluster

Starting cluster with pid: 1948 GET / 304 390ms GET /stylesheets/style.css 304 2ms GET /themes/Spacelab/bootstrap.min.css 304 5ms GET /vendor/jqplot/jquery.jqplot.css 304 4ms GET /vendor/jqplot/jquery.jqplot.min.js 304 1ms GET /vendor/jqplot/plugins/jqplot.dateAxisRenderer.min.js 304 1ms GET /vendor/jqplot/plugins/jqplot.ohlcRenderer.min.js 304 1ms GET /vendor/jqplot/plugins/jqplot.highlighter.min.js 304 0ms GET /vendor/jqplot/plugins/jqplot.pieRenderer.min.js 304 1ms GET /vendor/jqplot/plugins/jqplot.barRenderer.min.js 304 0ms GET /vendor/jqplot/plugins/jqplot.categoryAxisRenderer.min.js 304 1ms GET /javascripts/chart.js 304 0ms GET /images/logo.png 304 1ms GET /ext/getlasttxs/0.00000001?_=1512585207986 200 4ms - 11b { [Error: Parse error] code: -32700 } GET /api/getdifficulty 200 291ms - 39b { [Error: Parse error] code: -32700 } GET /api/getnetworkhashps 200 280ms - 39b { [Error: Parse error] code: -32700 } GET /api/getconnectioncount 200 261ms - 39b { [Error: Parse error] code: -32700 } GET /api/getblockcount 200 279ms - 39b GET /ext/summary 304 1129ms

What does this code mean 32700? Where I can find list of error codes?

sfoxdev avatar Dec 06 '17 18:12 sfoxdev

http://www.jsonrpc.org/specification#error_object

erfan007p avatar Dec 06 '17 20:12 erfan007p

Thanks @erfan007p

-32700 | Parse error | Invalid JSON was received by the server.An error occurred on the server while parsing the JSON text.

Does it mean that coin returns from rpc wrong json format? How can I view output from rpc server or debug to solve this issue?

sfoxdev avatar Dec 06 '17 21:12 sfoxdev

curl --user rpcuser:rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://localhost:rpcport/

erfan007p avatar Dec 06 '17 21:12 erfan007p

I get correct answers from rpc using commands getinfo, getdifficulty, getmininginfo, getconnectioncount, getblockcount. Here is sample output for getinfo:

curl --user test:test --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://localhost:16662/ {"result":{"version":"v0.1.0bit-1-g0f8431f-beta","protocolversion":60005,"walletversion":60000,"balance":0.00000000,"newmint":0.00000000,"stake":0.00000000,"blocks":63534,"moneysupply":20708156499.78447723,"connections":3,"proxy":"","ip":"154.253.17.26","difficulty":87615.29498164,"testnet":false,"keypoololdest":1512469972,"keypoolsize":101,"paytxfee":0.01000000,"errors":""},"error":null,"id":"curltest"}

Does it mean that problem in explorer? If yes, than how can I solve this issue?

sfoxdev avatar Dec 07 '17 07:12 sfoxdev

Try to disable API

erfan007p avatar Dec 07 '17 08:12 erfan007p

I have tried and get the same error.

sfoxdev avatar Dec 07 '17 09:12 sfoxdev

Check your rpcuser and rpcpassword, make sure it matched settings.json

erfan007p avatar Dec 07 '17 09:12 erfan007p

Checked, they are matched. Wrong user or pass give other error: { [Error: Invalid params, response status code: 401] code: -32602 }

sfoxdev avatar Dec 07 '17 10:12 sfoxdev

Were you able to solve this? I've been seeing the same error, but curl tests look fine.

curl test : $ curl --user user:password --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:3699/ {"result":{"version":"v1.2.0.4-ge0b1f06","protocolversion":60004,"walletversion":60000,"balance":0.00000000,"newmint":0.00000000,"stake":0.00000000,"blocks":348160,"moneysupply":9020227.00821400,"connections":120,"proxy":"","ip":"99.99.99.99","difficulty":4046.11428485,"testnet":false,"keypoololdest":1517130110,"keypoolsize":102,"paytxfee":0.01000000,"errors":""},"error":null,"id":"curltest"}

bigwavedave42 avatar Jan 29 '18 08:01 bigwavedave42

Unfortunately NO, I moved to use other explorer.

sfoxdev avatar Jan 29 '18 08:01 sfoxdev

@sfoxdev What other explorer did you move to? I'm running into this same issue.

@iquidus do you have any insight to what this error could be?

Thanks!

Doppelgangerhef avatar Mar 02 '18 20:03 Doppelgangerhef

@Doppelgangerhef https://github.com/Valermos/emercoin-blockchain-explorer - I've modified this explorer to my needs and it works great with my coin.

sfoxdev avatar Mar 04 '18 11:03 sfoxdev

@sfoxdev I'll take a look at it, thanks!

Doppelgangerhef avatar Mar 06 '18 03:03 Doppelgangerhef

ANyone knows how to solve this please ?

I have same issue ...

{ [Error: Invalid params, response status code: 401] code: -32602 }
GET /api/getdifficulty 200 273ms - 39b
{ [Error: Invalid params, response status code: 401] code: -32602 }
GET /api/getnetworkhashps 200 271ms - 39b
{ [Error: Invalid params, response status code: 401] code: -32602 }
GET /api/getconnectioncount 200 273ms - 39b
{ [Error: Invalid params, response status code: 401] code: -32602 }
GET /api/getblockcount 200 272ms - 39b
GET /ext/summary 200 1118ms - 240b

Thank you

le2Ks avatar Aug 20 '19 12:08 le2Ks