Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 04 20:47
    extremeheat edited #929
  • Dec 04 20:47
    extremeheat opened #929
  • Dec 04 18:37
    leopoldhub opened #928
  • Dec 03 04:45
    Kashalls commented #927
  • Dec 03 04:42
    u9g commented #927
  • Dec 03 04:21
    CamiKaseM7 opened #927
  • Dec 02 23:39
    rom1504 opened #926
  • Dec 02 23:28

    github-actions[bot] on 1.28.1

    (compare)

  • Dec 02 23:27

    rom1504 on master

    update electron in example Release 1.28.1 (compare)

  • Nov 22 23:37
    rom1504 closed #925
  • Nov 22 23:37

    rom1504 on master

    Fix microsoft auth error condit… (compare)

  • Nov 22 20:40
    extremeheat opened #925
  • Nov 20 23:35

    rom1504 on master

    reorganize readme (compare)

  • Nov 14 12:01

    github-actions[bot] on 1.28.0

    (compare)

  • Nov 14 12:00
    rom1504 closed #924
  • Nov 14 12:00

    rom1504 on master

    Release 1.28.0 (#924) (compare)

  • Nov 14 08:14
    extremeheat opened #924
  • Nov 12 01:09
    rom1504 closed #910
  • Nov 12 01:09
    rom1504 commented #910
  • Nov 12 01:09
    rom1504 closed #889
rom1504bot
@rom1504bot
<extremeheat> Probably on your side
rom1504bot
@rom1504bot
<Kashall> I sure hope so
<Kashall> This one account has been locked three times
rom1504bot
@rom1504bot
<Kashall> @extremeheat When do we plan on making microsoft the default auth btw
<Kashall> Also @extremeheat : user accounts who get locked and try to reauth using msa hit error code AADSTS70012 which is a MSA Server Error :thonk:
rom1504bot
@rom1504bot
<extremeheat> What endpoint? Probably once mojang auth is no longer an option it would be defaulting to Microsoft accounts
<Kashall> Its a long error message but.
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | ServerError: 70012: AADSTS70012: A server error occurred while authenticating an MSA (consumer) user.
0|afk      | Trace ID: 2b36e39c-e282-4e8a-839a-92be7e0eb104
0|afk      | Correlation ID: 293eb743-f881-4c92-9c85-2384d045ca6a
0|afk      | Timestamp: 2021-12-01 03:37:35Z
0|afk      |     at ServerError.AuthError [as constructor] (/root//node_modules/@azure/msal-common/dist/index.cjs.js:477:24)
0|afk      |     at new ServerError (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3060:28)
0|afk      |     at Function.ThrottlingUtils.preProcess (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3096:19)
0|afk      |     at NetworkManager.<anonymous> (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3181:41)
0|afk      |     at step (/root//node_modules/@azure/msal-common/dist/index.cjs.js:79:23)
0|afk      |     at Object.next (/root//node_modules/@azure/msal-common/dist/index.cjs.js:60:53)
0|afk      |     at /root//node_modules/@azure/msal-common/dist/index.cjs.js:53:71
0|afk      |     at new Promise (<~~anonymous~~>)
0|afk      |     at __awaiter (/root//node_modules/@azure/msal-common/dist/index.cjs.js:49:12)
0|afk      |     at NetworkManager.sendPostRequest (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3176:16) {
0|afk      |   errorCode: '70012',
0|afk      |   errorMessage: 'AADSTS70012: A server error occurred while authenticating an MSA (consumer) user.\r\n' +
0|afk      |     'Trace ID: 2b36e39c-e282-4e8a-839a-92baaae0eb104\r\n' +
0|afk      |     'Correlation ID: 293eb742-f8r1-4c92-9c85-238aaa045ca6a\r\n' +
0|afk      |     'Timestamp: 2021-12-01 03:37:35Z',
0|afk      |   subError: ''
0|afk      | }
<extremeheat> Update your dependencies
<extremeheat> Newer Minecraft protocol does not use the azure endpoint anymore
rom1504bot
@rom1504bot
<extremeheat> If your account is actually locked we can’t fix it, that’s something the user needs to deal with (either by waiting or contacting customer support)
<Kashall> In this case, it rebooted too many times and microsoft flagged it
<Kashall> So I had to manually intervene
<extremeheat> Well as long as caching is in place, it should not even contact the auth servers. It will just use the Minecraft session token and use that to join servers
<extremeheat> So unless the auth is already failing for some reason and you fail it many times maybe that would lock your account
<extremeheat> I’m not aware of any issues code wise that would result in it failing on our side(if the user does the password wrong, we don’t fail on outside at all)
<extremeheat> It only does the retry thing if there’s an exception in our code
<Kashall> Im not sure if like they all decided to unvaildate all at the sametime
<Kashall> Im not sure
<Kashall> But all my tokens went poof
<extremeheat> I’m not aware of any issues code wise that would result in it failing on our side(if the user does the password wrong, we don’t fail on our side at all)
rom1504bot
@rom1504bot
<Kashall> I eventually need to figure something out with this new caching store thingy to store tokens other than in the cache folder
<Lucienn> Redis works great
<Kashall> Does redis persist over reboots?
<extremeheat> There’s nothing wrong with the file system unless you are doing IO heavy work
<extremeheat> Ultimately using other database software is going to be writing to disk also
rom1504bot
@rom1504bot
<Lucienn> Using tokens across applications and with multiple users has been useful for me since adding redis
<extremeheat> Yeah if you have different systems that’s where the databases come into play
rom1504bot
@rom1504bot
<Lucienn> Yes, if you sign up with redislab you can choose a free tier with 30mb
rom1504bot
@rom1504bot
<Kashall> I have my own infrastructure right now, trying not to add more servers already lol. I have three environments, my local one, and two "prods" and I kinda get tired of copying the caches back and forth xD
rom1504bot
@rom1504bot
<Kashall> @extremeheat Is p-auth 1.3.1 ready for prod?
<Kashall> Can we push 1.3.1 to nmp?
rom1504bot
@rom1504bot
<rom1504> isn't that in autoguess mode already?
<rom1504> is it even needed to specify microsoft?
<Kashall> https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/src/createClient.js#L37 According to this line, if you want microsoft auth, you have to be specific.
<PrismarineJS> Showing lines 27 to 47 of master/src/createClient.js
 27   const mcData = require('minecraft-data')(optVersion)
 28   if (!mcData) throw new Error(`unsupported protocol version: ${optVersion}`)
 29   const version = mcData.version
 30   options.majorVersion = version.majorVersion
 31   options.protocolVersion = version.version
 32   const hideErrors = options.hideErrors || false
 33 
 34   const client = new Client(false, version.minecraftVersion, options.customPackets, hideErrors)
 35 
 36   tcpDns(client, options)
>37   if (options.auth === 'microsoft') {
 38     microsoftAuth.authenticate(client, options)
 39   } else {
 40     auth(client, options)
 41   }
 42   if (options.version === false) autoVersion(client, options)
 43   setProtocol(client, options)
 44   keepalive(client, options)
 45   encrypt(client, options)
 46   play(client, options)
 47   compress(client, options)
<rom1504> true
<rom1504> I think it should be quite doable
<rom1504> I think it should be transparent to the user
rom1504bot
@rom1504bot

<Kashall> @extremeheat Encountered a strange bug here with latest protocol: https://github.com/PrismarineJS/prismarine-auth/blob/0223a23039242068b11cd99a6ade184034d539d8/src/TokenManagers/LiveTokenManager.js#L160

|afk      | Error: Authentication failed, timed out
0|afk      |     at LiveTokenManager.authDeviceCode (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/TokenManagers/LiveTokenManager.js:160:11)
0|afk      |     at runMicrotasks (<anonymous>)
0|afk      |     at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|afk      |     at async MicrosoftAuthFlow.getMsaToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:90:19)
0|afk      |     at async retry.msa.forceRefresh (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:118:26)
0|afk      |     at async retry (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:22:14)
0|afk      |     at async MicrosoftAuthFlow.getXboxToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:117:14)
0|afk      |     at async retry.xbl.forceRefresh (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:144:22)
0|afk      |     at async retry (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:22:14)
0|afk      |     at async MicrosoftAuthFlow.getMinecraftJavaToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:143:7)

I know this is a catch all error but forsome reason it just instantly kicks me to this error for a specific account.

<Kashall> Oh, thats interesting. Seems to be a human error. Looks like if you just recently did a device code it just fails instantly.
rom1504bot
@rom1504bot
<extremeheat> That error means you did not sign in with the code in time
<extremeheat> The expire time in the code is conservative, it will force a failure on our side before it fails on the server side
<extremeheat> ~90% of all the auth problems are on the user side (at least when using proper oauth), there are a few edge cases but it’s just a matter of providing more detailed errors for people on what went wrong vs random request failure errors
rom1504bot
@rom1504bot
<Abulkhaiyr> Hi, can someone help me? I don't know how to make world appear on client connection. I have this code, and commented part is the part I can't figure out.

<Abulkhaiyr> `const mc = require("minecraft-protocol");
const World = require("prismarine-world")("1.16");
const Chunk = require("prismarine-chunk")("1.16");
const Anvil = require("prismarine-provider-anvil").Anvil("1.16");
const Vec3 = require("vec3");

const server = mc.createServer({
"online-mode": true,
encryption: true,
host: "localhost",
port: 25565,
version: "1.16",
});
const mcData = require("minecraft-data")(server.version);
const loginPacket = mcData.loginPacket;

function generateSimpleChunk(chunkX, chunkZ) {
const chunk = new Chunk();

for (let x = 0; x < 16; x++) {
for (let z = 0; z < 16; z++) {
chunk.setBlockType(new Vec3(x, 50, z), 2);
for (let y = 0; y < 256; y++) {
chunk.setSkyLight(new Vec3(x, y, z), 15);
}
}
}

return chunk;
}

const world = new World(generateSimpleChunk, new Anvil("./world"));

world.ch;

server.on("login", function (client) {
client.write("login", {
entityId: client.id,
isHardcore: false,
gameMode: 0,
previousGameMode: 1,
worldNames: loginPacket.worldNames,
dimensionCodec: loginPacket.dimensionCodec,
dimension: loginPacket.dimension,
worldName: "minecraft:overworld",
hashedSeed: [0, 0],
maxPlayers: server.maxPlayers,
viewDistance: 10,
reducedDebugInfo: false,
enableRespawnScreen: true,
isDebug: false,
isFlat: false,
});
// client.write("map_chunk", {
// x: 0,
// z: 0,
// groundUp: true,
// biomes: chunk.dumpBiomes !== undefined ? chunk.dumpBiomes() : undefined,
// heightmaps: {
// type: "compound",
// name: "",
// value: {}, // Client will accept fake heightmap
// },
// bitMap: chunk.getMask(),
// chunkData: chunk.dump(),
// blockEntities: [],
// });
client.write("position", {
x: 15,
y: 101,
z: 15,
yaw: 137,
pitch: 0,
flags: 0x00,
});
});`

This message was deleted

<Abulkhaiyr> ```const mc = require("minecraft-protocol");
const World = require("prismarine-world")("1.16");
const Chunk = require("prismarine-chunk")("1.16");
const Anvil = require("prismarine-provider-anvil").Anvil("1.16");
const Vec3 = require("vec3");

const server = mc.createServer({
"online-mode": true,
encryption: true,
host: "localhost",
port: 25565,
version: "1.16",
});
const mcData = require("minecraft-data")(server.version);
const loginPacket = mcData.loginPacket;

function generateSimpleChunk(chunkX, chunkZ) {
const chunk = new Chunk();

for (let x = 0; x < 16; x++) {
for (let z = 0; z < 16; z++) {
chunk.setBlockType(new Vec3(x, 50, z), 2);
for (let y = 0; y < 256; y++) {
chunk.setSkyLight(new Vec3(x, y, z), 15);
}
}
}

return chunk;
}

const world = new World(generateSimpleChunk, new Anvil("./world"));

world.ch;

server.on("login", function (client) {
client.write("login", {
entityId: client.id,
isHardcore: false,
gameMode: 0,
previousGameMode: 1,
worldNames: loginPacket.worldNames,
dimensionCodec: loginPacket.dimensionCodec,
dimension: loginPacket.dimension,
worldName: "minecraft:overworld",
hashedSeed: [0, 0],
maxPlayers: server.maxPlayers,
viewDistance: 10,
reducedDebugInfo: false,
enableRespawnScreen: true,
isDebug: false,
isFlat: false,
});
// client.write("map_chunk", {
// x: 0,
// z: 0,
// groundUp: true,
// biomes: chunk.dumpBiomes !== undefined ? chunk.dumpBiomes() : undefined,
// heightmaps: {
// type: "compound",
// name: "",
// value: {}, // Client will accept fake heightmap
// },
// bitMap: chunk.getMask(),
// chunkData: chunk.dump(),
// blockEntities: [],
// });
client.write("position", {
x: 15,
y: 101,
z: 15,
yaw: 137,
pitch: 0,
flags: 0x00,
});
});
```

<Abulkhaiyr> world.ch; is not supposed to be in there
rom1504bot
@rom1504bot
<tps> From what I can see, chunk needs to be defined in world.ch