node-minecraft-protocol icon indicating copy to clipboard operation
node-minecraft-protocol copied to clipboard

[MC 1.20.6 - Protocol 1.49.0] nmp server: Failed to verify username

Open vincss opened this issue 1 year ago • 13 comments

[x] The FAQ doesn't contain a resolution to my issue

Versions

  • minecraft-protocol: 1.49.0
  • server: vanilla/spigot/paper 1.20.6
  • node: 20.10.0

Detailed description of a problem

When I'm trying to connect to the server with a client in version 1.20.6 and the server is using minecraft-protocol 1.49.0, I get the follow error in the client : image

Current code

DEBUG CreateServer {
  'online-mode': true,
  motdMsg: { text: 'SleepingServer, waiting for his prince...' },
  port: 25565,
  maxPlayers: 20,
  version: false,
  beforePing: [Function: beforePing],
  validateChannelProtocol: true,
  errorHandler: [Function: errorHandler],
  enforceSecureProfile: true
}

Expected behavior

The connection is accepted, and it doesn't failed to verify the username.

Additional context

When I switch the "oneline-mode" to false: DEBUG CreateServer { 'online-mode': false, motdMsg: { text: 'SleepingServer, waiting for his prince...' }, port: 25565, maxPlayers: 20, version: false, beforePing: [Function: beforePing], validateChannelProtocol: true, errorHandler: [Function: errorHandler], enforceSecureProfile: false } The connection is handle but I got an error on the client side : {0221C08B-3A66-4901-996D-5F11BC8CD9E7}

Thanks for your help & devotion and this package.

Have a nice day.

vincss avatar Oct 13 '24 07:10 vincss

@LucienHH do you think you could help figure that out?

rom1504 avatar Oct 13 '24 10:10 rom1504

@vincss can you reproduce on a vanilla server ?

rom1504 avatar Oct 13 '24 21:10 rom1504

Hi, Yes, it is before the minecraft server starts, I make a server that listen for client before to wake a real server : https://github.com/vincss/mcsleepingserverstarter/blob/master/src/sleepingMcJava.ts#L40

Thanks for your investigation.

vincss avatar Oct 14 '24 07:10 vincss

We checked, client is working in 1.20.6

rom1504 avatar Oct 14 '24 20:10 rom1504

I'm using the server part of the library and a vanilla client.

vincss avatar Oct 14 '24 20:10 vincss

Hi, I also tried with the latest version of node-minecraft-protocol 1.50.0 and client in 1.21.1 , but I ended up with the same error. :(

vincss avatar Oct 27 '24 18:10 vincss

Provide more info. It's working for some people and not others

rom1504 avatar Oct 27 '24 19:10 rom1504

I would gladly provide more information.

When I start a server with the createServer with the version "minecraft-protocol": "^1.50.0", : https://github.com/vincss/mcsleepingserverstarter/blob/feature/minecraft-protocol_1.50.0/src/sleepingMcJava.ts#L39

DEBUG CreateServer {
  'online-mode': true,
  motdMsg: { text: 'SleepingServer, waiting for his prince...' },
  port: 25565,
  maxPlayers: 20,
  version: false,
  beforePing: [Function: beforePing],
  validateChannelProtocol: true,
  errorHandler: [Function: errorHandler],
  enforceSecureProfile: true
}

In the official client vanilla client in 1.21.1, I get the following error "Failed to verify username" : {8494EFB7-2562-4F5A-987A-4CF3CD777E7E}

Can you tell me which information would help ?

vincss avatar Oct 29 '24 09:10 vincss

So your problem is not about node Minecraft protocol client but about the server. Is that right?

rom1504 avatar Oct 29 '24 12:10 rom1504

Yes, that's it :-)

vincss avatar Oct 29 '24 12:10 vincss

Issue still exists in Minecraft 1.21.3

bahuma20 avatar Jan 19 '25 22:01 bahuma20

I can confirm that flying-squid is working in online-mode on 1.21.3. Unlikely any issue in node-minecraft-protocol, it could be an issue with invalid server implementation. 1.20 made big changes to the login procedure with introduction of states which need to be handled by all server implementations.

I recommend using flying-squid if possible

extremeheat avatar Jan 19 '25 23:01 extremeheat

+1

Sayrix avatar Mar 16 '25 15:03 Sayrix