Problem with demo (Transform) for creating a Custom Action

I’ve followed the step-by-step demo for the Integration Quick Start (from here https://monday.com/developers/apps/quickstart-integration/)

After following the entire guide when the Action executes, I get a “POST /transformation/transform 502 Bad Gateway” error on my dev server.

Any insight on why the problem is would be much appreciated

Hey @brischnei ,

there are several issues that could cause your problem.

Did you run following command: “npm run start” before you made your request?

Greetings

Hi @TMNXT-Dev,

As per the quick start guide, I launched the server with “npm run expose” (and, in another terminal, “npm run server-with-debugger”).

The server is definitely running and receiving the POSTs (each POST throws the error I mentioned).

The problem is, that you ngrok exposes your localhost to the internet (“npm run expose”) but your server is Not running.

502 error means that something is wrong with your server. TTL also shows that your connection also just makes 1 HOP and disconnects.

Instead of running “npm run server-with-debugger”, enter “npm run start” from your root directory in a separate console and enter the ngrok URL in your browser to test.

Tell me if that worked.

1 Like

thanks for taking the time on this.

  1. When I run “npm run start” and then browse to the ngrok url, the server responds: {“ok”:true,“message”:“Healthy”}

  2. with “npm run expose” the ngrok tunnel is created, however when browsing there, it appears that the server isn’t running – like you wrote:

image

  1. “npm run server-with-debugger” ngrok returns an error and doesn’t even create the tunnel.

No problem :slight_smile:

When I run “npm run start” and then browse to the ngrok url, the server responds: {“ok”:true,“message”:“Healthy”}

This is a JSON object returned by your server. That actually means your server is running,

with “npm run expose” the ngrok tunnel is created, however when browsing there, it appears that the server isn’t running – like you wrote:

Is just the tunnel you setup. It does not make the server run, just the connection to the internet.

“npm run server-with-debugger” ngrok returns an error and doesn’t even create the tunnel.

There seems to be an issue with the code or a setup, which is not completed. I advise to redo the steps one and two of the guide.

Hey Brian, did you manage to figure this out? Did it turn out to be an error in your code?

Hi Dipro,

Thanks for checking in on this, much appreciated.

After repeating the step-by-step instructions for the Integrations quick start I continued to have problems when launching in debug mode (“npm run server-with-debugger” and “npm run expose” in separate terminal windows). Instead, I took @TMNXT-Dev’s suggestion and just ran the server with “npm run start” and it worked correctly. (I didn’t further attempt to debug the debugger to see where exactly the problem was).

2 notes for you:

  1. In the quickstart documentation it wasn’t immediately clear (at least not to me) that the Custom Action’s Input Fields need to be named exactly the same in the Action Settings as they are in the js at the endpoint (e.g., in the integrations example: boardId, itemId, sourceColumnId, targetColumnId). When I set the action settings initially I was being lazy and gave them shorter names only to see that server kept failing…

  2. Launching “npm run server-with-debugger” throws an error that the ‘fuser’ package is deprecated. (This may be be related to my primary issue, but I didn’t spend any time looking into it). The CLI package may need to be updated.

thanks,
Brian

PS Sorry for not responding to the thread earlier, in the interim I was busy dealing with a COVID outbreak… :sneezing_face: .

1 Like

Hey @brischnei :wave:

Thank you for providing your feedback about the quickstart and I’m glad to hear you were able to find a solution that works for you! Now, to tackle your specific points:

  1. I’ll definitely share that with the team and we will take a further look to see how that part of the process can be made more clearer for developers :slight_smile: Thank you for flagging that!

  2. I’ve just tried to test this on my end and got the same results - I am not quite sure if we are both missing something at this point, but I’ve gone ahead and reached out to our developers so we can take a further look at this together. As soon as I’ll have more news to share, I’ll post those here :slight_smile:

No worries about the delay - health and family come first :slight_smile: I hope the pandemic didn’t affect you too strongly, as it is pretty wild.

-Alex

Sounds good. Regarding #2 I suspect that the fuser package was simply deprecated since Monday published the quickstart example

@brischnei I’ve just tried running through the tutorial again and I’ve realized I missed the “npm install” step in the guide. After I’ve used that command, the “npm run server-with-debugger” ran without any issues for me too - could you please try that out and let me know if that did the trick for you?

-Alex