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: plugin at:ssb-foo expected name:ssb-foo but had:foo #675

Open
christianbundy opened this issue May 30, 2019 · 5 comments
Open

Error: plugin at:ssb-foo expected name:ssb-foo but had:foo #675

christianbundy opened this issue May 30, 2019 · 5 comments
Labels

Comments

@christianbundy
Copy link
Contributor

Currently happening with all plugins installed with ssb-server plugins.install.

ssb-server 15.0.1 /home/christianbundy/.ssb logging.level:notice
my key ID: +oaWWDs8g73EZFUMfW37R/ULtFEjwKN/DczvdYihjbU=.ed25519
/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/load-user-plugins.js:54
        throw new Error('plugin at:'+module_name+' expected name:'+name+' but had:'+(plugin||{}).name)
        ^

Error: plugin at:ssb-identities expected name:ssb-identities but had:identities
    at module.exports (/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/load-user-plugins.js:54:15)
    at Object.module.exports.loadUserPlugins (/home/christianbundy/.config/yarn/global/node_modules/ssb-plugins/index.js:240:55)
    at Object.<anonymous> (/home/christianbundy/.config/yarn/global/node_modules/ssb-server/bin.js:65:26)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
@christianbundy christianbundy self-assigned this May 30, 2019
@christianbundy
Copy link
Contributor Author

Workaround is editing ~/.ssb/config to hardcode { name: 'foo' } manually.

@christianbundy
Copy link
Contributor Author

cc: @dominictarr am I doing something wrong here? For example, ssb-server plugins.install ssb-identities sets the config as:

{
  "plugins": {
    "ssb-identities": {
      "name": "ssb-identities"
    }
  }
}

which throws the above error. The fix is to manually change this to:

{
  "plugins": {
    "ssb-identities": {
      "name": "identities"
    }
  }
}

@christianbundy christianbundy changed the title Error: plugin at:foo-identities expected name:foo-identities but had:foo Error: plugin at:ssb-foo expected name:ssb-foo but had:foo Jul 23, 2019
@christianbundy
Copy link
Contributor Author

Looks like this regression may have been made in ssbc/ssb-plugins@7ee651a, maybe we should be require()ing the plugin to get the real plugin.name? Or maybe we could circumvent the problem by just using true unless it came from the filesystem.

@kode54
Copy link

kode54 commented Feb 5, 2020

Oh, I see, I have to specify the plugin name on the command line.

@christianbundy christianbundy removed their assignment Jan 31, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the stale label Jun 2, 2021
@staltz staltz removed the stale label Jun 2, 2021
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

3 participants