Rule Action Example - Something went wrong. Try again later.

Hi,

I followed all the steps from GitHub - Asana/app-components-rule-action-example-app, however I am stuck at steps 3.2
When I add my recently-created Rule Action, I get “Something went wrong. Try again later.”

CleanShot 2022-07-18 at 14 09 54@2x

When I check the ngrok terminal window it says

OPTIONS /rule/metadata         204 No Content                                                                               
GET     /                      404 Not Found       

What I am missing ? Does anybody get this example working ?

I recently tried to run the demo app and my endpoints were not working. I had to manually create my endpoints using Firebase. Not sure what happened, did not spend too much time debugging.

Did you try reaching the endpoints with a simple browser visit before trying to set up rules?

1 Like

Yes,

I move forward and set up an AWS Lambda (instead. of using ngrok). I was able to add my custom action but was block by the CORS policy when I hit the “Create rule” button, which is weird because I wasn’t block to access the content located at “rule/metadata”.

Was this issue ever resolved?
I am getting the same error when trying to run the sample code from GitHub.

@David_Neal ?

Hi @Joshua_Clayton! I’m looking into the example app. So far, I can confirm the same issue when running with ngrok, but I’ve not determined a fix or workaround, yet. I will let you know as soon as I figure it out!

Hi @Joshua_Clayton!

If you open up the browser’s developer tools and inspect the HTTP calls Asana makes to your app, you may see something similar to the following:

You are about to visit [host].ngrok-free.app, served by [ip-address]. This website is served for free through ngrok.com. You should only visit this website if you trust whoever sent the link to you. (ERR_NGROK_6024)

This is likely occurring when Asana is attempting to request the Form metadata URL for the app.

According to the ngrok documentation, the purpose of this warning message is to prevent abuse. Unfortunately, the warning breaks the integration.

It seems the current workaround would be to either purchase an ngrok license to remove the warning or use a web application hosting service.

I hope this helps!

David

I believe the sample code doesn’t work beyond the NGROK issue.

I did try running NGROK like ngrok http 3001 --request-header-add="ngrok-skip-browser-warning: true", but that had no effect.

When we tested on our web service we had to add parameters to CORS for it to respond to the OPTIONS requests. Is that not required to respond to Asana’s requests for the Rule Action metadata?

The ngrok-skip-browser-warning header workaround would only work if it originates from Asana.

Ngrok appears to allow the pre-flight OPTIONS request for CORS to go through. But, the immediately following GET request on the same route for metadata returns the warning message. The sample app never receives the GET request.