When I deploy it gets stuck on Promote and times out

When I deploy my javascript bot it goes through all these other steps properly but then gets completely stuck on the process of “promote” and then completely times out after 5-10 minutes. Currently I do not find anything wrong in my logs, I have done all troubleshooting procedures and turned off Explorer. I just want to know how to fix this as I have already paid $120 for this service.

Screenshots, links, or other helpful context:

Just to let you know @coolpizza445, your code is public, and people can easily find the information you redacted from the images.

If you would like that to not be possible, please use Secrets to store them. (Or make the Repl private)

Try moving the call to startApp to the end of your code. Also, does this only affect you when using deployments or happen when running normally?

The log of undefined undefined is because either you or some automated process sent a GET request to / without any parameters. Since the / route is synchronous, it shouldn’t result in an error, and it looks like your already doing checks. Try also changing your if statements to if (userid && rank) rankUser(userid, rank, res);

1 Like

Hello @coolpizza445!

I can see that you are using a Reserved VM. Make sure you are either deploying it as Autoscale or Reserved VM > Web Service.
Hope this helps!

@coolpizza445 The issue is that you are not returning a response from the / endpoint if the userid and rank are null. During the promote step, we make blank HTTP requests to the / endpoint of your Repl (that won’t have any query parameters set) and if it doesn’t return a 200 OK response, the promotion will fail.

The solution is to add res.send('query params not set') or similar in an else clause if userid or rank are undefined.

1 Like