fazo96 / ipfs-boards

a truly distributed social platform for the browser with no backend and no external applications required
http://boards.ydns.eu
219 stars 20 forks source link

I can't go past setting the profile #92

Open croqaz opened 8 years ago

croqaz commented 8 years ago

Hello, i love the idea of your app and i really want to see it work! I have IPFS, i tried version 0.3.10, but your app needs the latest.

So i'm using 0.4-dev fresh install. I ran ipfs init, ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1","http://localhost","http://ipfs.ydns.eu"]' then ipfs daemon.

I can't go past the profile. I'm using Firefox browser, in Ubuntu.

The interface says " Ooops Error: multihash length inconsistent: &{24 4 [55 60 240 230 66]} ".

The command line in Firefox says:

Version hash is QmXnrcc7SYEGxGktW9QvbUxBtvFV2JoPgozDStmP8Pgipf 3.app.js:9:29227
10:30:42.849 GET 
XHR 
http://localhost:5001/api/v0/cat [HTTP/1.1 500 Internal Server Error 0ms]
10:30:42.875 QmQ7VJibB6D4kGhBx5saBwo3TKuS5DLZokryr5rF4aS6qT not a valid profile: Error: no link named "ipfs-boards-profile" under QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
Stack trace:
s/</u<@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:18:24064
s/<@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:18:24047
d.Client.prototype.request/k@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:27589
e.once/n@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:9697
d.Client.prototype.request/E@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:27796
n@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:7:27307
n.prototype.emit@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:7:26186
p.prototype._connect@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28838
p.prototype._onXHRProgress@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28685
p.prototype._onFinish/c.onreadystatechange@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28336
 3.app.js:9:21662
10:30:58.382 Generating profile: Object { name: "Cro", description: "Descr" } 3.app.js:9:16114
10:30:58.852 GET 
XHR 
http://localhost:5001/api/v0/files/rm [HTTP/1.1 500 Internal Server Error 0ms]
10:30:58.859 GET 
XHR 
http://localhost:5001/api/v0/files/rm [HTTP/1.1 500 Internal Server Error 0ms]
10:30:59.241 added profile to IPFS: undefined 3.app.js:9:16866
10:30:59.244 GET 
XHR 
http://localhost:5001/api/v0/files/cp [HTTP/1.1 500 Internal Server Error 0ms]
10:30:59.255 Profile Publish error: Error: multihash length inconsistent: &{24  4 [55 60 240 230 66]}
Stack trace:
s/</u<@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:18:24064
s/<@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:18:24047
d.Client.prototype.request/k@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:27589
e.once/n@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:9697
d.Client.prototype.request/E@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:8:27796
n@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:7:27307
n.prototype.emit@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:7:26186
p.prototype._connect@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28838
p.prototype._onXHRProgress@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28685
p.prototype._onFinish/c.onreadystatechange@http://ipfs.ydns.eu/ipns/boards.ydns.eu/3.app.js:36:28336

Any ideas?

fazo96 commented 8 years ago

The error is here:

10:30:59.255 Profile Publish error: Error: multihash length inconsistent: &{24 4 [55 60 240 230 66]}

There's something wrong with actually publishing the profile via IPNS. The hash to publish is clearly wrongly read from the result of building the profile.

I'll look into it as soon as I have time, thanks a lot for the bug report! :+1:

fazo96 commented 8 years ago

I tried on chrome and it seems to work. It's pretty unstable at the moment, but I already know how to fix the mess, I need some features from go-ipfs or I need to do #93 and #83

I can't get it to work on firefox because for some reason the browser won't talk to my daemon (it says the server responded with 0). Did you encounter this error too?

This is all very unstable at the moment. I guess we'll have more luck when the js implementation of IPFS arrives (it will use the same API, so no big rewrites) or wrapping the web app into a desktop app.

Still it would be nice to figure out what caused this

Eelviny commented 7 years ago

Just want to give a quick +1 to this issue - Here's my API version string for replicating the issue.

{"Version":"0.4.4","Commit":"","Repo":"4","System":"amd64/linux","Golang":"go1.7.1"}

Running on latest Chromium, Arch Linux.