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

Error: cb called twice from local api #10

Open
cryptix opened this issue Feb 6, 2019 · 2 comments
Open

Error: cb called twice from local api #10

cryptix opened this issue Feb 6, 2019 · 2 comments

Comments

@cryptix
Copy link
Member

cryptix commented Feb 6, 2019

okay changed module name and reinstalled. now I get this crash on the sbot that tries to open the invite:

/Users/cryptix/ssb/scuttle-shell/node_modules/ssb-server/node_modules/packet-stream/index.js:162
        if(once) throw new Error('cb called twice from local api')
                 ^

Error: cb called twice from local api
    at /Users/cryptix/ssb/scuttle-shell/node_modules/ssb-server/node_modules/packet-stream/index.js:162:24
    at /Users/cryptix/ssb/scuttle-shell/node_modules/ssb-server/node_modules/muxrpc/stream.js:45:22
    at next (/Users/cryptix/ssb/scuttle-shell/node_modules/ssb-peer-invites/index.js:435:9)
    at /Users/cryptix/ssb/scuttle-shell/node_modules/ssb-peer-invites/index.js:418:13
    at Object._requests.(anonymous function) (/Users/cryptix/ssb/scuttle-shell/node_modules/packet-stream/index.js:38:5)
    at PacketStream._onrequest (/Users/cryptix/ssb/scuttle-shell/node_modules/packet-stream/index.js:151:26)
    at PacketStream.write (/Users/cryptix/ssb/scuttle-shell/node_modules/packet-stream/index.js:134:41)
    at /Users/cryptix/ssb/scuttle-shell/node_modules/muxrpc/pull-weird.js:56:15
    at /Users/cryptix/ssb/scuttle-shell/node_modules/pull-stream/sinks/drain.js:24:37
    at /Users/cryptix/ssb/scuttle-shell/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
@cryptix
Copy link
Member Author

cryptix commented Feb 6, 2019

I manually altered the pubs array and then it worked.. Sorry that I don't know what procuded this.

@dominictarr
Copy link
Contributor

well, the stack trace goes through: https://github.com/ssbc/ssb-peer-invites/blob/master/index.js#L435
and https://github.com/ssbc/ssb-peer-invites/blob/master/index.js#L418

it could be a problem in connectFirst https://github.com/ssbc/ssb-peer-invites/blob/master/index.js#L378-L404 that looks like correct (only callback exactly once) code to me though.

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