Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

474
Views
How do I fix polling-xhr.js:503 GET error

So I've been looking around on google for some time. Trying to find an answer online about my question, couldn't find one. So I came here to ask.

Whenever I have my server send an emit event to the client to pick up polling-xhr.js gives me an error saying that the service is unavailable. With a redirect to line 199. Error

Client:

function LoginRequest() {
  console.log("Attempting to Send Server Request");
  socket.emit("LoginRequest", { socket: socket.id, username: document.getElementById("Username").innerHTML, password: document.getElementById("Password").innerHTML });
}

socket.on("LoginCallback", (info) => {
  if(socket.id === info.Socket) {
  console.log("Recieved Server Callback.");
  if(!info.Error) {
    localStorage.setItem("Username", document.getElementById("Username").innerHTML);
    localStorage.setItem("Password", document.getElementById("Password").innerHTML);
  } else {
    return console.log("Username or Password Incorrect");
  }}
});

Server:

io.on('connection', (socket) => {
  socket.on('LoginRequest', (info) => {
    const UserExists = db.fetch(`Usernames`).includes(info.username);
    const PasswordCheck = (db.fetch(`Password_${info.username}`) != info.password) ? false : true
    const err = (UserExists == true && PasswordCheck == true) ? false : true
    
    io.of("login").emit("LoginCallback", { Exists: UserExists, PasswordCorrect:  PasswordCheck, Error: err, Socket: info.socket });
  });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!