adepierre / Botcraft

Botcraft is a cross-platform C++ library to create bots that connect and interact with Minecraft servers with (optional) integrated OpenGL renderer
GNU General Public License v3.0
404 stars 43 forks source link

document how to work with the microsoft authentication #73

Closed folkertvanheusden closed 2 years ago

folkertvanheusden commented 2 years ago

Hi,

Beginning of March, all accounts are migrated to microsoft accounts. From what I read Botcraft supports this. But how? Running the included examples with the microsoft credentials doesn't work (invalid auth) and also the description ("leave empty") is confusing (how does it know how to authenticate if everything is left empty?).

thanks!

adepierre commented 2 years ago

Hi!

Basically, if login and password are both empty, botcraft will default to Microsoft auth flow. But the authentication is not performed directly in botcraft (that's why they can be left empty). You should get instructions in the console for you to log in with a browser (only the first time, will use the cached token for the next times).

Hope it's easier for you with these instructions! Will try to write a more detailed wiki page soon-ish.

folkertvanheusden commented 2 years ago

Hi, Thanks for your reply.

Unfortunately the instructions are not outputted to the console. In fact it crashes:

[2022-02-09 08:44:39.948] [WARNING] [main(140737329614784)]main.cpp(37): No command arguments. Using default options.
Usage: /home/folkert/Botcraft/bin/5_MobHitterExample <options>
Options:
        -h, --help      Show this help message
        --address       Address of the server you want to connect to, default: 127.0.0.1:25565
        --login         Player name in offline mode, login for Mojang account, empty for Microsoft account, default: BCChatCommand
        --password      Mojang account password, empty for servers in offline mode or Microsoft account, default: empty

[2022-02-09 08:44:39.948] [WARNING] [main(140737329614784)]ManagersClient.cpp(41): Your version of botcraft hasn't been compiled with GUI enabled, setting use_renderer_ to false
[2022-02-09 08:44:39.948] [INFO] [main(140737329614784)]AssetsManager.cpp(26): Loading blocks from file...
[2022-02-09 08:44:39.949] [ERROR] [main(140737329614784)]AssetsManager.cpp(123): Error reading info block file at ./Assets/1.18.1/custom/Blocks_info.json
[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(28): Done!
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(29): Loading biomes from file...
[2022-02-09 08:44:39.949] [ERROR] [main(140737329614784)]AssetsManager.cpp(510): Error reading biome file at ./Assets/1.18.1/custom/Biomes.json
[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(31): Done!
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(32): Loading items from file...
[2022-02-09 08:44:39.949] [ERROR] [main(140737329614784)]AssetsManager.cpp(601): Error reading item file at ./Assets/1.18.1/custom/Items.json
[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(34): Done!
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(44): Clearing cache from memory...
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]AssetsManager.cpp(46): Done!
[2022-02-09 08:44:39.949] [INFO] [main(140737329614784)]main.cpp(97): Starting connection process
[New Thread 0x7ffff6896700 (LWP 1645978)]
[2022-02-09 08:44:39.951] [INFO] [main(140737329614784)]TCP_Com.cpp(28): Trying to connect to 127.0.0.1:25565
[New Thread 0x7ffff6095700 (LWP 1645979)]
[2022-02-09 08:44:39.951] [INFO] [NetworkIOService(140737321195264)]TCP_Com.cpp(93): Connected to server.
[New Thread 0x7ffff5894700 (LWP 1645985)]
terminate called after throwing an instance of 'std::runtime_error'
  what():  Authentication asked while no valid account has been provided, make sure to connect with a valid Mojang or Microsoft Account

Thread 2 "5_MobHitterExam" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff6896700 (LWP 1645978)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6a30859 in __GI_abort () at abort.c:79
#2  0x00007ffff6cb6911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6cc238c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6cc23f7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6cc26a9 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff79591cd in Botcraft::NetworkManager::Handle(ProtocolCraft::ClientboundHelloPacket&) () from /home/folkert/Botcraft/bin/libbotcraft.so
#7  0x00007ffff7a023fb in ProtocolCraft::BaseMessage<ProtocolCraft::ClientboundHelloPacket>::DispatchImpl(ProtocolCraft::Handler*) ()
   from /home/folkert/Botcraft/bin/libbotcraft.so
#8  0x00007ffff7959c36 in ProtocolCraft::Message::Dispatch(ProtocolCraft::Handler*) () from /home/folkert/Botcraft/bin/libbotcraft.so
#9  0x00007ffff7958fec in Botcraft::NetworkManager::ProcessPacket(std::vector<unsigned char, std::allocator<unsigned char> > const&) ()
   from /home/folkert/Botcraft/bin/libbotcraft.so
#10 0x00007ffff7958ce2 in Botcraft::NetworkManager::WaitForNewPackets() () from /home/folkert/Botcraft/bin/libbotcraft.so
#11 0x00007ffff79db325 in void std::__invoke_impl<void, void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*>(std::__invoke_memfun_deref, void (Botcraft::NetworkManager::*&&)(), Botcraft::NetworkManager*&&) () from /home/folkert/Botcraft/bin/libbotcraft.so
#12 0x00007ffff79da9a0 in std::__invoke_result<void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*>::type std::__invoke<void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*>(void (Botcraft::NetworkManager::*&&)(), Botcraft::NetworkManager*&&) () from /home/folkert/Botcraft/bin/libbotcraft.so
#13 0x00007ffff79da0cb in void std::thread::_Invoker<std::tuple<void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) () from /home/folkert/Botcraft/bin/libbotcraft.so
#14 0x00007ffff79d8ef0 in std::thread::_Invoker<std::tuple<void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*> >::operator()() ()
   from /home/folkert/Botcraft/bin/libbotcraft.so
#15 0x00007ffff79ce72c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (Botcraft::NetworkManager::*)(), Botcraft::NetworkManager*> > >::_M_run() ()
   from /home/folkert/Botcraft/bin/libbotcraft.so
#16 0x00007ffff6ceede4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#17 0x00007ffff6e03609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00007ffff6b2d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
adepierre commented 2 years ago

As stated in the help displayed at top, you didn't provide any arguments, so it's using the default ones, including a default login "BCChatCommand". You'll need to either change it in the code or launch it with actual empty login:

5_MobHitterExample --login ""

(and I'm also a bit concerned about the fact that it doesn't find the assets files. Did you do anything about them or should I take a look to this issue too?)

folkertvanheusden commented 2 years ago

Aaaah ok, indeed I should read more closely. Now indeed it gives me the how-to-proceed help.

[2022-02-09 10:36:26.642] [INFO] [main(140054461837248)]Authentifier.cpp(157): Trying to get XBL token...
[2022-02-09 10:36:27.445] [INFO] [main(140054461837248)]Authentifier.cpp(164): XBL token obtained!
[2022-02-09 10:36:27.445] [INFO] [main(140054461837248)]Authentifier.cpp(166): Trying to get XSTS token...
[2022-02-09 10:36:28.156] [INFO] [main(140054461837248)]Authentifier.cpp(173): XSTS token obtained!
[2022-02-09 10:36:28.156] [INFO] [main(140054461837248)]Authentifier.cpp(175): Trying to get MC token...
[2022-02-09 10:36:28.209] [FATAL] [main(140054461837248)]main.cpp(109): Exception: handshake: wrong version number

This (the version number exception) stays though, also after I start it again. According to grep, that is an openssl error:

../3rdparty/openssl/ssl/ssl_err.c:    "wrong version number"},

It is not a date/time issue (causing out-of-date certificates).

Regarding the assets: ignore that, I started it from the wrong path.

adepierre commented 2 years ago

Yep that looks like an openssl issue. Will try to reproduce it to see if I can find the origin and a fix.

Do you know if you use an openssl version from your system, or the submodule in botcraft? Your grep thing makes me think you don't have it on your system and it's the integrated one but just to be sure.

folkertvanheusden commented 2 years ago

I rebuilt it with the system openssl (purged 3rdparty/openssl, purged build/ and then rebuild); same problem.

0 __GI_raise @.***=6) at ../sysdeps/unix/sysv/linux/raise.c:50

1 0x00007ffff6dbe859 in __GI_abort () at abort.c:79

2 0x00007ffff7044911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

3 0x00007ffff705038c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

4 0x00007ffff70503f7 in std::terminate() () from

/lib/x86_64-linux-gnu/libstdc++.so.6

5 0x00007ffff70506a9 in __cxa_throw () from

/lib/x86_64-linux-gnu/libstdc++.so.6

6 0x00007ffff7c0e481 in asio::detail::throw_exception

(e=...) at /home/folkert/Botcraft/3rdparty/asio/asio/include/asio/detail/throw_exception.hpp:42

7 0x00007ffff7c04c4e in asio::detail::do_throw_error (err=...,

location=0x7ffff7dc2f68 "handshake") at /home/folkert/Botcraft/3rdparty/asio/asio/include/asio/detail/impl/throw_error.ipp:49

8 0x00007ffff7c04b75 in asio::detail::throw_error (err=...,

location=0x7ffff7dc2f68 "handshake") at /home/folkert/Botcraft/3rdparty/asio/asio/include/asio/detail/throw_error.hpp:41

9 0x00007ffff7c11b99 in

asio::ssl::stream<asio::basic_stream_socket >::handshake (this=0x7fffffffc540, type=asio::ssl::stream_base::client) at /home/folkert/Botcraft/3rdparty/asio/asio/include/asio/ssl/stream.hpp:374

10 0x00007ffff7c01932 in Botcraft::Authentifier::WebRequest

(this=0x555559b33c70, host="api.minecraftservices.com", raw_request="POST /authentication/login_with_xbox HTTP/1.1 \r\nHost: api.minecraftservices.com\r\nUser-Agent: C/1.0\r\nContent-Type: application/json \r\nAccept: application/json\r\nContent-Length: 2151\r\nConnection: close\r\n"...) at /home/folkert/Botcraft/botcraft/src/Network/Authentifier.cpp:948

11 0x00007ffff7c02a82 in Botcraft::Authentifier::POSTRequest

(this=0x555559b33c70, host="api.minecraftservices.com", endpoint="/authentication/login_with_xbox", content_type="application/json", accept="application/json", data="{\"identityToken\":\"XBL3.0 x=41[REDACTED]ZRr"...) at /home/folkert/Botcraft/botcraft/src/Network/Authentifier.cpp:1049

12 0x00007ffff7bffcb2 in Botcraft::Authentifier::GetMCToken

(this=0x555559b33c70, login="", xsts_token="eyJlbU9BRVREDACTED.WcIHuPZ_E"..., user_hash="414628128526245478") at /home/folkert/Botcraft/botcraft/src/Network/Authentifier.cpp:861

13 0x00007ffff7bf1d73 in Botcraft::Authentifier::AuthMicrosoft

(this=0x555559b33c70, login="") at /home/folkert/Botcraft/botcraft/src/Network/Authentifier.cpp:176

14 0x00007ffff7c2fb22 in Botcraft::NetworkManager::NetworkManager

(this=0x55555d7259c0, address="127.0.0.1:25565", login="", password="", force_microfost_auth=false) at /home/folkert/Botcraft/botcraft/src/Network/NetworkManager.cpp:26

15 0x00007ffff7b0b10e in

gnu_cxx::new_allocator::construct<Botcraft::NetworkManager, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> ( this=0x7fffffffda6f, __p=0x55555d7259c0) at /usr/include/c++/9/ext/new_allocator.h:147

16 0x00007ffff7b0afa0 in

std::allocator_traits<std::allocator

::construct<Botcraft::NetworkManager, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> ( a=..., __p=0x55555d7259c0) at /usr/include/c++/9/bits/alloc_traits.h:484

17 0x00007ffff7b0ad83 in

std::_Sp_counted_ptr_inplace<Botcraft::NetworkManager, std::allocator, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> (this=0x55555d7259b0, a=...) at /usr/include/c++/9/bits/shared_ptr_base.h:548

18 0x00007ffff7b0a9dc in

std::shared_count<(__gnu_cxx::_Lock_policy)2>::shared_count<Botcraft::NetworkManager, std::allocator, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> (this=0x7fffffffdcb8, @.***: 0x0, a=...) at /usr/include/c++/9/bits/shared_ptr_base.h:679

19 0x00007ffff7b0a770 in std::__shared_ptr<Botcraft::NetworkManager,

(gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> (this=0x7fffffffdcb0, __tag=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1344

20 0x00007ffff7b0a597 in

std::shared_ptr::shared_ptr<std::allocator, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> ( this=0x7fffffffdcb0, tag=...) at /usr/include/c++/9/bits/shared_ptr.h:359

21 0x00007ffff7b0a295 in std::allocate_shared<Botcraft::NetworkManager,

std::allocator, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> (a=...) at /usr/include/c++/9/bits/shared_ptr.h:702

22 0x00007ffff7b09f87 in std::make_shared<Botcraft::NetworkManager,

std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool const&> () at /usr/include/c++/9/bits/shared_ptr.h:718

23 0x00007ffff7b0687c in Botcraft::ConnectionClient::Connect

(this=0x7fffffffddf0, address="127.0.0.1:25565", login="", password="", force_microsoft_account=false) at /home/folkert/Botcraft/botcraft/src/Game/ConnectionClient.cpp:22

On Wed, Feb 9, 2022 at 12:38 PM adepierre @.***> wrote:

Yep that looks like an openssl issue. Will try to reproduce it to see if I can find the origin and a fix.

Do you know if you use an openssl version from your system, or the submodule in botcraft? Your grep thing makes me think you don't have it on your system and it's the integrated one but just to be sure.

— Reply to this email directly, view it on GitHub https://github.com/adepierre/Botcraft/issues/73#issuecomment-1033667402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUN5IW7ZGY6VCYCTLAWOG43U2JGZNANCNFSM5N3Z5P7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

adepierre commented 2 years ago

I did some tests and I'm afraid I'm unable to reproduce your issue.

I tried to connect to Hypixel using the following steps:

On these configurations:

And got the same successfull connection result three times on each. So I'm not sure what the issue is here😕

Is there anything special about your connection setup? (proxy, VPN or stuff like that?) I can't think of anything else that would explain your error.

folkertvanheusden commented 2 years ago

Very strange. Indeed, from my home (no vpn/proxy/anything, only ipv4) the bot succesfully connects to mc.hypixel.net. If you mail me your IP-address, I can add you to the firewall and mail you back the address of my server to test if you like? (don't feel obliged) It is a regular mojang 1.18.1 java server. mail@vanheusden.com

folkertvanheusden commented 2 years ago

Something very strange happened: I logged now back again on my own server, and now it works fine! Maybe something went wrong this morning with the authentication process at microsoft.

folkertvanheusden commented 2 years ago

F.w.i.w.: it suddenly out of the blue happens again:

[2022-02-10 19:44:52.223] [INFO] [main(140737329727360)]test.cpp(21): Starting connection process
[2022-02-10 19:44:52.224] [INFO] [main(140737329727360)]Authentifier.cpp(137): Cached Minecraft token for Microsoft account expired, starting auth flow...
[2022-02-10 19:44:52.224] [INFO] [main(140737329727360)]Authentifier.cpp(149): Trying to get Microsoft access token...
[2022-02-10 19:44:52.225] [INFO] [main(140737329727360)]Authentifier.cpp(639): Microsoft token obtained from cache
[2022-02-10 19:44:52.225] [INFO] [main(140737329727360)]Authentifier.cpp(157): Trying to get XBL token...
[2022-02-10 19:44:52.983] [INFO] [main(140737329727360)]Authentifier.cpp(164): XBL token obtained!
[2022-02-10 19:44:52.983] [INFO] [main(140737329727360)]Authentifier.cpp(166): Trying to get XSTS token...
[2022-02-10 19:44:53.704] [INFO] [main(140737329727360)]Authentifier.cpp(173): XSTS token obtained!
[2022-02-10 19:44:53.704] [INFO] [main(140737329727360)]Authentifier.cpp(175): Trying to get MC token...
terminate called after throwing an instance of 'std::system_error'
  what():  handshake: wrong version number
#9  0x00007ffff7c11c37 in asio::ssl::stream<asio::basic_stream_socket<asio::ip::tcp> >::handshake (this=0x7fffffffc670, 
    type=asio::ssl::stream_base::client) at /home/folkert/Botcraft/3rdparty/asio/asio/include/asio/ssl/stream.hpp:374
#10 0x00007ffff7c019d0 in Botcraft::Authentifier::WebRequest (this=0x555559b6a880, host="api.minecraftservices.com", 
    raw_request="POST /authentication/login_with_xbox HTTP/1.1 \r\nHost: api.minecraftservices.com\r\nUser-Agent: C/1.0\r\nContent-Type: application/json \r\nAccept: application/json\r\nContent-Length: 2151\r\nConnection: close\r\n"...)
folkertvanheusden commented 2 years ago

test.pcap.zip

I don't believe the wireshark-dump tells anything, but just in case.

folkertvanheusden commented 2 years ago

This also happens (when it happens) right after an authentication against microsoft.

adepierre commented 2 years ago

This also happens (when it happens) right after an authentication against microsoft.

What do you mean 'also'? Could you describe precisely the cases in which you experience(d) the issue?

Also, are you sure ut's always the same version of openssl that's used?

folkertvanheusden commented 2 years ago

I'm seeing this when:

Both versions used the openssl from the system.

I've tried it from a different internet-ip address (e.g. from a vps instead of from home) and then I also get that error. This is on a 'debian bullseye' with openssl 1.1.1k-1+deb11u1 I conclude from that, that it may not be an IP-block or so.

I also tried using the account from a 'real' minecraft client and then back again with blockcraft, but it still fails then. My conclusion is that it may not be an account-block.

adepierre commented 2 years ago

Ok so good news bad news.

The good point is that I am now able to reproduce the error (at least at the moment). The bad point is that I still don't know how to fix it.

However, your pcap file gave me an idea. If I read it correctly, the handshake for MC Token (to api.minecraftservices.com) is performed using TLSv1, but according to this, TLS 1 is disabled for this endpoint. So it could be the source of the bug.

Now what is still a mystery for me is that why this request uses TLSv1 while the others (like the ones to user.auth.xboxlive.com or xsts.auth.xboxlive.com) are performed with TLSv1.2. They all call the POSTRequest function, which is the same for all.

I'll try to dig in this direction, I think that's the root cause for this issue.

folkertvanheusden commented 2 years ago
POST /authentication/login_with_xbox HTTP/1.1 \r\nHost: api.minecraftservices.com\r\nUser-Agent: C/1.0\r\nContent-Type: application/json \r\nAccept: application/json\r\nContent-Length: 2152\r\nConnection: close\r\n

I wonder why there's a space between 'HTTP/1.1' and '\r\n'? Removing it doesn't fix the problem though.

[...] No of course, it won't: it is the client that disconnects (if I remember the pcap correctly).

folkertvanheusden commented 2 years ago

However, your pcap file gave me an idea. If I read it correctly, the handshake for MC Token (to api.minecraftservices.com) is performed using TLSv1, but according to this, TLS 1 is disabled for this endpoint. So it could be the source of the bug.

Now what is still a mystery for me is that why this request uses TLSv1 while the others (like the ones to user.auth.xboxlive.com or xsts.auth.xboxlive.com) are performed with TLSv1.2. They all call the POSTRequest function, which is the same for all.

Maybe not all endpoints use TLSv1.2? api.minecraftservices.com points to several ip-adresses, maybe they're not all up-to-date?

adepierre commented 2 years ago

Oh ok. I'm not very familiar with web stuffs and I didn't know it was possible, but yeah it makes sense. Now I have to find why only this request is using TLSv1 while the other don't and it should solve the issue. Maybe. Perhaps. I hope.

adepierre commented 2 years ago

Fixed with latest commit. I've been able to confirm it on my side, I hope it solves the issue for you too.

folkertvanheusden commented 2 years ago

Hi,

The version-error is gone, I get an other now though:

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[2022-02-11 21:02:23.305] [INFO] [main(140737329727360)]AssetsManager.cpp(26): Loading blocks from file...
[2022-02-11 21:02:30.141] [INFO] [main(140737329727360)]AssetsManager.cpp(28): Done!
[2022-02-11 21:02:30.141] [INFO] [main(140737329727360)]AssetsManager.cpp(29): Loading biomes from file...
[2022-02-11 21:02:30.143] [INFO] [main(140737329727360)]AssetsManager.cpp(31): Done!
[2022-02-11 21:02:30.143] [INFO] [main(140737329727360)]AssetsManager.cpp(32): Loading items from file...
[2022-02-11 21:02:30.159] [INFO] [main(140737329727360)]AssetsManager.cpp(34): Done!
[2022-02-11 21:02:30.159] [INFO] [main(140737329727360)]AssetsManager.cpp(44): Clearing cache from memory...
[2022-02-11 21:02:30.173] [INFO] [main(140737329727360)]AssetsManager.cpp(46): Done!
[New Thread 0x7ffff688b700 (LWP 2502055)]
[2022-02-11 21:02:30.174] [INFO] [main(140737329727360)]test.cpp(21): Starting connection process
[2022-02-11 21:02:30.176] [INFO] [main(140737329727360)]Authentifier.cpp(144): Cached Minecraft token for Microsoft account still valid.
[New Thread 0x7ffff608a700 (LWP 2502056)]
[2022-02-11 21:02:30.177] [INFO] [main(140737329727360)]TCP_Com.cpp(28): Trying to connect to 127.0.0.1:25565
[New Thread 0x7ffff5889700 (LWP 2502057)]
[2022-02-11 21:02:30.177] [INFO] [NetworkIOService(140737312757504)]TCP_Com.cpp(93): Connected to server.
[2022-02-11 21:02:30.830] [ERROR] [NetworkPacketProcessing(140737321150208)]Authentifier.cpp(286): Response returned with status code 403 ( Forbidden) during server join:
{   
    "error": "ForbiddenOperationException",
    "path": "/session/minecraft/join"
}
[Thread 0x7ffff5889700 (LWP 2502057) exited]
[2022-02-11 21:02:30.956] [INFO] [NetworkPacketProcessing(140737321150208)]ConnectionClient.cpp(75): Disconnect during login with reason:
[Thread 0x7ffff608a700 (LWP 2502056) exited]
[Thread 0x7ffff68b8780 (LWP 2502003) exited]
folkertvanheusden commented 2 years ago

If I delete botcraft_cached_credentials.json first, then it works!