Daml Script Error - java.lang.IllegalArgumentException: unknown definition

Hi Guys
I am currently trying to run daml scripts against a Ledger, even created a new Ledger with all necessary parties and DAR files in order to do so . I run the following CMD :

daml script --participant-config participants.json --json-api --dar .dev/target/gambyl-ledger-0.0.1.dar --script-name Scripts.Bootstrap.Demo:demoUpdateEvents --input-file script-input.json

and get the following error :

Exception in thread "main" java.lang.IllegalArgumentException: unknown definition d03ec8006a59f179c0c0c44501436da9ee73767cf0bcd9d0fcac47ad831f4912:Scripts.Bootstrap.Demo:demoUpdateEvents while looking for value d03ec8006a59f179c0c0c44501436da9ee73767cf0bcd9d0fcac47ad831f4912:Scripts.Bootstrap.Demo:demoUpdateEvents
	at com.daml.lf.data.package$.$anonfun$assertRight$1(package.scala:10)
	at scala.util.Either.fold(Either.scala:190)
	at com.daml.lf.data.package$.assertRight(package.scala:10)
	at com.daml.lf.engine.script.Runner$.run(Runner.scala:309)
	at com.daml.lf.engine.script.RunnerMain$.$anonfun$main$12(RunnerMain.scala:108)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
	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)
daml-helper: Received ExitFailure 1 when running
Raw command: java -Dlogback.configurationFile=/Users/franciscomendes/.daml/sdk/1.17.1/daml-sdk/script-logback.xml -jar /Users/franciscomendes/.daml/sdk/1.17.1/daml-sdk/daml-sdk.jar script --participant-config participants.json --json-api --dar .dev/target/gambyl-ledger-0.0.1.dar --script-name Scripts.Bootstrap.Demo:demoUpdateEvents --input-file script-input.json

That error means that the script could not be found. Double check that your module name is Scripts.Bootstrap.Demo and that the name of the script is demoUpdateEvents. Also make sure that you actually recompiled after you added the script.

Thank you, that worked I had multiple scripts and one of the one I needed to run was an “s” short.

However I have another problem when executing the script, this is a Standalone Script it will not be run for Ledger Initialisation, but afterwards it is something we will run whenever processes on the ledger Fail, right now I am quering for contracts that exist in our integration and I can see them on damlhub under the party I am querying for, and the queries still come empty, as I have multiple ledger running How do I know that script is actually running against the right DAmlHub Env, or what would be the reason causing the script not to find any contract on the query assuming both parties have visibility over the contract

here is the code, and the query/script response

franciscomendes@INT17340370 gambyl-daml % PARTIES=cat ledger-parties.json
franciscomendes@INT17340370 gambyl-daml % CREDENTIALS=cat configs/integration-credentials.json
franciscomendes@INT17340370 gambyl-daml % echo “{"parties":${PARTIES},"credentials":${CREDENTIALS}}” > script-input.json
franciscomendes@INT17340370 gambyl-daml % daml script --participant-config participants.json --json-api --dar .dev/target/gambyl-ledger-0.0.1.dar --script-name Scripts.Bootstrap.Demo:demoUpdateEvent --input-file script-input.json
[DA.Internal.Prelude:549]: "Starting Script to Push Pending EventUpdates to the Ledger "
[DA.Internal.Prelude:549]: “Starting BackUp Event Update Push to Ledger”
[DA.Internal.Prelude:549]: “enetPulse LedgerPartyId’ledger-party-18638410-b315-4181-af76-43d141392be2::1220a862f56947b4cbf022fb64ff516bdd33098c79e10892570e2c0c251e5b5c0c61’”
[DA.Internal.Prelude:549]: “Gambyl LedgerPartyId’ledger-party-0b8e28be-2713-4229-ab4d-b230e660a19c::1220a862f56947b4cbf022fb64ff516bdd33098c79e10892570e2c0c251e5b5c0c61’”
[DA.Internal.Prelude:549]: “No Update Events Found”
franciscomendes@INT17340370 gambyl-daml %

Script :

    debug  "Starting BackUp Event Update Push to  Ledger"

    debug $ "enetPulse LedgerPartyId"  <> show (enetPulse)
    debug $ "Gambyl LedgerPartyId"  <> show (gambyl)

    events <- query @EnetPulseIntegration.EventInstrumentUpdate enetPulse

    when (null events) $ do
      debug $ "No Update Events Found"