Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get working. Asertion error #20

Open
Sheemap opened this issue Apr 28, 2017 · 1 comment
Open

Unable to get working. Asertion error #20

Sheemap opened this issue Apr 28, 2017 · 1 comment

Comments

@Sheemap
Copy link

Sheemap commented Apr 28, 2017

I get this error when I attempt to initialize, Ive searched everywhere but have found no help. Anyone know whats going wrong?

info: transport opened, connection-info = [{"transportType":"udp","transportInfo":{"address":"192.168.1.208","port":42392},"version":"0.18.1"},{"transportType":"udp","transportInfo":{"address":"192.168.1.224","port":42392},"version":"0.18.1"},{"transportType":"tcp","transportInfo":{"address":"192.168.1.208","port":37648},"version":"0.18.1"},{"transportType":"tcp","transportInfo":{"address":"192.168.1.224","port":37648},"version":"0.18.1"}] module=mm-platform
(node:336) DeprecationWarning: Calling an asynchronous function without callback is deprecated.`

assert.js:81
  throw new assert.AssertionError({
  ^
AssertionError: No storage adapter supplied
    at Persistence._setStorageAdapter (/home/Documents/Code/node_modules/mm-services-kademlia/src/telemetry/persistence.js:74:3)
    at new Persistence (/home/Documents/Code/node_modules/mm-services-kademlia/src/telemetry/persistence.js:20:8)
    at new TelemetryTransport (/home/Documents/Code/node_modules/mm-services-kademlia/src/telemetry/transport-decorator.js:27:22)
    at KademliaService._setup (/home/Documents/Code/node_modules/mm-services-kademlia/src/index.js:71:19)
    at KademliaService._updateNodeInfo (/home/Documents/Code/node_modules/mm-services-kademlia/src/index.js:53:10)
    at API.EventEmitter._emit (/home/Documents/Code/node_modules/ak-eventemitter/lib/eventemitter.js:47:19)
    at API.EventEmitter._searchTree (/home/Documents/Code/node_modules/ak-eventemitter/lib/eventemitter.js:103:10)
    at API.EventEmitter.emit (/home/Documents/Code/node_modules/ak-eventemitter/lib/eventemitter.js:222:8)
    at /home/Documents/Code/node_modules/mm-platform/src/api.js:56:12
    at _combinedTickCallback (internal/process/next_tick.js:73:7)

This is the only code I have so far, which is taken straight from the git.

var Kademlia = require('mm-services-kademlia')
var kadfs = require('kad-fs')
var path = require('path')

var storageDir = './data'

var platform = new MicroMinionPlatform({
  storage: kadfs(path.join(storageDir, 'platform'))
})

var kademlia = new Kademlia({
  platform: platform,
  storage: kadfs(path.join(storageDir, 'dht')),
  seeds: null //Extra seeds
})
@thomasdelaet
Copy link
Member

Hey,

Thanks for trying this!

The documentation is a bit out of date. I would suggest to try example.js from mm-box if you want to play with this code.

Care to share your use case?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants