# What can cause a '404 Not Found' error when I try to run an init script against an app deployed on Daml Hub?

**URL:** <https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779>\
**Category:** App Development\
**Tags:** features and bugs, damlhub\
**Created:** [January 21, 2022, 10:54pm UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779 "2022-01-21T22:54:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [January 21, 2022, 10:54pm UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/1 "2022-01-21T22:54:15Z")

</div>

The 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:

```haskell
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)

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [January 22, 2022, 8:11am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/2 "2022-01-22T08:11:22Z")

</div>

Can you show your `participants.json` (without the tokens)? It looks like the url might be off.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [January 22, 2022, 8:24am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/3 "2022-01-22T08:24:24Z")

</div>

It’s like this:

```haskell
{
  "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.

```

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [January 22, 2022, 8:26am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/4 "2022-01-22T08:26:54Z")

</div>

> [@gyorgybalazsi](#):
>
> ```haskell
> "host": "https://api.projectdabl.com",
> "port": 443,
> 
> ```

This is not working either:

```haskell
https://api.projectdabl.com:443/v1/create

```

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [January 22, 2022, 8:35am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/5 "2022-01-22T08:35:58Z")

</div>

Try replacing `https://api.projectdabl.com` with `https://yourledgeridhere.daml.app`. You can find the ledger id in your ledger settings in the hub console.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [January 22, 2022, 9:00am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/6 "2022-01-22T09:00:42Z")

</div>

> [@cocreature](#):
>
> `https://yourledgeridhere.daml.app` .

This works:

```haskell
"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?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [January 22, 2022, 9:02am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/7 "2022-01-22T09:02:27Z")

</div>

Definitely a bug, we’ll make sure to fix it.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [January 22, 2022, 9:02am UTC](https://forum.canton.network/t/what-can-cause-a-404-not-found-error-when-i-try-to-run-an-init-script-against-an-app-deployed-on-daml-hub/3779/8 "2022-01-22T09:02:46Z")

</div>

Thanks!
