Widget App Component not compatible with recurring or duplicated Tasks?

Hi there :wave:

We have an active integration that, for the most part, is working well. But we’ve noticed a pretty strange issue when it comes to how our Widget (App Component) gets wired up for Tasks that have been duplicated or are recurring in nature (which uses duplication to do the recurrence).

This is the scenario:

Setup: User successfully uses our integration to establish a link between their Task and our service. We use the Modal App Component to gather the necessary input and create the linkage/record in our database. When viewing the Task in Asana, calls to render our widget with an expected task, user, workspace, and attachment come through great and we can return a properly constructed widget. So far so good.

The problem: When that Task is duplicated (or recurs), Asana seems to generate a brand new attachment ID that we’ve never seen before and assumes the link still exists. It then fetches our API with that ID, which results in a 404 (because it’s not in our database, because it was never linked). To the customer, this is what happens:

Here is a side-by-side of the original Task (working) and the duplicate Task (not working):

I believe there are two issues that are problematic:

  1. The incoming request on the duplicate Task is for an attachment ID that we never were informed about. How can we respond to it? In addition, the duplicate Task itself has no data in it that links it to the original Task, so it’s not possible for us to trace it back and retroactively stitch up the link with this new attachment ID.
  2. It’s odd that a 404 response appears as “authentication required” to the customer. It is not. The docs technically don’t say a 404 is allowed, so perhaps you’re doing the best you can do, but the only other options we have are 200, 418, and 500, none of which are appropriate here?

Is this a gap in the platform, or are we doing something very wrong? :sweat_smile:



Good catch, I hope Asana answers. Otherwise we can give you the email of the dev team!

Hi @Patrick_Lightbody,

It is a current gap. As you observe, the fix is a bit complicated because creating the new widget/link on the new task involves some communication with the external app to let you know about it.

Having said that, I know Asana is aware of it and it’s on their list to address; but I’m not privy as to when that’ll happen.

You could return a 400 along with an error string and I believe that string will get displayed in the widget.

1 Like

Thanks for the reply.

You could return a 400 along with an error string and I believe that string will get displayed in the widget.

We’ve tried this in few places and our experience is that the error string never gets displayed and ends up as a generic error message. I’m going to be opening another post on that topic soon :sweat_smile:

Oh wait, try sending it back as

error_result insread of error

That is,

{ "error_result": "Houston we have a problem" }

Does that work?

I am not sure if this is related, but I am programmatically posting the attachment, and when the task is opened, it shows the “Authentication required”. If I click on it, boom, the widget appears… @Phil_Seeman any great idea?


Does that happen even if you’ve already added and thus authenticated the app in that project?

Yes, my app doesn’t have any authentication, I did not put an authentication URL. Even with one, and a working auth process, the same thing happens…

When you put an attachment on a task, there is a parameter connect_to_app which is a boolean. I can’t get it to be true, it stays false, I am not sure if this is related…