Err HDK not registered - Hashing Data in Sweettest

I’m getting the error bellow when calling

let entry_hash = HoloHashB64::from(hash_entry(input).unwrap());

from a test using sweettest.

###HOLOCHAIN_SETUP_END###
FATAL PANIC PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: Guest("HDK not registered"),
    ),
}

and using the following leads to a ZomeFnNotExsist,

    let entry_hash: EntryHash = conductor.call(
        &cell_alice.zome("ZOME_NAME"),
        "hash_entry", 
        input).await;

How does one get the hash of some data in a sweettest?

@shanedeeodonnell I found this when googling the error Guest("HDK not registered").

I was also trying to use hash_entry from sweetest. I got the same failure trying to use another hdk method ( create_entry) from sweetest.

I ended up doing what you did in the second code block: doing my hash_entry within an hdk_extern function. That worked for me.

This is an old thread, so I trust you’ve worked it out; if others are having trouble please post more details here.