Can't commit a single entry, please help

I’m at a complete loss as to what’s going wrong here, every time my code reaches a create_entry call, it crashes out with a CallError("RuntimeError: unknown error")!

Here is my code:

use hdk3::prelude::*;

fn init(_: ()) -> ExternResult<InitCallbackResult> {

struct StrTest(String);

fn test(input: String) -> ExternResult<HoloHash<holo_hash::hash_type::Header>> {

I have tried with at least 3 revisions of Holochain now (running nix-shell --argstr flavor happDev in a local repository, I don’t know which others I ran but I just tried 5050f6c9) and I can’t run a single thing!

I couldn’t find any other (working) way of interacting with the conductor than through the Node API and none of the versions of Holochain I’ve tried (including the revisions mentioned on the develop and register-dna branches of the Node API) have been able to commit a single entry!

I’ve confirmed that the code is running (I have been able to use the debug! macro), but whenever it reaches a create_entry call it crashes out. Sometimes the conductor begins spamming the logs with errors every 200 milliseconds afterwards:

holochain::conductor::conductor: error dispatching network event error=ConductorError(CellMissing(CellId(DnaHash(uhC0kNbHakNWH5yW4cttlpBxQD_cuRUNrucSuWSFLXifeMfgCWTHP), AgentPubKey(uhCAkGYpwBxBUGh09LoxYPlXPsi4t2Tee2uSuST0_QrigCOLcyoBS))))

Sometimes it prints out a different agent key during that spam, not sure why.

What on earth am I doing wrong? D:
(and how do I remove apps from the conductor? I had to create an awful script that just registers apps with an increasing number in its name)

I think you are hitting this bug:

Not really a bug, just a misleading error. You need to declare your struct as an entry in this zome.

As far as removing apps from the conductor, have you tried holochain-run-dna? It’s temporary but I think it works really well in development contexts. In the very short term, we’ll get support for the hc cli tool that will accomodate that and more options.

Oh man, that must be it then! (can’t test it at the moment though) I didn’t even know that callback existed… I know documentation isn’t the highest priority right now but is there anywhere that the callbacks are documented?

Out of curiosity, what are you building these days? I know a while back you were working on Comet. Is that still your main project or have you moved on to a new idea?

I’ve moved on to other projects. I still think the idea behind the voting system in Comet is a neat idea but I don’t think I could do it justice. The app I was working on that sparked this thread was just a little implementation of my Holochain DNS replacement idea

I am currently working on something quite exciting for me (not Holochain related, but I may take some inspiration where possible), but it will certainly take long time to get in a working state due to its scope and I’m not ready to reveal it to the world just yet.

1 Like