ahdinosaur / ssb-pub

easily host your own Secure ScuttleButt (SSB) pub in a docker container
http://butt.nz/
GNU Affero General Public License v3.0
158 stars 25 forks source link

Error in invite creation`resultHost.replace is not a function` #44

Closed RangerMauve closed 2 years ago

RangerMauve commented 3 years ago

Hello, I recently pulled the latest ssb-pub image on my digital ocean droplet and while it seems to run fine, I'm getting errors when I try to create an invite.

root@ssb-pub:~# ./sbot invite.create 1

/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)'
}

The image digest is Digest: sha256:ffc0a521f21ff4fc8af89a1454ea5dfa3d371c6415efb1fec8be9613a32fe256 and the version is 19.2.0

mplorentz commented 2 years ago

@RangerMauve I was having this issue but I just figured out how to solve it. In my config file I used to have a section like this:

"incoming": {
         "net": [
            {
               "scope": "public",
               "host": "0.0.0.0",
               "external": ["scuttle.works"],
               "port": 40008,
               "transform": "shs"
            }
         ]
      },

Removing the square brackets around my pub's domain name fixed it. So I changed ["scuttle.works"] to "scuttle.works".

RangerMauve commented 2 years ago

OMG! Thank you for that @mplorentz it's literally been months since I've been able to create new invites and I was contemplating just rebuilding the pub from scratch. 😂

mplorentz commented 2 years ago

@RangerMauve haha same. I'm doing some testing this morning and unfortunately it doesn't look like Manyverse is properly syncing with my pub, but that's a separate issue. Both this repo and https://github.com/staltz/easy-ssb-pub are marked as unmaintained. It might be time for a from-scratch approach.