What can cause a '404 Not Found' error when I try to run an init script against an app deployed on Daml Hub?
App Development8 posts290 views1 likesLast activity Jan 2022
GY
gyorgybalazsiOP
Jan 2022The script works against Sandbox running with the same app. The first create command 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)
CO
cocreature
Jan 2022Can you show your participants.json (without the tokens)? It looks like the url might be off.
GY
gyorgybalazsi
Jan 2022It’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.
GY
gyorgybalazsi
Jan 2022"host": "https://api.projectdabl.com", "port": 443,
This is not working either:
https://api.projectdabl.com:443/v1/create
CO
cocreature
Jan 2022Try replacing https://api.projectdabl.com with https://yourledgeridhere.daml.app. You can find the ledger id in your ledger settings in the hub console.
GY
gyorgybalazsi
Jan 2022
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?
CO
cocreature
Jan 2022Definitely a bug, we’ll make sure to fix it.
GY
gyorgybalazsi
Jan 2022Thanks!