2

There is an IOTA tutorial hosted at the following:
https://github.com/iota-community/iota-workshop

There is a video tutorial showing how to use various NodeJS examples from the above.
https://youtu.be/Z-NN0rRcwY0?t=179

Together these show how to work with the Tangle using NodeJS.

It works great on the devnet light wallet server returning info about it.
Attempting to interrogate mainnet light wallet servers produces an error.

The following is the NodeJS script showing the servers I have tried.

/////////////////////////////// // Environment Check ///////////////////////////////

const iotaLibrary = require('@iota/core')

const iota = iotaLibrary.composeAPI({
//provider:'https://nodes.devnet.thetangle.org:443'
//provider: 'https://n1.iota.nu:443'
//provider: 'https://iota.thathost.net:443'
provider:'https://node.tangle.works:443' })

iota .getNodeInfo() .then(response => console.log(response))
.catch(err => { console.error(err) })

The following is the error message returned when trying to access servers on the mainnet.

{ FetchError: request to https://node.tangle.works:443/ failed, reason: read ECONNRESET at ClientRequest. (/home/pi/iota/iota-workshop/node_modules/node-fetch/lib/index.js:1393:11) at ClientRequest.emit (events.js:182:13) at TLSSocket.socketErrorListener (_http_client.js:382:9) at TLSSocket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19) message: 'request to https://node.tangle.works:443/ failed, reason: read ECONNRESET', type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' }

Can any one tell me why it is not possible to work with light wallet servers on the mainnet using the script above?

Thanks for the help.

John Shearing
  • 205
  • 1
  • 8

1 Answers1

2

thanks for watching my video ;) Can you try some other public nodes? This one might be down. https://iota.dance has a overview of public nodes that are accessible.

fijter
  • 1,099
  • 10
  • 16