Handshake exception and connection refused

So i’m finding myself spending time on fixing replit’s annoying issues instead of actually developing something,
After 2 Hours Of Trying to fix Replit Could not reach repel error by trying to find how to add a port to node listen function (it Was Working correctly with no changes made to the index file), It Got Fixed After I Deleted The Log Files Now My Api Returns a Handshake Exception Connection Terminated When i Call It From Outside Of Replit, The Webview inside the Repel is Working Any Connection From Outside is Refused
https://laamardistributionserverproduction.alialwasouf.repl.co/ link to api should return not autherized

let listener = app.listen();
  console.log(`Listening to port number ${listener.address().port}`);

this is the listner i’m currently using
Edit 1
Public Test Repel Also Stopped Working and the webview stopped working so now not even internal requests work

1 Like

Given I can’t see this Repl, I’m assuming it’s private which could make it hard for the community to help.

It sounds like your just trying to specify the port in app.listen. The first parameter of that method is the port:

app.listen(8080);

i was specifing the port when the problem started and after digging alot i found someone posted this solution, that replit assigns the port, plus process.env.PORT returns undefined
but i will try your approach, thanks

1 Like

didn’t work, i tried port 8000,8080,3000 and now it’s not accessing the repel even from inside the webview of replit not only external requests

1 Like

That’s just accessing an environment variable which you would need to configure in the secrets tab is you wanted it to work.

The issue isn’t which port, it’s probably something else in your code which is hard to determine without being able to see it.

1 Like

it was working on port 8000 before this issue

1 Like

the problem appeared without making any changes, and creating a new repel will show the same issue

1 Like

Oh, I understand the issue now, Replit’s hosting seems to be broken. Thanks for reporting this, hopefully the team can get a fix rolled out soon :slight_smile:

1 Like

how can i check for this, the status page shows all is working fine, for my luck i just created a new public nodejs repel and it worked fine

1 Like

When the team see this it should show up on the status page, you seem to have been the first person to notice and report this.

1 Like

hope it will be fixed soon, thanks for your quick reply and help, i really appreciate it.

Nice to see a whole business day gone to waste with no response from any replit staff.

Hey @alialwasouf I just reported to the team and we’ll take a look!

2 Likes

Can you provide reproduction steps so that we can help you troubleshoot this issue?

When I curl https://laamardistributionserverproduction.alialwasouf.repl.co, I get a response from your Repl:

{"code":7,"msg":"The user is not authorized"}
1 Like

Create a new NodeJS Repl, click examples in index.js and select the Express example. In pre-existing Repls it seems to cause that handshake exception and connection refused error, in new Repls the server just doesn’t seem to respond.

Quick update, the issue was fixed and Replit is recovering (status)

FYI, my repl is still down.

Replit is still recovering so you may temporarily experienced issues, but hopefully these will be fixed soon :slight_smile:

Is this still happening? I think this might be related to the incident mentioned above. As we recover, the issues should go away (which I why I ask).