What can cause a '404 Not Found' error when I try to run an init script against an app deployed on Daml Hub?
- gyorgybalazsiOP
The script works against Sandbox running with the same app. The first
createcommand of the script which causes the error works when I issue it with Postman.The error message is rather cryptic:
Exception in thread "main" com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: Request to /v1/create with Some(<request body>) failed with status 404 Not Found: List() Daml stacktrace: submit at 81afc9ae8c5953ce31e7c572302178f98135220e84940618a1f4c5edafc00fc8:InitWorkflow:36 at com.daml.lf.engine.script.Runner.$anonfun$runWithClients$10(Runner.scala:444) 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:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) - cocreature
Can you show your
participants.json(without the tokens)? It looks like the url might be off. - gyorgybalazsi
It’s like this:
{ "default_participant": { "host": "https://api.projectdabl.com", "port": 443, "access_token": "xxx" }, "participants": { "gyorgy_rtledgers_com": { "host": "https://api.projectdabl.com", "port": 443, "access_token": "xxx" }, etc. - gyorgybalazsi
gyorgybalazsi:"host": "https://api.projectdabl.com", "port": 443,This is not working either:
https://api.projectdabl.com:443/v1/create - cocreature
Try replacing
https://api.projectdabl.comwithhttps://yourledgeridhere.daml.app. You can find the ledger id in your ledger settings in the hub console. - gyorgybalazsi
cocreature:https://yourledgeridhere.daml.app.This works:
"default_participant": { "host": "https://cxs7h3enaoiaaehw.daml.app", "port": 443, "access_token": "xxx" }, "participants": { "gyorgy_rtledgers_com": { "host": "https://cxs7h3enaoiaaehw.daml.app", "port": 443, "access_token": "xxx" }, etc.Why isn’t this in the exported json?
- cocreature 1
Definitely a bug, we’ll make sure to fix it.
- gyorgybalazsi
Thanks!