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

sbot crashed, re npm install failed #244

Closed
mixmix opened this issue Sep 22, 2015 · 12 comments
Closed

sbot crashed, re npm install failed #244

mixmix opened this issue Sep 22, 2015 · 12 comments

Comments

@mixmix
Copy link
Member

mixmix commented Sep 22, 2015

didn't pay attention to why it crashed.
I git pulled current master, deleted node_modules and ran npm install again.

hit this

TAP version 13
# test invite api
/home/scuttlebot/scuttlebot/test/invite.js:37
      if(err) throw explain(err, 'cannot create invite code')
                    ^
Error: cannot create invite code
    at /home/scuttlebot/scuttlebot/test/invite.js:37:21
    at Object._requests.(anonymous function) (/home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/packet-stream/index.js:37:5)
    at PacketStream.destroy (/home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/packet-stream/index.js:73:66)
  Error: unexpected end of parent stream
    at PacketStream.destroy (/home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/packet-stream/index.js:68:11)
    at PacketStream.write (/home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/packet-stream/index.js:121:41)
    at /home/scuttlebot/scuttlebot/node_modules/muxrpc/pull-weird.js:57:44
    at /home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/pull-stream/sinks.js:11:20
    at /home/scuttlebot/scuttlebot/node_modules/muxrpc/node_modules/pull-stream/throughs.js:97:9
    at Object.cb (/home/scuttlebot/scuttlebot/node_modules/packet-stream-codec/index.js:98:24)
    at drain (/home/scuttlebot/scuttlebot/node_modules/packet-stream-codec/node_modules/pull-reader/index.js:27:23)
    at /home/scuttlebot/scuttlebot/node_modules/packet-stream-codec/node_modules/pull-reader/index.js:44:18
    at Object.cb (/home/scuttlebot/scuttlebot/node_modules/secret-stack/node_modules/secret-handshake/node_modules/pull-box-stream/index.js:131:18)
    at drain (/home/scuttlebot/scuttlebot/node_modules/secret-stack/node_modules/secret-handshake/node_modules/pull-box-stream/node_modules/pull-reader/index.js:24:14)
npm ERR! Test failed.  See above for more details.

@mixmix
Copy link
Member Author

mixmix commented Sep 22, 2015

in good news npm install -g scuttlebot is working, so using that now !

@pfrazee
Copy link
Contributor

pfrazee commented Sep 22, 2015

Yes, glad to hear -g is working. Testing sbot for myself now...

@pfrazee
Copy link
Contributor

pfrazee commented Sep 22, 2015

Did you run those tests on a pub?

@mixmix
Copy link
Member Author

mixmix commented Sep 22, 2015

no, i think those test were run by the pre-publish script when I ran npm install on the cloned repo

    "prepublish": "npm ls && npm test && noderify bin.js > sbot.js",

I think i saw a command like that one called before the tests started.

@pfrazee
Copy link
Contributor

pfrazee commented Sep 22, 2015

Yeah that's probably what triggered it. Im having trouble diagnosing this one, though, because it doesnt happen for me.

So what I'm wondering is, did it happen on your pub, or on your personal device? If it's on a pub, it'll have a public IP, which may alter the behavior and account for why I dont get an error, but the pub does.

@mixmix
Copy link
Member Author

mixmix commented Sep 22, 2015

Yes those tests were on pub, it was me trying to get the pub up and running
using the cloned master branch (because previously -g had been failing)

trying npm install on scuttlebot repo locally now. I'll assume that
works, but let you know if it doesn't

On Tue, 22 Sep 2015 at 21:47 Paul Frazee notifications@github.com wrote:

Yeah that's probably what triggered it. Im having trouble diagnosing this
one, though, because it doesnt happen for me.

So what I'm wondering is, did it happen on your pub, or on your personal
device? If it's on a pub, it'll have a public IP, which may alter the
behavior and account for why I dont get an error, but the pub does.


Reply to this email directly or view it on GitHub
#244 (comment).

@pfrazee
Copy link
Contributor

pfrazee commented Sep 22, 2015

Huh, tried it on a public device, didn't have a problem. Have you tried installing again?

@mixmix
Copy link
Member Author

mixmix commented Sep 22, 2015

npm install worked fine locally. haven't tried it on server since npm install -g worked fine.

want me to try it again ?

On Tue, 22 Sep 2015 at 22:24 Paul Frazee notifications@github.com wrote:

Huh, tried it on a public device, didn't have a problem. Have you tried
installing again?


Reply to this email directly or view it on GitHub
#244 (comment).

@pfrazee
Copy link
Contributor

pfrazee commented Sep 22, 2015

hmm, no that's ok. Going to leave this open, in case somebody else experiences it. Weird bug.

@dominictarr
Copy link
Contributor

This might be a weird configuration edge case.
by default it refuses to create an invite unless you have a public ip address
https://github.com/ssbc/scuttlebot/blob/master/plugins/invite.js#L53-L57

but there is a option to turn that off via allowPrivate

this UX bug where npm runs the prepublish script when you run npm install even though you said you wanted prepublish not prepublishorinstall is really annoying. The only person who seems to think it's the right idea is @isaacs. But a bit of digging npm/npm#3059 (comment) revealed that if you run npm install --production it doesn't run.

Okay I have just made a PR to npm to fix this... npm/npm#9722 🙏

@ahdinosaur
Copy link
Contributor

hehe @dominictarr 😂. to fix the prepublish script without help from the gods, in-publish should help.

@ahdinosaur
Copy link
Contributor

felt a stroke of inspiration and did another PR, it really should be changed.

@pfrazee pfrazee closed this as completed Sep 30, 2015
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

4 participants