Encountered an error and deployment was not successful

Hi team, we’ve been trying to deploy and get this error.

RUNNING INITIALIZATION SCRIPT :

  • make dabl-parties.json
    /Library/Developer/CommandLineTools/usr/bin/make -C ui dabl-parties.json
    ./generateDablPartiesJson.py participants.json > dabl-parties.json
  • sleep 60
  • scripts/ledger-setup.sh ui/participants.json ui/dabl-parties.json --json-api
    Exception in thread “main” com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: UNKNOWN: List(JsonError: Cannot resolve template ID, given: TemplateId(Some(8311d420d8f5adaea2a865f658ade0339275dae138a34613e25be77ca5eb4948),Roles.AdminRole,AdminRole))
    Daml stacktrace:
    submit at 8311d420d8f5adaea2a865f658ade0339275dae138a34613e25be77ca5eb4948:Tests.DamlHub:36
    at com.daml.lf.engine.script.Runner.$anonfun$runWithClients$10(Runner.scala:443)
    at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:439)
    at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:53)
    at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
    Caused by: io.grpc.StatusRuntimeException: UNKNOWN: List(JsonError: Cannot resolve template ID, given: TemplateId(Some(8311d420d8f5adaea2a865f658ade0339275dae138a34613e25be77ca5eb4948),Roles.AdminRole,AdminRole))
    at com.daml.lf.engine.script.ledgerinteraction.JsonLedgerClient.$anonfun$commandRequest$1(JsonLedgerClient.scala:484)
    at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
    … 7 more
    daml-helper: Received ExitFailure 1 when running
    Raw command: java -Dlogback.configurationFile=/Users/lesliecanete/.daml/sdk/1.18.3/daml-sdk/script-logback.xml -jar /Users/lesliecanete/.daml/sdk/1.18.3/daml-sdk/daml-sdk.jar script --dar damlhub/model/.daml/dist/overtime-0.1.0.dar --participant-config ui/participants.json --input-file ui/dabl-parties.json --script-name Tests.DamlHub:initializeUser --json-api

@Blessie – could you please advise where you got the example application code that you are trying to run and deploy from? Not sure what the contents of your generateDablPartiesJson.py and overtime-0.1.0.dar are, and this likely influences things.

On initial blush, are you sure you have built and deployed the latest version of your DARs and uploaded to damlhub - the “cannot resolve template ID” typically comes when there is a mismatch between the local dar version you are running with and the dar you have deployed to the remote ledger (in this case your DAML Hub hosted ledger)

Thank you. We reverted it to 2.2.0. But still got the same error related to “cannot resolve template ID”.

How are you building your application? Have you uploaded your rebuilt dar to daml hub?

Hi, thanks for the assistance. It is now working after we changed the package.json to 2.2.0:
@daml/ledger”: “2.2.0”,
@daml/react”: “2.2.0”,
@daml/types”: “2.2.0”,