Closed michelvankessel closed 4 years ago
Something is wrong with the peer that's been returned
'''body[i].addr"''
So that's saying that .addr doesn't have the capability to do a .split function, which means that body[I] isn't a value were expecting it to be.
On Sun, Mar 8, 2020, 4:07 AM Michel van Kessel notifications@github.com wrote:
the peers.js script failws with the below error. Is this an Iquidus issue or is it related to the Blackcoin wallet software?
ubuntu@explorer:/data/explorer$ node scripts/sync.js market script launched with pid: 31108 bittrex market data updated successfully. ubuntu@explorer:/data/explorer$ node scripts/peers.js /home/ubuntu/data/explorer/scripts/peers.js:29 var address = body[i].addr.split(':')[0]; ^
TypeError: Cannot read property 'split' of undefined at /home/ubuntu/data/explorer/scripts/peers.js:29:36 at Object.next (/home/ubuntu/data/explorer/lib/explorer.js:360:18) at Object.syncLoop (/home/ubuntu/data/explorer/lib/explorer.js:376:10) at Request._callback (/home/ubuntu/data/explorer/scripts/peers.js:27:11) at Request.self.callback (/home/ubuntu/data/explorer/node_modules/request/request.js:185:22) at Request.emit (events.js:316:20) at Request. (/home/ubuntu/data/explorer/node_modules/request/request.js:1154:10) at Request.emit (events.js:316:20) at IncomingMessage. (/home/ubuntu/data/explorer/node_modules/request/request.js:1076:12) at Object.onceWrapper (events.js:422:28) at IncomingMessage.emit (events.js:328:22) at endReadableNT (_stream_readable.js:1201:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iquidus/explorer/issues/358?email_source=notifications&email_token=AAG2F5ENTJ2WEK3VIUEFCP3RGNG33A5CNFSM4LDXGSK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITLMIFA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG2F5G7WL37MFIBDDBFEF3RGNG33ANCNFSM4LDXGSKQ .
for some reason, that error is gone, but now I get the following error:
ubuntu@explorer:~/data/explorer$ /usr/bin/nodejs scripts/peers.js /home/ubuntu/data/explorer/scripts/peers.js:48 country: geo.country_name ^
TypeError: Cannot read property 'country_name' of undefined at Request._callback (/home/ubuntu/data/explorer/scripts/peers.js:48:30) at self.callback (/home/ubuntu/data/explorer/node_modules/request/request.js:185:22) at Request.emit (events.js:316:20) at Request.onRequestError (/home/ubuntu/data/explorer/node_modules/request/request.js:877:8) at ClientRequest.emit (events.js:316:20) at TLSSocket.socketErrorListener (_http_client.js:432:9) at TLSSocket.emit (events.js:316:20) at emitErrorNT (internal/streams/destroy.js:84:8) at processTicksAndRejections (internal/process/task_queues.js:84:21)
which was a DNS blocking issue. I had to whitelist freegeoip.app
I am getting this error. I was able to make some corrections to my code according to the currency I am using, but this problem still persists.
var address = body[i].addr.split(':')[0];
^
TypeError: Cannot read property 'split' of undefined
at lib.syncLoop.db.get_peers.i (/root/explorer/scripts/peers.js:31:36)
at Object.next (/root/explorer/lib/explorer.js:360:18)
at Object.syncLoop (/root/explorer/lib/explorer.js:376:10)
at Request._callback (/root/explorer/scripts/peers.js:29:11)
at Request.self.callback (/root/explorer/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/root/explorer/node_modules/request/request.js:1154:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/root/explorer/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
The repository that I am uploading updates to is as follows: https://github.com/DigitalCoin1/BlockExplorer/tree/develop-1.7.3
This is the address of the explorer I use to test new 1.7.3 implementations: https://explorer.sperocoin.org/
the peers.js script failws with the below error. Is this an Iquidus issue or is it related to the Blackcoin wallet software?
ubuntu@explorer:~/data/explorer$ node scripts/sync.js market script launched with pid: 31108 bittrex market data updated successfully. ubuntu@explorer:~/data/explorer$ node scripts/peers.js /home/ubuntu/data/explorer/scripts/peers.js:29 var address = body[i].addr.split(':')[0]; ^
TypeError: Cannot read property 'split' of undefined at /home/ubuntu/data/explorer/scripts/peers.js:29:36 at Object.next (/home/ubuntu/data/explorer/lib/explorer.js:360:18) at Object.syncLoop (/home/ubuntu/data/explorer/lib/explorer.js:376:10) at Request._callback (/home/ubuntu/data/explorer/scripts/peers.js:27:11) at Request.self.callback (/home/ubuntu/data/explorer/node_modules/request/request.js:185:22) at Request.emit (events.js:316:20) at Request. (/home/ubuntu/data/explorer/node_modules/request/request.js:1154:10)
at Request.emit (events.js:316:20)
at IncomingMessage. (/home/ubuntu/data/explorer/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:422:28)
at IncomingMessage.emit (events.js:328:22)
at endReadableNT (_stream_readable.js:1201:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)