holochain / clutter

Fully distributed twitter built on holochain
161 stars 22 forks source link

`hcdev web` fails after a fresh clone because of `BasedOn` key in dna.json #80

Closed maackle closed 6 years ago

maackle commented 6 years ago

Steps to reproduce:

git clone https://github.com/Holochain/clutter.git
cd clutter/ui-src
yarn install
yarn run build
cd ..
hcdev web

Output: web: error decoding DNA file /Users/michael/explore/clutter/dna/dna.json: json: cannot unmarshal object into Go struct field DNAFile.BasedOn of type hash.Hash

If I remove the "BasedOn" key at https://github.com/holochain/clutter/blob/develop/dna/dna.json#L15, I can run the app.

hcdev -v => hcdev version 0.0.5 (holochain 24)

ko-redtruck commented 6 years ago

I have the same issue on Windows and Ubuntu

pythagorean commented 6 years ago

Note that removing the BasedOn key from the dna.json file enables this to work except it will emit a fail on running hcdev test:

Test: posts:10 Expected: null Got: {"H":"QmX8tRb7nDoAB7B17CzMoALVmgGeLLpLAziFBopiD8jM7d","author":"buffaloBill","post":"{\"Links\":[{\"Base\":\"QmNbtqpnaLsx7vsdTptg6TwJzQWB5QnDwjpkufC4F5i5W6\",\"Link\":\"Qmbh1ncpRLL1Zjdm8FNwS29rcunyQLJEQN5SyRcER1MPZc\",\"Tag\":\"post\"}]}"}

maackle commented 6 years ago

I'm a total holochain noob, so all I know is that I followed the instructions to get it running, and I encountered an error. I don't know what the implications are of removing BasedOn, so perhaps someone with more knowledge than me can suggest a change that fixes the error without breaking anything else. Seems discouraging to new users if the canonical hello world app fails on startup.

zippy commented 6 years ago

You can remove it with impunity. This comes from a small change in core that hasn't made it's way into the main clutter branch. We should get that cleared up this week.

zippy commented 6 years ago

Hey all, this got fixed and merged to develop, so you should be able to clone with no problems now. However, please note that you won't get any UI if you use hcdev init -cloneExample because this branch doesn't have built UI, that will get fixed before the Alpha 1 release.