Using jsipfs pin add

I have been trying to pin a block’s cid by running jsipfs pin add QmZjTnYw2TFhn9Nn7tjmPSoTBoY7YRkwPzwSrSbabY24Kp, and I have also tried doing it in the the code that looks like this
ipfs.pin.add(cid, { recursive:true }) where the CID is a normal CID like this

CID { codec: 'dag-pb', version: 0, multihash: <Buffer 12 20 a9 48 90 4f 2f 0f 47 9b 8f 81 97 69 4b 30 18 4b 0d 2e d1 c1 cd 2a 1e c0 fb 85 d2 99 a1 92 a4 47> }

I have also tried:
await ipfs.pin.add(multihash.toB58String(cid.buffer))
await ipfs.pin.add(cid.toBaseEncodedString())

However, every-time I try one of these approaches I get this error: /js-ipfs/node_modules/protons/src/compile/decode.js:193 throw new Error('Groups are not supported') ^Error: Groups are not supported

And Im not sure why this is happening. When you look at the Go code you can see that when pinning a block you simply are passing in the CID: https://github.com/ipfs/go-ipfs/pull/5969/files

Have you tried to ask on GitHub?

Maybe here you will find more help: https://github.com/ipfs/js-ipfs/issues

I’m getting the same issue - would you mind opening an issue on https://github.com/ipfs/js-ipfs/issues

My stack trace:

Error: Groups are not supported
    at skip (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/protons/src/compile/decode.js:193:13)
    at Object.decode (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/protons/src/compile/decode.js:156:18)
    at Object.deserialize (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/ipld-dag-pb/src/util.js:80:28)
    at waterfall (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/ipld/src/index.js:359:21)
    at nextTask (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/async/waterfall.js:16:14)
    at next (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/async/waterfall.js:23:9)
    at /Users/alan/Code/protocol-labs/js-ipfs/node_modules/async/internal/onlyOnce.js:12:16
    at bs.get (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/ipld/src/index.js:356:9)
    at getMany (/Users/alan/Code/protocol-labs/js-ipfs/node_modules/ipfs-bitswap/src/index.js:208:9)
    at /Users/alan/Code/protocol-labs/js-ipfs/node_modules/async/internal/map.js:32:9
1 Like