# template tests fine but fails in production

**URL:** <https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [March 11, 2011, 8:35pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884 "2011-03-11T20:35:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanderpick](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/sanderpick/32/1508_2.png) [@sanderpick](https://community.transloadit.com/u/sanderpick)\
**Post date:** [March 11, 2011, 8:35pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/1 "2011-03-11T20:35:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on March 11, 2011; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20110513083226/http://support.transloadit.com/discussions/problems/79-template-tests-fine-but-fails-in-production)

Here is my template:

```auto
{
  "steps": {
    "image_thumb": {
        "use": ":original"
      , "robot": "/image/resize"
      , "correct_gamma": true
      , "width": 232
      , "resize_strategy": "fit"
    },
    "image_full": {
        "use": ":original"
      , "robot": "/image/resize"
      , "strip": true
      , "correct_gamma": true
      , "width": 640
      , "resize_strategy": "fit"
      , "watermark_url": "http://s3.amazonaws.com/path/to/image"
      , "watermark_position": "bottom-right"
    },
    "video_thumbs": {
        "use": ":original"
      , "robot": "/video/thumbs"
      , "width": 232
      , "resize_strategy": "fit"
    },
    "video_encode": {
        "use": ":original"
      , "robot": "/video/encode"
      , "preset": "iphone"
      , "realtime": "true"
      , "width": 1280
      , "resize_strategy": "fit"
      , "ffmpeg": {
            "b": "5000k"
          }
      , "watermark_url": "http://s3.amazonaws.com/path/to/image"
      , "watermark_position": "bottom-right"
    },
    "image_export": {
        "use": ["image_thumb", "image_full"]
      , "robot": "/s3/store"
      , "key": "REDACTED"
      , "secret": "REDACTED"
      , "bucket": "my_image_bucket"
      , "path": "${unique_prefix}"
    },
    "video_export": {
        "use": ["video_thumbs", "video_encode"]
      , "robot": "/s3/store"
      , "key": "REDACTED"
      , "secret": "REDACTED"
      , "bucket": "my_video_bucket"
      , "path": "${unique_prefix}"
    }
  }
}

```

It works fine for images. With videos the video\_thumbs are created and returned in the results object, but video\_encode is missing from the results. Seems like it doesn’t wait for this step. The message is “The assembly is currently being executed.”

Everything works perfectly in the test suite.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Felix\_Geisendorfer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/felix_geisendorfer/32/1463_2.png) [@Felix\_Geisendorfer](https://community.transloadit.com/u/Felix_Geisendorfer)\
**Post date:** [March 12, 2011, 11:53am UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/2 "2011-03-12T11:53:00Z")

</div>

I could need some more information to help with this:

Are you using the jQuery plugin?  
Can you give me an assembly id where the problem occurs?

---

<div class="post-metadata">

**Author:** ![sanderpick](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/sanderpick/32/1508_2.png) [@sanderpick](https://community.transloadit.com/u/sanderpick)\
**Post date:** [March 12, 2011, 5:10pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/3 "2011-03-12T17:10:00Z")

</div>

Yes, I’m using the jQuery plugin.

assembly\_id: “REDACTED”

If I run the video\_encode step by itself, it runs fine… and if I run the video\_export step by itself with “use”: “:original”, it works as well… seems like the /s3/store robot doesn’t like the output from the video\_encode step…

Again, it works fine in the test suite… so I guess it’s more likely its a plugin issue…?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Felix\_Geisendorfer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/felix_geisendorfer/32/1463_2.png) [@Felix\_Geisendorfer](https://community.transloadit.com/u/Felix_Geisendorfer)\
**Post date:** [March 12, 2011, 5:49pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/4 "2011-03-12T17:49:00Z")

</div>

Have you set “wait: true” as a plugin parameter?

If not, the jQuery plugin will submit your original form as soon as the upload has completed. At this point the assembly may or may not have completed yet, and you have to use a notify\_url to get the final results.

---

<div class="post-metadata">

**Author:** ![sanderpick](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/sanderpick/32/1508_2.png) [@sanderpick](https://community.transloadit.com/u/sanderpick)\
**Post date:** [March 12, 2011, 5:56pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/5 "2011-03-12T17:56:00Z")

</div>

that’s it… wow, I’m on a roll here… fml 🙂 i could’ve sworn that was true by default!

thanks again.

---

<div class="post-metadata">

**Author:** ![Felix\_Geisendorfer](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/felix_geisendorfer/32/1463_2.png) [@Felix\_Geisendorfer](https://community.transloadit.com/u/Felix_Geisendorfer)\
**Post date:** [March 12, 2011, 6:11pm UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/6 "2011-03-12T18:11:00Z")

</div>

Don’t worry, you’re not the only one to run into trouble with this. We’ll start working on a new version of the jQuery plugin at some point, and I think making “wait: true” the default might be less-surprising by default.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/04ee57da0cb7ac8728a9ac5965c288164f4ce280.svg) [@system](https://community.transloadit.com/u/system)\
**Post date:** [October 7, 2026, 9:18am UTC](https://community.transloadit.com/t/template-tests-fine-but-fails-in-production/17884/7 "2026-10-07T09:18:15Z")

</div>


