# Trigger Looks like its in some loop

**URL:** <https://forum.canton.network/t/trigger-looks-like-its-in-some-loop/4263>\
**Category:** App Development\
**Tags:** trigger, damlhub\
**Created:** [April 6, 2022, 8:49pm UTC](https://forum.canton.network/t/trigger-looks-like-its-in-some-loop/4263 "2022-04-06T20:49:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Max](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/max/32/2128_2.png) [@Max](https://forum.canton.network/u/Max)\
**Post date:** [April 6, 2022, 11:39pm UTC](https://forum.canton.network/t/trigger-looks-like-its-in-some-loop/4263/6 "2022-04-06T23:39:06Z")

</div>

The solution in this post seems to stop the loop at the start up of the trigger

> [@Error "Missing field: commands" when running trigger](https://discuss.daml.com/t/error-missing-field-commands-when-running-trigger/200/2):
>
> I’m somewhat guessing here but I believe that cmds is probably empty. The ledger API does not accept empty list of commands. If that is the issue you can simply wrap it in when: when (not (null cmds)) (emitCommands cmds pendings) Might make sense to modify emitCommands to handle this automatically.

But as soon as a new contract is created for `AssetHoldingAccountRequest`, the loop starts.

---

_[View the full topic](https://forum.canton.network/t/trigger-looks-like-its-in-some-loop/4263)._
