blockcollider / bcnode

Mining node and rovers for the five genesis chains of Block Collider.
https://www.blockcollider.org
MIT License
45 stars 23 forks source link

Error when trying to get a wav block. #227

Open Simon0x opened 6 years ago

Simon0x commented 6 years ago

Prerequisites

For more information, see the CONTRIBUTING guide.

Description

Sometimes the miner has a problem while trying to fetch wav blocks.

Steps to Reproduce

  1. Run latest version of the miner

Expected behavior: No error if site return wrong data or is not reachable.

Actual behavior: Sometimes rover.wave.rover has an error. Looks like the site is not reachable at that time.

Versions

(0.5.5/b320107)

Application (required)

You can get this information:

Environment (optional but helpful)

Logs

2018-05-08T06:22:58.965Z ERROR   rover.wav.rover Rejected promise, trace:
WavesRequestError: Server request to 'https://nodes.wavesnodes.com/blocks/at/991512' has failed:

FetchError: invalid json response body at https://nodes.wavesnodes.com/blocks/at/991512 reason:    Unexpected token < in JSON at position 0

at new WavesRequestError (/home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:251106)
at handleError (/home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:325772)
at /home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:326092
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)

2018-05-08T06: 51:40.086Z ERROR rover.wav.rover Rejected promise, trace:
WavesRequestError: Server request to 'https://nodes.wavesnodes.com/blocks/at/991529' has failed:

FetchError: request to https://nodes.wavesnodes.com/blocks/at/991529 failed, reason: read ECONNRESET

at new WavesRequestError (/home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:251106)
at handleError (/home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:325772)
at /home/bc/bcnode/node_modules/waves-api/dist/waves-api.min.js:1:326092
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)