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

Cannot use plugins.install -> TypeError: Cannot read property 'commands' of undefined #749

Closed
pbuyle opened this issue Jan 13, 2021 · 6 comments

Comments

@pbuyle
Copy link

pbuyle commented Jan 13, 2021

Is ssb-server plugins.install the right command to use to install plugins ?

I've a ssb server running through Patchwork (3.18.0.831). When trying to install plugins through the command-line with ssb-server installed with npm -g ssb-server, I get a TypeError with the message "Cannot read property 'commands' of undefined".

$ ssb-server version   
"19.4.0"
$ ssb-server plugins.install ssb-meme
/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpc-usage/index.js:9
  return o.commands
           ^

TypeError: Cannot read property 'commands' of undefined
    at isGroup (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpc-usage/index.js:9:12)
    at get (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpc-usage/index.js:14:8)
    at Object.exports.get (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpc-usage/index.js:27:10)
    at output (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:42:17)
    at /Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:78:9
    at Object._requests.<computed> (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:38:5)
    at PacketStream._onrequest (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:151:26)
    at PacketStream.write (/Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:134:41)
    at /Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15
    at /Users/pbuyle/.nvm/versions/node/v14.15.3/lib/node_modules/ssb-server/node_modules/pull-stream/sinks/drain.js:24:37

This issue is the same as #718

@austinfrey
Copy link
Contributor

@pbuyle does it change anything to use the --name flag? also try installing ssb-server@15.3.0 as it's a more stable version

sbot plugins.install --name ssb-meme

@pbuyle
Copy link
Author

pbuyle commented Jan 13, 2021

After stopping Patchwork, installing ssb-server@15.3.0 and running ssb-server start, bot plugins.install --name ssb-meme worked.

@austinfrey
Copy link
Contributor

@pbuyle ok great! if you are all set, could you close this?

@pbuyle
Copy link
Author

pbuyle commented Jan 13, 2021

@pbuyle ok great! if you are all set, could you close this?

ssb-server plugins.install --name ssb-meme works when using ssb-server@15, but with not with ssb-server@19. I don't mind closing the issue, but it seems there is bug in latest release.

@austinfrey
Copy link
Contributor

@pbuyle 15.3.0 is the current latest release of 'ssb-server'. It used to be 16+ but it got rolled back after some regressions. The version 19 being shown is separate bug :/ where the version of the underlying ssb-db plugin is shown, not the current ssb-server version.

Calling commands with ssb-server will create a client that connects to a running server instance, If running ssb-server start from the CLI, it will start a new server instance that the CLI client can connect to. If calling ssb-server commands while running an app like Patchwork, it will connect to the running server packaged with patchwork

This might be an issue that get's posted there.

@pbuyle
Copy link
Author

pbuyle commented Jan 13, 2021

👍

@pbuyle pbuyle closed this as completed Jan 13, 2021
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