Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Using jsipfs pin add #1953

Closed
grantlouisherman opened this issue Mar 20, 2019 · 1 comment
Closed

Using jsipfs pin add #1953

grantlouisherman opened this issue Mar 20, 2019 · 1 comment
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked

Comments

@grantlouisherman
Copy link
Contributor

  • Version:
    0.35.0-rc.1
  • Platform:
    MacOS Sierra 10.12.6
  • Subsystem:
    Pin( pin add )

Type: Bug

Severity: Medium

Description:

I have been trying to pin a block's cid by running jsipfs pin add QmZjTnYw2TFhn9Nn7tjmPSoTBoY7YRkwPzwSrSbabY24Kp in the command line 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

Steps to reproduce the error:

const ipfs = await argv.getIpfs()
const { cid } = await ipfs.block.put(data, argv)
await ipfs.pin.add(cid)

or in the command line run:
jsipfs pin add any CID created by a block

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/expert Having worked on the specific codebase is important P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked labels Jul 16, 2019
@achingbrain
Copy link
Member

achingbrain commented May 31, 2023

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

If you are still having this problem please migrate to Helia.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants