-
Notifications
You must be signed in to change notification settings - Fork 9
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
Failed to verify username #7
Comments
Thanks :) The bot is running by default in offline mode, so you need to use --onlinemode argument. this implies --use_encryption so you can use it instead of it. I need to rewrite the readme to make things more clear. if you have an idea what can be written better I would be happy for pull request (or at least suggestion) |
sorry to leave that out of the command i posted, i also did try that, to verify i just did try again. "14:14:18.403985 [CORE EVENT] Server kicked me out with message: Failed to verify username!" Honestly it was clear in the readme, i just forgot to mention in initial post i did try it with that :( command i just tried: response: |
Ok, I think I got it. One has to also specify --botname, which is the name associated with your online account. Long story short, I've change the code to take the username from login.minecraft response so one does not need to use --botname in online mode. commit soon |
fix commited |
I will clone new code thanks kindly, i did use --botname in my startup command that was what my username is (consolecowboy), so im still confused maybe i was using what i thought my username was but maybe my username is something different on mojang. Sounds like a good code change anyway to be honest. |
hmm no im getting the exact same problem, :( Client: Proxy: command used: I have proxy running also, this command points to the mc proxy, and proxy points to the server i want to connect to. |
true... i tested it with online server and python bot.py --onlinemode --botemail EMAIL --botpass PASS try to post the whole log |
get the latest code (4701ab6) , run it and post the log please |
No worrys, here are the logs. |
and one question that I did not (and should) ask, does the bot run on the server without the proxy? and what proxy are you using? |
you are using my proxy! :D well that explains.... I did not implemented proxy for online mode and from what I know it is not even possible (or at least hard). |
ok it works without the proxy, i was using the proxy that came with the bot. Thanks again, |
If you still want to know, I know why you can't connect to an onlinemode server with a proxy. |
sure, post it! |
And now we all wait on @wtfaremyinitials's post ... I was about to start using the proxy on an online, production mode server to look for oddities in our plugins, but if it doesn't work on online mode, that's ... Unfortunate. |
If there is demand on that I can try to investigate further. |
First off sorry it took me so long to get back to you.... I have bene extremely busy. Anyway the reason the proxy doesn't work is that when a minecraft client wants to connect to an online mode server it sends the servers address along with a few other things up to the minecraft session servers. The issue is that if you are connecting to "localhost:25566" you send that to mojang instead of whatever the proxy is sending your connection to. As a result of that when the end server makes a request to the minecraft session servers asking if the user trying to connect is a vaild user, they don't get anything because your client never tells the minecraft session servers what the end server is. If that didn't make any sense, I'd be happy to try to re-word it. |
It looks like the solution (that doesn't involve client mods) is to login, then fire up the proxy and have the proxy login to Mojang again. On connect, the proxy should send to Mojang "I'm SnoFox and I'm connecting to mc.example.com:25565" (even though the real client is connecting to localhost:25565). |
Exactly. |
Ok, so do we have a reproducible and tested solution? Even partial for now.... |
Not written, no. But I can throw a beta version together later if needed. |
Sure, anything that helps. |
Love what you are doing.
I have proxy pointed to a live online server and the bot is pointed to the proxy.
It connects but i get the failed to verify username error, i get this even if i set the option --username to my username or without the option.
Running on linux.
Command to start bot:
python bot.py --botemail user@gmail.com --botpass mypassword --log2file --serverhost localhost --serverport 1338 --botname MYNAME --use_encryption
Command to start proxy:
python proxy.py --serverhost SERVERIP --serverport 25565 --log2file --proxyport 1338
Bot:
03:22:19.982493 [CORE EVENT] Server kicked me out with message: Failed to verify username!
03:22:19.982831 [WORLD] Shutdown
Proxy:
03:22:19.151932 [SERVER] Starting encryption
03:22:19.152027 [CLIENT] Starting encryption
03:22:19.152735 [CLIENT] id 205 client statuses
status: 0
03:22:19.981817 [SERVER] id 255 disconnect/kick
message: Failed to verify username!
03:22:19.984072 [CLIENT] Lost connection from client: Connection was closed cleanly.
What can do, not really sure how to move on or how to fix this.
Im sure everything is correct in the command line im using to load both applications.
Is this common?
edit:
To clarify, i can connect to the server normally without the message using both normal and custom clients.
My accounts are paid online accounts.
The text was updated successfully, but these errors were encountered: