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

peerStatus #10

Closed
mixmix opened this issue May 22, 2018 · 2 comments
Closed

peerStatus #10

mixmix opened this issue May 22, 2018 · 2 comments
Labels

Comments

@mixmix
Copy link
Member

mixmix commented May 22, 2018

2 issues :

  • docs say peerStatus is async and takes a cb, manifest says it's sync
  • when you use it as a sync fn you get this error :
TypeError: callback not provided
    at noop (/home/mix/projects/protozoa/ticktack/node_modules/muxrpc/api.js:15:18)
    at Object._requests.(anonymous function) (/home/mix/projects/protozoa/ticktack/node_modules/packet-stream/index.js:38:5)
    at PacketStream._onrequest (/home/mix/projects/protozoa/ticktack/node_modules/packet-stream/index.js:151:26)
    at /home/mix/projects/protozoa/ticktack/node_modules/pull-stream/sinks/drain.js:24:37
    at /home/mix/projects/protozoa/ticktack/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/home/mix/projects/protozoa/ticktack/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/home/mix/projects/protozoa/ticktack/node_modules/pull-reader/index.js:39:14)
  TypeError: Cannot read property '@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519' of null
    at Object.peerStatus (/home/mix/projects/SSBC/ssb-ebt/index.js:156:38)
    at Object.<anonymous> (/home/mix/projects/protozoa/ticktack/node_modules/secret-stack/util.js:80:17)
    at Object.<anonymous> (/home/mix/projects/protozoa/ticktack/node_modules/hoox/index.js:3:17)
    at Object.hooked (/home/mix/projects/protozoa/ticktack/node_modules/hoox/index.js:10:15)
    at Object.localCall (/home/mix/projects/protozoa/ticktack/node_modules/muxrpc/local-api.js:23:42)
    at Object.<anonymous> (/home/mix/projects/protozoa/ticktack/node_modules/muxrpc/local-api.js:37:22)
    at Object.request (/home/mix/projects/protozoa/ticktack/node_modules/muxrpc/stream.js:46:17)
    at PacketStream._onrequest (/home/mix/projects/protozoa/ticktack/node_modules/packet-stream/index.js:161:17)
    at PacketStream.write (/home/mix/projects/protozoa/ticktack/node_modules/packet-stream/index.js:134:41)
    at /home/mix/projects/protozoa/ticktack/node_modules/muxrpc/pull-weird.js:56:15
console.error @ base.html:19

I think this is a muxrpc problem with incorrectly checking sync functions @dominictarr ?

@dominictarr
Copy link
Contributor

if you are calling it from the client, the callback is required. If you are calling it locally (access to the sbot directly) then a callback isn't. I guess it could allow a callback when used locally so that the same code works in both places?

You are calling it via the client here right? you need a callback then.

@stale
Copy link

stale bot commented Nov 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 1, 2018
@stale stale bot closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants