Nightmare.js not saving login session

165 Views Asked by At

Tried using nightmare.js to log in to Steam, though it simply ignores my credentials and stays logged off. There're no messages from Steam or Nightmare.js, it just moves on with the script as if the login was successful, but it wasn't.

await nightmare
  .goto('https://store.steampowered.com/login/')
  .wait(3000)
  .type('#input_username', 'USERNAME')
  .type('#input_password', 'PASSWORD')
  .click('#login_btn_signin>button')
  .wait(3000) //here I will wait 3 seconds on the main page, but still not logged in

Is it Electron's issue, or Nightmare.js? Anyone had this issue? I don't know how to proceed from here.

1

There are 1 best solutions below

0
Telion On

I never found a solution to this. Instead, I found a workaround. I've set a cookie that sets my age as adult so that I could see all the games without needing to log in. Nightmare.js still won't save sessions for no reason. I assume there's a bug or a feature that prevents those from saving but I never found out why and the official repository is dead.