Pierce01 / MinecraftLauncher-core

Lightweight module that downloads and runs Minecraft using javascript / NodeJS
MIT License
361 stars 82 forks source link

Validation error #2

Closed umitc18 closed 5 years ago

umitc18 commented 5 years ago

launcher.authenticator.getAuth(username, password).then(function(auth) {
    launcher.core({
        authorization: auth,
        clientPackage: null,
        root: "C:/Users/admin/AppData/Roaming/.minecraft",
        os: "windows",
        version: {
            number: "1.8.8",
            type: "release"
        },
        memory: {
            max: "1024"
        }
    });
});```

C:\Users\admin\Desktop\myDB\node_modules\minecraft-launcher-core\components\authenticator.js:38
                throw new Error("Validation error: " + response.statusMessage);
                ^

Error: Validation error: Forbidden
    at Request._callback (C:\Users\admin\Desktop\myDB\node_modules\minecraft-launcher-core\components\authenticator.js:38:23)
    at Request.self.callback (C:\Users\admin\Desktop\myDB\node_modules\minecraft-launcher-core\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (C:\Users\admin\Desktop\myDB\node_modules\minecraft-launcher-core\node_modules\request\request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (C:\Users\admin\Desktop\myDB\node_modules\minecraft-launcher-core\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
Pierce01 commented 5 years ago

Hey there! Thanks for taking interest in this project.

Whats username and password defined as? Username and password need to strings, and a valid login. If you don't have a minecraft account or need to play offline, remove the password field.

umitc18 commented 5 years ago

I solved the problem but now it's giving me this error: TypeError: Path must be a string. Received undefined

Pierce01 commented 5 years ago

can you give me the full stack trace (as in the error)?

I'm pretty sure you're just leaving it undefined

Pierce01 commented 5 years ago

Closing since user hasn't responded. Assuming they've solved it