Don't get notification

Archived from the Transloadit support forum. Originally posted on November 29, 2011; details may be outdated, see our docs for current behavior. Original thread

Hello,

I am trying to get a notification when my assembly is finished, but I can’t get it working. Here are some details:

Assembly ID: REDACTED

Request JSON:
` { auth: { key: ‘*****’,

 expires: '2011/11/29 23:22:09+00:00' },

steps: { import:

  { robot: '/http/import',
    url: 'http://*****.s3.amazonaws.com/3387c5a9-a762-48a8-b9d7-5c20dafffb64/EPSON001-1.JPG' },
 thumb1: 
  { robot: '/image/resize',
    use: [Object],
    width: 105,
    height: 70,
    resize_strategy: 'pad',
    zoom: false,
    background: '#000000',
    quality: 70,
    strip: true },
 thumb2: 
  { robot: '/image/resize',
    use: [Object],
    width: 200,
    height: 133,
    resize_strategy: 'fit',
    strip: true },
 thumb3: 
  { robot: '/image/resize',
    use: [Object],
    width: 640,
    height: 427,
    resize_strategy: 'fit',
    strip: true },
 export: 
  { bucket: '****',
    key: '*****',
    secret: '****',
    path: '3387c5a9-a762-48a8-b9d7-5c20dafffb64/EPSON001-1-${previous_step.name}.${file.ext}',
    acl: 'public-read',
    use: [Object],
    robot: '/s3/store' } },

notify_url: ‘http://****.showoff.io/transloadit/notify’, redirect_url: ‘http://**.showoff.io/’ } `

I don’t really need redirect_url, but just set it to see if it would work. I verified that the notify_url was accessible from the outside network.

Hey Jon,

can you please point me to an assembly id that uses this but is not sending a notification?

Kind regards,
Tim

http://.showoff.io/transloadit/notify

Is that . in front of your domain name intentional? AFAIK it would be legal at the end of the domain, but not in front of it.

Felix: No, I put some * (asterisks) to hide the actual name and it looks like it got bolded or something.

I am still having this problem, every now and then I get a notification with a stack that begins with “Error: S3 did not accept the key / secret pair you provided”, but the assembly_id is from an old upload (i.e. REDACTED)

And here is an assembly id of one that I just tried, the output files get uploaded to s3 successfully, but I get no notification: REDACTED

Your app seems to be unable to parse multipart data. Use formidable or upgrade to connect 1.8.

Multipart (not working):

HTTP/1.1 100 Continue

HTTP/1.1 500 Internal Server Error
Content-Type: text/html; charset=utf-8
Set-Cookie: connect.sid=O3IQ7xVQGdPunkVwEO75BFdu.iuw0mvIiKZLT0sxyLHG7d1ebpfoccqsiwBFl8hNWUhM; path=/; expires=Wed, 30 Nov 2011 11:52:04 GMT; httpOnly
X-Powered-By: Express
Content-Length: 1043
Connection: keep-alive

{"stack":"TypeError: Cannot read property 'ok' of undefined<br />    at /app/app/controllers/transloadit_controller.js:8:18<br />    at callbacks (/app/node_modules/express/lib/router/index.js:272:11)<br />    at param (/app/node_modules/express/lib/router/index.js:246:11)<br />    at pass (/app/node_modules/express/lib/router/index.js:253:5)<br />    at Router._dispatch (/app/node_modules/express/lib/router/index.js:280:4)<br />    at Object.handle (/app/node_modules/express/lib/router/index.js:45:10)<br />    at next (/app/node_modules/express/node_modules/connect/lib/http.js:203:15)<br />    at Object.compiler [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/compiler.js:54:37)<br />    at next (/app/node_modules/express/node_modules/connect/lib/http.js:203:15)<br />    at Object.methodOverride [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:35:5)","arguments":["ok",null],"type":"non_object_property_load","message":"Cannot read property 'ok' of undefined"}

Urlencoded (working):

curl -i -d transloadit='{"ok": "ASSEMBLY_COMPLETED"}' -X POST "http://proproofing-staging.herokuapp.com/transloadit/notify"
HTTP/1.1 200 OK
Content-Type: text/plain
Set-Cookie: connect.sid=0OqdtKauy8hRruvSbJYEfmaT.WYTwnNLat5SIbncesuNW3QmRvnkCZ8rQThfMN4811c0; path=/; expires=Wed, 30 Nov 2011 11:50:49 GMT; httpOnly
X-Powered-By: Express
Content-Length: 2
Connection: keep-alive

--fg

Yeah, I know the server isn’t going to process it properly, I was just trying to dump the request I get to the console so I can see what data I can access.

Here is the code

```` var db = req.app.settings.db

, transloadit = req.param('transloadit')
;

console.log(transloadit);

if (transloadit.ok !== 'ASSEMBLY_COMPLETED') {
    // Not done yet, so wait some more
    return res.send(200);
}

return res.send(200); ````

However, the problem is that I am not getting any notifications… I see in my log from your testing that I got hit with a lot, but still more sure why they weren’t coming.

I modified my server to accept multipart POSTs, but I am still not getting any notifications. My logs show that the URL is not being accessed at all.

REDACTED
REDACTED

Hi Jon,

your notify_url returned in both cases with status 503:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html><br />
<head><br />
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><br />
  <style type="text/css"><br />
    html, body, iframe { margin: 0; padding: 0; height: 100%; }<br />
    iframe { display: block; width: 100%; border: none; }<br />
  </style><br />
<title>Application Error</title></head><br />
</head><br />
<body><br />
  <iframe src="https://s3.amazonaws.com/heroku_pages/error.html"><br />
    <p>Application Error</p><br />
  </iframe><br />
</body><br />
</html>

You can see this at the bottom of the assembly-status page:
https://transloadit.com/assemblies/REDACTED

Kind regards,
Karl Skomski

Marking this as resolved for now.