DAR is deployed on ledger yet json api requests cannot resolve template ID

Hi! I’ve noticed something odd that I was hoping that you could help me with.

I’ve made a deploy of a DAR file of an X daml project, on a damlhub ledger on Canton Protocol Version 7, compiled on daml version 2.10.0 with build-options target=1.17. The first deployment under these conditions worked perfectly fine, and I was able to use it as normal.

After I deployed a more updated version of the X daml project, the issue appeared; Even with a project version bump, every deployment for that same project keeps having problems resolving the template ID when I try to create a contract via JSON API. Then I noticed, when probing the list of existing package IDs in the ledger using /v1/packages endpoint, that those updated dar’s package IDs didn’t even show up on the resulting list. Only the first deploy’s package ID remained usable and present on the list. But all the mentioned DARs appear on the damlhub UI as usual and are downloadable through there as they should. I even downloaded them directly from the deployment page to ensure that the package ID matched the one that I was using on the JSON API, and they did.

After that, I’ve tried to remove the build-options from the yaml file, recompile it like that, and redeploy to the same ledger again. This time, the DAR behaves as normal I even in subsequent deployments, all package IDs remained usable.

Any idea on how to fix this when the project is built with the intended options? Thanks.

EDIT:
To better clarify my issue, I have no upgrades: set on my yaml. Added passage from the Daml Docs referencing said configuration field.

EDIT#2:
Just to stress this detail, upgrading the project version doesn’t help with this problem. I don’t think it’s viable to switch between 1.15 and 1.17 because I was hopeful to test the SCU tool at some point and upgrades between two different LF versions are not allowed. I’m suspecting that every time I set the build-options to 1.17, the SCU automatically enables itself even without the upgrades section on yaml file but that is narrowing its own usage. Hope somebody can help me with this matter.

Ana,

Do you see the same behaviour if you run through these same steps uploading and testing against a local daml sandbox running 2.10.1?

Could you provide a small snippet as to what is determined to be SCU incompatible between the initial DAR you uploaded and the 2nd DAR which errored out on the ledger? What errors did you see in the participant logs?

1 Like

Thank you! It seems that upgrading to 2.10.1 fixed it as the package IDs are now showing up on /v1/packages list! :partying_face: