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

CID generated with ipfs object put crashes ipfs files rm #8144

Closed
KB1RD opened this issue May 17, 2021 · 2 comments
Closed

CID generated with ipfs object put crashes ipfs files rm #8144

KB1RD opened this issue May 17, 2021 · 2 comments
Labels
need/triage Needs initial labeling and prioritization topic/files Topic files topic/MFS Topic MFS

Comments

@KB1RD
Copy link

KB1RD commented May 17, 2021

Describe the bug
Once adding said CID, the files page becomes blank each time you open it. You must hit the back button and refresh the page to make it go away. I tried removing all pins, garbage collecting the local repo, and destroying all local browser data. Only nuking the whole data directory for IPFS seems to make it go back to normal.

To Reproduce
Steps to reproduce the behavior:

  1. Run echo '{ "Data": "abc" }' | ipfs object put. This should output QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V.
  2. Click on the Files tab, click "Import", click "From IPFS", enter this CID.
  3. The screen will now become blank and you will never be able to access the files tab. I recovered only by destroying my node (installed via snap): rm -rf ~/snap/ipfs/common/*

Expected behavior
This shouldn't happen.

Screenshots
It's just a white screen. There are some ambiguous errors in console.

Desktop (please complete the following information):

Smartphone (please complete the following information):
N/A

Additional context
IPFS at latest Snap version.

@ipfs ipfs deleted a comment from welcome bot May 18, 2021
@lidel lidel transferred this issue from ipfs/ipfs-webui May 18, 2021
@ipfs ipfs deleted a comment from welcome bot May 18, 2021
@lidel
Copy link
Member

lidel commented May 18, 2021

@KB1RD thank you for filling this, ipfs object API is being deprecated (#7936) in favor of ipfs dag and dag-cbor, consider moving away from using it. Still, this is a bug, and should be fixed.


(moving to go-ipfs, as this is MFS/Object API bug)

I can confirm this is a bug present in go-ipfs 0.9.0-rc1.

Copying problematic DAG to MFS works.
ipfs files ls also works, but ipfs ls with direct CID of the parent dir with problematic DAG produces error:

$ echo '{ "Data": "abc" }' | ipfs object put
QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V

$ ipfs files mkdir /my-dir
$ ipfs files cp /ipfs/QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V /my-dir/foo

$ ipfs files ls /my-dir
foo

$ ipfs ls $(ipfs files stat --hash /my-dir)
Error: unexpected EOF

Then, it is impossible to remove the object, it seems:

$ ipfs files rm /my-dir/foo 
Error: unexpected EOF

@lidel lidel changed the title Adding CID generated with ipfs object put crashes webapp CID generated with ipfs object put crashes ipfs files rm May 18, 2021
@lidel lidel added the need/triage Needs initial labeling and prioritization label May 18, 2021
@lidel
Copy link
Member

lidel commented May 18, 2021

Ok, this seems to be a duplicate of #7999 (comment) so I'm closing this, as we no longer support ipfs object API.

@KB1RD for now, you can fix this by removing problematic file with --force:

$ ipfs files rm --force /my-dir/foo 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization topic/files Topic files topic/MFS Topic MFS
Projects
None yet
Development

No branches or pull requests

2 participants