Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Back4app giving parseerror 200 on chrome

I made a database for accounts login for a web app with back4app, it works on Firefox-ish but doesn't work on Chrome at all. on FF, I try to log in and it gives me a parse error 200 username/password required, I reload the page and it works (I don't know why it does that btw and I want to fix that too). The same trick however doesn't work on Chrome, whenever I reload it just clears the fields and doesn't let me in. I looked up the error, and it turns out that the post request doesn't take the info from the input fields for some reason. Here's the login window's HTML:

<dialog id="login">
  <h1>تسجيل دخول</h1>
  <input type="text" id="loginid" placeholder="id" pattern="[A-Za-z]">
  <input type="password" id="loginpass" placeholder="password">
  <button type="submit" id="loginButton">دخول</button>
</dialog>

and that's the JS behind it, it's vanilla by the way

const login = document.querySelector('#login');
let loginid = document.querySelector('#loginid').value;
let loginpass=document.querySelector('#loginpass');
const loginButton = document.querySelector('#loginButton');
login.style.display='block';
loginButton.onclick = function() {
let user=Parse.User.logIn(loginid,loginpass.value).then(function(user){
  alert(`Welcome ${user.get('username')}`);
  login.style.display='none';
  membersDiv.style.display='block';
  addMemberArea.style.display='block';
}).catch(function(error){
  alert(error);
})
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It looks like you're using the Parse JavaScript SDK to log in users. Based on the code you've shared, it looks like you're not passing the correct parameters to the Parse.User.logIn() method.

The logIn() method takes two parameters - the first is the username, and the second is the password. Based on your code, it looks like you're passing the value of the input field (which is currently empty) as the username, and the password as the second parameter.

You'll want to change your code so that it passes the username and password input fields as the two parameters, like so:

Parse.User.logIn(usernameInput.value, passwordInput.value).then(function(user){
  alert(`Welcome ${user.get('username')}`);
  login.style.display='none';
  membersDiv.style.display='block';
  addMemberArea.style.display='block';
}).catch(function(error){
  alert(error);
})

For more information on logging in users with the Parse JavaScript SDK, check out the documentation here:

https://docs.parseplatform.org/js/guide/#logging-in

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda