ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.09k stars 3.01k forks source link

Path Resolve error: multihash length inconsistent #2827

Open louptheron opened 8 years ago

louptheron commented 8 years ago

Hi,

I am using font-awesome in my app, and when using it with ipfs I have an error :

downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:1): status=2147746065 source: https://gateway.ipfs.io/ipfs/fonts/fontawesome-webfont.woff2?v=4.6.3 font-awesome.min.css:4:14
downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:2): status=2147746065 source: https://gateway.ipfs.io/ipfs/fonts/fontawesome-webfont.woff?v=4.6.3 font-awesome.min.css:4:14
downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:3): status=2147746065 source: https://gateway.ipfs.io/ipfs/fonts/fontawesome-webfont.ttf?v=4.6.3

The log on daemon is :

18:03:03.307 ERROR core/serve: Path Resolve error: multihash length inconsistent: &{26  44 [254 164]} gateway_handler.go:458

Added files :

added Qmb4kuMC93n1fybggHyKGvHmtZ5nR9F4MbVofiRBZPSf5A build/fonts/FontAwesome.otf
added QmVWvV9n2mP6TtVnTTZyerpKTcDxYXLSZYP5zFSiqtWYhR build/fonts/fontawesome-webfont.eot
added QmY4GbxEkhX1cTFcjfcLYAEMpH3RVB8pLkGEvNSnDYk9wN build/fonts/fontawesome-webfont.svg
added Qmed99oBNc8PhDxMuhDzQuhW5b31VsHVj92gkQoz2qrvE9 build/fonts/fontawesome-webfont.ttf
added QmR98DUcutUjAsCv8PvMgKXRfNgHPkBanrGAa97VKfQYvN build/fonts/fontawesome-webfont.woff
added QmVcVAStHePcM2owokQoH1f7RGHugRGoPsrYMfQB1kHAL5 build/fonts/fontawesome-webfont.woff2
added QmcCCp4g2KrEbEfnE2ccVPXX4XRkTB1ZtV9hAsYKrhNCCA build/fonts

Is this issue related to https://github.com/ipfs/go-ipfs/issues/1458 ?

Thank you

ghost commented 8 years ago

You need to use the hash you got from ipfs add in the URL: QmcCCp4g2KrEbEfnE2ccVPXX4XRkTB1ZtV9hAsYKrhNCCA

E.g. https://ipfs.io/ipfs/QmcCCp4g2KrEbEfnE2ccVPXX4XRkTB1ZtV9hAsYKrhNCCA/fonts/fontawesome-webfont.woff2

(You can also drop ?v=4.6.3, files are version by that hash.)

ghost commented 8 years ago

Eh sorry it should be https://ipfs.io/ipfs/QmcCCp4g2KrEbEfnE2ccVPXX4XRkTB1ZtV9hAsYKrhNCCA/fontawesome-webfont.woff2

louptheron commented 8 years ago

In fact, I git add -r all my build folder, I can access to my website without any problem : all files (js, img, ...) are working fine. I am using https://github.com/danawoodman/react-fontawesome to include fontawesome to my project, but it fail loading theses fonts files. Yes, I could try to remove the ?v=4.6.3 in this component if it is the issue but I wanted to resolve it without changing the dependency source code.

louptheron commented 8 years ago

Removing ?v=4.6.3 did not resolve anything, any idea for this downloadable font: download failed ?