Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs files rm fails #7172

Closed
Luflosi opened this issue Apr 16, 2020 · 3 comments
Closed

ipfs files rm fails #7172

Luflosi opened this issue Apr 16, 2020 · 3 comments
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up topic/MFS Topic MFS

Comments

@Luflosi
Copy link
Contributor

Luflosi commented Apr 16, 2020

Version information:

go-ipfs version: 0.4.23-6ce9a355f
Repo version: 7
System version: amd64/linux
Golang version: go1.14

Using the latest Web UI bafybeigxqbvc6qxk2wkdyzpkh7mr7zh5pxbvpjb6a6mxdtpwhlqaf4qj5a.

Description:

When adding the IGIS git repo CID to the files using the Web UI, it can never be removed again, not with the Web UI and not with the command line. At least I don't know of any obvious way to do so.

Steps to reproduce:

  1. Open the Web UI
  2. Click on "Explore" on the left
  3. Click on "IGIS git repo"
  4. Copy the CID (z8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE)
  5. Click on "Files" on the left
  6. Click "Add"
  7. Click "From IPFS"
  8. Paste the CID
  9. Click "Add"
  10. An error message "Failed to add files to IPFS. Please try again." is displayed but the CID was added anyways
  11. Trying to remove the CID using the Web UI again fails
  12. Executing ipfs files rm /z8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE fails with "Error: unrecognized node type in cache node"

I would expect to either be able to remove anything I added again or to not be able to add something that shouldn't be added.

@Luflosi Luflosi added the kind/bug A bug in existing code (including security flaws) label Apr 16, 2020
@Stebalien Stebalien added the topic/MFS Topic MFS label Apr 16, 2020
@Stebalien
Copy link
Member

I can confirm. Git "objects" aren't files, that's why this isn't working. However,

  1. We shouldn't be adding the file in the first place.
  2. We shouldn't fail to remove the file.

@Stebalien Stebalien added this to the go-ipfs 0.6 milestone Apr 16, 2020
@hsanjuan hsanjuan added the P1 High: Likely tackled by core team if no one steps up label Apr 17, 2020
@Stebalien Stebalien modified the milestones: go-ipfs 0.6, go-ipfs 0.7 Jun 11, 2020
@jacobheun jacobheun modified the milestones: go-ipfs 0.7, go-ipfs 0.8 Aug 27, 2020
@jacobheun jacobheun added this to Backlog in Go IPFS Roadmap Sep 15, 2020
@BigLep BigLep modified the milestones: go-ipfs 0.8, go-ipfs 0.10 May 17, 2021
@BigLep BigLep moved this from Old Backlog (Clean Up) to Backlog in Go IPFS Roadmap Jul 1, 2021
@BigLep BigLep removed this from Backlog in Go IPFS Roadmap Jul 1, 2021
@BigLep BigLep removed this from the go-ipfs 0.10 milestone Jul 1, 2021
@lidel
Copy link
Member

lidel commented Jul 1, 2021

I believe this is a duplicate of #7999

@ Luflosi fyi the fix/workaround here is to add --force flag:

$ ipfs files rm --force  /z8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE

@lidel lidel closed this as completed Jul 1, 2021
@Luflosi
Copy link
Contributor Author

Luflosi commented Jul 5, 2021

Your command worked, thank you.
However, I think it should not be possible to add objects like that in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up topic/MFS Topic MFS
Projects
None yet
Development

No branches or pull requests

6 participants