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

Took too long to log in #1762

Closed
Lusiny opened this issue Mar 15, 2021 · 4 comments
Closed

Took too long to log in #1762

Lusiny opened this issue Mar 15, 2021 · 4 comments
Labels

Comments

@Lusiny
Copy link

Lusiny commented Mar 15, 2021

Error Message

For some reason when i try to log in in minecraft with method createBot it appears a message saying " "Took too long to log in" false", how can i fix it?

What did you try yet?

I changed the username, password and ... nothing happened.

Current code

My code:

const mineflayer = require('mineflayer')
let player = mineflayer.createBot({
    host: "localhost",
    port: 25565,
    username: 'email',
    password: 'password',
    checkTimeoutInterval: 30000
}) 
player.on('kicked', console.log);
player.on('error', console.log);
player.on('login', () => { console.log("I'm in") });
@u9g
Copy link
Member

u9g commented Mar 18, 2021

It's not an error, its a kicked message. maybe try getting rid of checkTimeoutInterval

@Lusiny
Copy link
Author

Lusiny commented Mar 18, 2021

Returned the same thing! Looking at the server console we have this:

Disconnecting com.mojang.authlib.GameProfile@412a81ea[id=<null>,name=Lusinho555,a={},legacy=false] (/myip): Took too long to log in
com.mojang.authlib.GameProfile@412a81ea[id=<null>,name=Lusinho555,properties={},legacy=false] (/myip) lost connection: Timed out

For some reason it takes to long to return the error message

My current code:

const mineflayer = require('mineflayer')

let player = mineflayer.createBot({
    host: "localhost",
    port: 25565,
    username: 'email',
    password: 'password',
}) 
player.on('kicked', console.log);
player.on('error', console.log);
player.on('login', () => { console.log("I Joined") });

@u9g
Copy link
Member

u9g commented Mar 19, 2021

checkTimeoutInterval's default is 30000, maybe try 240000 instead

@Lusiny
Copy link
Author

Lusiny commented Mar 19, 2021

It returned the same message ""Took too long to log in" false" actually!

Regarding your suggestion, I noticed that the default of the check Timeout Interval would be 300000 and not 30000 by logic.
So instead of putting 240000 I put 24000 and the error message returned me faster.

By the name I imagine it is what determines the time interval in which you check if you have been kicked.

@rom1504 rom1504 closed this as completed May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants