GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.72k stars 676 forks source link

Your username contains illegal characters. #1316

Closed zeratax closed 4 years ago

zeratax commented 4 years ago

Describe the bug When trying to connect with a bedrock client to an offline java server with geyser and floodgate, I can't join and get immediately disconnect with the error: Your username contains illegal characters Allowed chars: [a-zA-Z0-9_]*

But my username is m0jibake, which should fit perfectly to that regex, no?

To Reproduce

  1. install geyser and floodgate
  2. set geyser auth mode to floodgate
  3. floodgate enable account linking
  4. restart server
  5. join server with a bedrock client

Expected behavior I join the server

Screenshots / Videos error

Server Version git-Paper-202 (MC:1.16.3)

Geyser Version 1.1.0 (git-master-5fafa07)

Minecraft: Bedrock Edition Version v.1.16.40 windows 10 and android

Additional Context https://dump.geysermc.org/VobURCfL9zcYxsSd5ydAr1jCu50XEmAm

Sep 20 15:24:57 phantom.dmnd.sh java[5597]: [15:24:57 INFO]: [Geyser-Spigot] /redacted:65223 tried to connect!
Sep 20 15:24:58 phantom.dmnd.sh java[5597]: [15:24:58 INFO]: [Geyser-Spigot] Player connected with username m0jibake
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [Geyser-Spigot] Attempting to login using floodgate mode... authentication will be encrypted.
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [Geyser-Spigot] Loaded Floodgate key!
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [Geyser-Spigot] m0jibake (logged in as: m0jibake) has connected to remote java server on address 127.0.1.1
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [floodgate-bukkit] Added *m0jibake 00000000-0000-0000-0009-01f46db1fa18
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: Disconnecting com.mojang.authlib.GameProfile@3b46a637[id=00000000-0000-0000-0009-01f46db1fa18,name=*m0jibake,properties={},legacy=false] (/redacted:42620): Your username contains illegal characters. Allowed chars:
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [Geyser-Spigot] m0jibake has disconnected from remote Java server on address 127.0.1.1 because of Your username contains illegal characters. Allowed chars: [a-zA-Z0-9_]*
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: com.mojang.authlib.GameProfile@3b46a637[id=00000000-0000-0000-0009-01f46db1fa18,name=*m0jibake,properties={},legacy=false] (/redacted:42620) lost connection: Your username contains illegal characters. Allowed chars
Sep 20 15:25:03 phantom.dmnd.sh java[5597]: [15:25:03 INFO]: [Geyser-Spigot] Bedrock user with ip: /redacted has disconnected for reason CLOSED_BY_REMOTE_PEER
rtm516 commented 4 years ago

Please change the below in your authme config, we also wont offer any more support as we don't support nor condone piracy.

allowedNicknameCharacters: '[a-zA-Z0-9_]*'
in your AuthMe config should be changed to
allowedNicknameCharacters: '\*?[a-zA-Z0-9_]*'
GianLucky08 commented 3 years ago

Please change the below in your authme config, we also wont offer any more support as we don't support nor condone piracy.

allowedNicknameCharacters: '[a-zA-Z0-9_]*'
in your AuthMe config should be changed to
allowedNicknameCharacters: '\*?[a-zA-Z0-9_]*'

I tried to do what @rtm516 says and I still get the same error, is there another solution?

Chew commented 3 years ago

That's very outdated because it uses floodgate's old config. I believe you just need to replace \*? with \.? and it'll work. If you have further issues, please hop on Discord to prevent bumping this old issue. (Or, better yet, switch to online mode! :3)

Luckybhai3037 commented 1 year ago

![Uploading Screenshot_2023-04-24-15-10-12-36_5c8300b655012b1930f2e0a7b81bf6a9.jpg…]()