An open port was not detected


I’m getting an error: hostingpid1: an open port was not detected when trying to deploy my repl.

Repl link/Link to where the bug appears:

Screenshots, links, or other helpful context:

code snippet

Im seeing exactly the same issue.

Code runs manually as it should but will not let me deploy, it gets stuck and errors at the last stage, with the “promote”. I am trying to deploy a Python script for some API work.

I don’t remember exactly which one but I’m pretty sure there is a specific host to run on, at, that could be the problem.

@FarkhodNarbayev @JacobTober Can you provide links to the Repls that are not deploying?

Once you have gone through the troubleshooting guide here, feel free to sign up for a debugging session on my calendar.

same for me, it says “hostingpid1: an open port was not detected” on the last loading thing

Feel free to sign up my calendly linked above for debugging as well, it is open to the public.

The error means that your application did not listen on a port. If your deployment is not a website but rather a bot or something else that runs in the background, you will need to deploy it as a Background Worker within a Reserved VM deployment. Those options are available via the Deployments pane in the UI.

I’m facing the same issue. I want my supersmall script run all the time. As your client I don’t want to be forced to care about ways of deploying it. I liked it when you simply could toggle “always on” button without deep diving into ways of your code deployment (which I must admit, I can’t think highly of). It sounds to me more and more like a scam to extort more $$ from user as VM deployment is payable additionally.

As User I expect you restore “always on”/“don’t stop” toggle as making solution more complex and less functional can hardly been called development.

1 Like

If you want to run a script, use a Reserved VM deployment. It should be very simple and take only a few clicks to get through the whole process. I’m not here to argue about the relative merits of the product or the strategic direction that the company is taking, but I am happy to help if you have any specific issues with deploying your Repl.

Thank you @lincoln-replit for quick reply. I’d only appreciate if the feedback gets to your relevant Product Owner/Product Manager. I guess those people should find it valuable since replit is IMHO a customer-centric product organisation.

I’m having the same issue when trying to deploy, did anyone found a solution?

1 Like

Hi @lincoln-replit. Is there a way to fix this another way? One of my projects gets this error, but a similar project of mine doesn’t and gets deployed without any issues. And I really don’t want to pay for a VM unless the project gets to somewhere.