Key/Module not available when deploying to DAML Hub
- dylan_obsidianOP
I get this error when deploying to DAML Hub while using daml-finance, other daml-finance modules are completely fine without having to do anything extra. Unpacking the dar that I’ve uploaded to DAML Hub shows that the DALF file for the missing module is there.
Exception in thread "main" com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: key not found: 4b5bf7a6465e5e11800a03c131a5759565edd3ff9cfc43f41d1f7fbc72255587:Daml.Finance.Interface.Settlement.Instruction:Instruction - alex.graham
Hi @dylan_obsidian ,
Is this a custom script you’ve written or one found with the
daml-financeor reference app?Can you confirm that the script runs correctly against a locally running ledger?
Thanks,
Alex - dylan_obsidian
Hi @alex.graham, This is a custom script I’ve written. The script works fine when I run
daml scriptagainst a local running ledger (viadaml sandbox) - alex.graham
Interesting. Do you mind sharing the script, or at least the section of the script where you believe the error is occurring? If you don’t feel comfortable sharing code, can you let us know which
daml-financetemplates and interfaces you’re using, and what choice/how you’re exercising it to help you debug this?Thanks,
Alex - dylan_obsidian
@alex.graham ~
The relevant code isinstructionViews <- forA instructionCids $ \icid -> do iv <- submit borrower_alice $ exerciseCmd icid Instruction.GetView with viewer = user pure (icid, iv)and
InstructionisDaml.Finance.Interface.Settlement.Instruction
This is surrounded bydebugand this is the exact spot where where it fails - alex.graham 1
Hi @dylan_obsidian,
There seems to be an incompatibility with interfaces and the JSON API that we’re looking into.
In the meantime, you can run
daml scriptthrough the GRPC API instead by:- Removing the
https://in the"host"fields of theparticipants.jsonfile - Removing
--json-apiand adding--tlsto thedaml scriptcommand
Let me know if that doesn’t work.
- Removing the