-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
HTTP gateway returns 0 bytes, ipfs cat returns proper file. #7916
Comments
This comment has been minimized.
This comment has been minimized.
@TheDiscordian did you add that file into IPFS or fetch it from somewhere else? If you added it what parameters did you use to Somehow it looks like you have a UnixFS node which has the |
Perhaps to offer more clarity, I used ipfs-sync to add the files. So to add that file, it'd run |
It's not. I wonder if this is a bug in MFS? |
Yeah, this is a bug in the trickle-dag code. |
Awesome, do you guys need anything else from me at all? Itching to remove this mess from my MFS and try to get the directory working correctly. Additionally, any idea on the cause? Did I hammer the MFS too quickly? |
No, it looks like there's just a bug in MFS. Basically:
1. We create an empty file with type RAW.
2. We then add chunks to this RAW node. At that point, we'd need to convert it into a node with type FILE but we don't.
|
Is this still an issue since ipfs/go-unixfs#88 is merged? |
@Stebalien might this be related to #6936? |
I did some related tests with 0.9.0-rc2 and was not able to replicate the "HTTP gateway returns 0 bytes" error with new data. I found weird DAG layout, but the file loads fine via gateway (details in #6936 (comment)), so assuming this one got fixed sometime between 0.8.0 and 0.9.0-rc2. I was not able to create a dag-pb file of a
and then execute truncating writes against it a few times:
...the produced root CID is.. CIDv0 ( I confirmed that the "raw dab-pg" CID:
@RubenKelevra I'm closing this (as the "HTTP gateway returns 0 bytes" bug seems to be fixed in 0.9.0-rc2), but we need to figure out the messy DAG layouts produced by |
Version information:
Description:
Hello. I've recently tried adding ~19k files (2GB) to IPFS/MFS via the
files write
command. It seemed to work well, andipfs cat
can return the files correctly. However when using IPFS Companion, many files show the size of "-", although the total directory size is correct. At this point, I verified my blocks, and my pins. Several thousands pins returned errors, so I removed all the erroring pins. I've since updated the directory to get a new CID, and updated IPNS (and pins). I still have the issue of the HTTP gateways returning 0 bytes though.The directory in question is located here:
http://portal.thedisco.zone/osrs/index.html
/ipns/portal.thedisco.zone/osrs/index.html
/ipfs/QmasYd9docsEaozsdZxCp29yfoZoUJDrvqgkT8Hry66N24
Some files seem to work fine, but most don't. I'm using
index.html
as an example there, as that's the first file you'd see. To reiterate the issue:Running
ipfs cat QmasYd9docsEaozsdZxCp29yfoZoUJDrvqgkT8Hry66N24
returns the expected HTML page, even on an external node I just setup. However attempting to view that file through a gateway, doing something like https://ipfs.io/ipfs/QmasYd9docsEaozsdZxCp29yfoZoUJDrvqgkT8Hry66N24 will return 0 bytes.As I'm quite new here, I'm not sure why the HTTP gateway, and using IPFS directly are so different. The galacteek browser handles the pages just fine, but I'm assuming that doesn't use the regular HTTP gateway over port 8080.
Edit: FWIW, I tried
ipfs get
(which I've never used, I just usecat
), and I immediately get:The text was updated successfully, but these errors were encountered: