Skip to content

fails when config.connections.incoming.net[].external is array (as is documented)聽#62

Description

@ahdinosaur

hallo! 馃樅

i just ran into an error after upgrading ssb-pub to a less broken version of ssb-server: ahdinosaur/ssb-pub#37

when running sbot invite.create 1, i get the error:

/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:123
      throw err
      ^
{
  message: 'resultHost.replace is not a function',
  name: 'TypeError',
  stack: 'TypeError: resultHost.replace is not a function\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/plugins/net.js:124:31)\n' +
    '    at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:111:19\n' +
    '    at Array.map (<anonymous>)\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:110:22)\n' +
    '    at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/index.js:67:44\n' +
    '    at Array.map (<anonymous>)\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/index.js:67:10)\n' +
    '    at EventEmitter.getAddress (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/secret-stack/core.js:213:21)\n' +
    '    at EventEmitter.hooked [as getAddress] (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/hoox/index.js:10:15)\n' +
    '    at getInviteAddress (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/ssb-invite/index.js:75:18)'
}

investigating, i see that it's an issue with secret-stack (and maybe other modules too), not working when config.connections.incoming.net[].external is an array of strings, as is documented in ssb-config#connections.

i changed the config to be a single string, and this works. but was this breaking change on purpose?

for what it's worth, i'm very excited to see y'all transitioning the code base to TypeScript. seems like every time i try to upgrade anything i run into multiple undocumented breaking changes, so hopefully being more explicit about types will help us here, y'all are doing the lord's work, so to speak. 馃挏 馃憤

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions