Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'find') #6

Closed
Encapsulate opened this issue Nov 2, 2023 · 0 comments
Closed

Comments

@Encapsulate
Copy link

Encapsulate commented Nov 2, 2023

PEOPLE_FIND": account.people.find(TEST_ARGS.PEOPLE_FIND[0], TEST_ARGS.PEOPLE_FIND[1]),
^
TypeError: Cannot read properties of undefined (reading 'find')

Happens everytime I run the test code. Any ideas? Thanks.

[My Solution], I forgot to redeclare the axl class (check code below):
const axl = require("app-xbox-live");
var tokens="";
async function getUserToken(user, pass){
const token = await axl.Token(user, pass);
tokens = token;
};
async function getUserByXUID(GamerTag){
var amount = 15;
var xl = new axl.Account('XBL3.0 x=${tokens[1]};${tokens[0]}'); //this was my problem, needed to redeclare.
var GT = xl.people.find(GamerTag, amount).then(console.log);
console.log(GT);
};
getUserToken("username@email", "secretpassword");
getUserByXUID("GAMERTAG HERE");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant