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

Xbox Country Locks Accounts #43

Closed
2 tasks done
kashalls opened this issue May 4, 2022 · 1 comment · Fixed by #44
Closed
2 tasks done

Xbox Country Locks Accounts #43

kashalls opened this issue May 4, 2022 · 1 comment · Fixed by #44

Comments

@kashalls
Copy link
Contributor

kashalls commented May 4, 2022

  • The readme doesn't contain a resolution to my issue
  • The example doesn't contain a resolution to my issue

Versions

  • node: 16.15.0
  • prismarine-auth: 1.5.2

Detailed description of a problem

When using some VPN's (and I assume maybe that specific country), Xbox Live may return the code: 0x8015DC0B or 2148916235 in decimal. This seems to be only affecting Russian users due to issues seen worldwide.

https://github.com/microsoft/xbox-live-api/blob/730f579d41b64df5b57b52e629d12f23c6fb64ac/Source/Shared/errors_legacy.h#L924

We could also use this time to implement more verbose codes if needed.

I am using this issue to provide a "Implement This" for myself.


@LucienHH
Copy link
Contributor

LucienHH commented May 4, 2022

Hi Kashalls, this is something I've looked at also. Here's what I've put down on a fork I use for a different project, it would benefit from more detailed descriptions but the matchups are there. Could also add more errors to this as I believe this is only a few.

checkTokenError (errorCode) {
  let err = ''
  switch (errorCode) {
    case 2148916227: err = 'ENFORCEMENT_BAN'; break
    case 2148916229: err = 'ACCOUNT_PARENTALLY_RESTRICTED'; break
    case 2148916233: err = 'The user does not currently have an Xbox profile - https://signup.live.com/signup - ACCOUNT_CREATION_REQUIRED'; break
    case 2148916234: err = 'ACCOUNT_TERMS_OF_USE_NOT_ACCEPTED'; break
    case 2148916235: err = 'ACCOUNT_COUNTRY_NOT_AUTHORIZED'; break
    case 2148916236: err = 'ACCOUNT_AGE_VERIFICATION_REQUIRED'; break
    case 2148916237: err = 'ACCOUNT_UNDER_CURFEW'; break
    case 2148916238: err = 'The account date of birth is under 18 years and cannot proceed unless the account is added to a Family by an adult - ACCOUNT_CHILD_NOT_IN_FAMILY'; break // User is under 18
    case 2148916239: err = 'ACCOUNT_CSV_TRANSITION_REQUIRED'; break
    case 2148916240: err = 'ACCOUNT_MAINTENANCE_REQUIRED'; break
    case 2148916243: err = 'ACCOUNT_NAME_CHANGE_REQUIRED'; break
    case 2148916242: err = 'CONTENT_ISOLATION (Verify SCID / Sandbox)'; break
    case 2148916255: err = 'EXPIRED_SERVICE_TOKEN'; break
    case 2148916258: err = 'EXPIRED_USER_TOKEN'; break
    case 2148916257: err = 'EXPIRED_TITLE_TOKEN'; break
    case 2148916256: err = 'EXPIRED_DEVICE_TOKEN'; break
    case 2148916259: err = 'INVALID_DEVICE_TOKEN'; break
    case 2148916260: err = 'INVALID_TITLE_TOKEN'; break
    case 2148916261: err = 'INVALID_USER_TOKEN'; break
    default: {
      err = `Unknown error code (${errorCode})`
    }
  }
  throw new URIError(`Failed to obtain XSTS token: ${err}`)
}

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

Successfully merging a pull request may close this issue.

2 participants