ssbc / secret-stack

connect peers to each other using secret-handshakes
MIT License
90 stars 19 forks source link

this.getAddress is not a function? #15

Closed NHQ closed 6 years ago

NHQ commented 7 years ago

this.getAddress is not a function

I get this error when I try to call rpc.address(cb) in the connect callback.

dominictarr commented 7 years ago

my guess is that the rpc client's manifest does not have "getAddress": "sync"

NHQ commented 7 years ago

why does it show up on the rpc object?

I guess I don't need it tho, as I already must have had it to connect...

On Fri, Feb 24, 2017 at 3:56 PM, Dominic Tarr notifications@github.com wrote:

my guess is that the rpc client's manifest does not have "getAddress": "sync"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ssbc/secret-stack/issues/15#issuecomment-282437535, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL3MAaPPiuJIFZiRkY00eGZeglFO9ueks5rf24_gaJpZM4MLuXZ .

dominictarr commented 7 years ago

can you show the code to reproduce?

NHQ commented 7 years ago
   'connect': function(peer, cb){ // peer.host is secret-stack address from another bot instance
          node.connect(peer.host, function(err, rpc){ // node is first argument of secret stack plugin init
            if(err) console.log(err) 
            rpc.address(function(err, data){ console.log(err}) // err here 
NHQ commented 7 years ago

it would be around here