You are reading content from Scuttlebutt
@kas %MbB409HgjntrKK4eCdV8CvbzjRyYecJEfx+RAVBaDVo=.sha256

ssb-ref bug

The ssb-ref@2.13.4 package is installed as a package under ssb-backlinks@0.7.3.

Consider the following few lines in ssb-ref/index.js:

   108      addr = addr.find(function (address) {
   109        return /^(net|wss?|onion)$/.test(address[0].name) && /^shs/.test(address[1].name)
   110      })

The function really ought to test if address is defined, and is an array of length >= 2. If address is undefined, as has just happened repeatedly here, sbot will crash:

~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:109
    return /^(net|wss?|onion)$/.test(address[0].name) && /^shs/.test(address[1].name)
                                                                                ^
TypeError: Cannot read property 'name' of undefined
    at ~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:109:81
    at Array.find (<anonymous>)
    at ~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:108:15
    at ~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:99:15
    at parseMultiServerInvite (~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:268:14)
    at exports.isMultiServerInvite (~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:225:14)
    at exports.isInvite (~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:231:36)
    at Object.exports.type (~/.ssb/node_modules/ssb-backlinks/node_modules/ssb-ref/index.js:303:13)
    at ~/.ssb/node_modules/ssb-backlinks/emit-links.js:20:13
    at walk (~/.ssb/node_modules/ssb-backlinks/emit-links.js:53:5)

sbotd.service: Main process exited, code=exited, status=1/FAILURE

BOOOM!! :bomb:

Join Scuttlebutt now