danielwerg / r6api.js

🍫 Node.js wrapper around Rainbow Six Siege APIs
https://npm.im/r6api.js
MIT License
110 stars 19 forks source link

Doesn't work on VPS #18

Closed TheChemicalWorkshop closed 4 years ago

TheChemicalWorkshop commented 4 years ago

very strange issue:

async function get_id_r6() {
 try {
  console.log('inside get_id_r6');
  const r6_id = await r6.getId("uplay", args[1]).then(el => { console.log(`within .then ${el}`); return el[0].id; });
  console.log("shit works")
  message.channel.send("Your uplay name has been saved !\nYou don't need to change it even if you change your ingame name !");

 } catch (e) {
  message.reply("\nis " + args[1] + " a correct username? (uplay only)");
  console.log("error")
 }

}

console.log('before call to get_id_r6');
get_id_r6(); //
console.log('after call to get_id_r6');

and

const r6 = new R6API('username', 'password');
console.log("text")

async function get_id_r6() {
     try {
      const id = await r6.getId("uplay", "TCW-Matti").then(el => el[0].id);
        console.log(id)
     } catch (e) {
    console.log("error")
     }
 }
    get_id_r6(); //

work flawless on pc running Visual Studio Code and node v10.16.2 however on VPS (ubuntu) also node v10.16.2 both programs just don't work on vps, the api call just does not exist there are no errors but neither the .then clause, nor the console.log(id), nor the console.log("error") got executed i have same newest version of r6api there are no errors to show

danielwerg commented 4 years ago

I'm not sure how can I help you here if even you can't reproduce it in your local machine.

danielwerg commented 4 years ago

Closing due to inactivity and inability to reproduce issue.