Add FAQ entry and replit warning on client ping error (#415)

This commit is contained in:
extremeheat 2023-06-17 23:04:23 -04:00 committed by GitHub
commit d31b2b2aec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -20,6 +20,18 @@ Get-AppxPackage -AllUsers | Where Name -Match ".*Minecraft.*" | Select Name,Inst
Use the PackageFullName field in place of the `Microsoft.MinecraftUWP_8wekyb3d8bbwe` for the command above.
## Replit
Replit may [not support](https://github.com/PrismarineJS/bedrock-protocol/issues/363) the necessary outbound UDP connections required to connect to a Minecraft server. For further assistance using Replit, please contact Replit support or consider using an alternative hosting service if hosting locally is not possible.
Some alternatives:
* [Gitpod](https://www.gitpod.io/)
* Gitpod is a cloud development environment for teams to efficiently and securely develop software, right from your browser.
* [Github Codespaces](https://github.com/features/codespaces)
* A Codespace is a developer environment like Gitpod that's hosted in the cloud, accessed in your browser.
* [Google Colab](https://colab.research.google.com/)
* Google Colab is a Jupyter notebook environment. Jupyter notebook offer a Python environment where you can write, explain, visualize and execute code straight from a web-based developer environment. For more information on using Colab for JavaScript projects, see [Mineflayer on Google Colab](https://colab.research.google.com/github/PrismarineJS/mineflayer/blob/master/docs/mineflayer.ipynb).
## Kicked during login
NOTE: If you not receiving any errors, the error probably logged in debug mode which is not enabled. To enable it, set `process.env.DEBUG = 'minecraft-protocol'` to the top of the file

View file

@ -68,7 +68,12 @@ class RakNativeClient extends EventEmitter {
done(ret.extra.toString())
}
})
}, timeout, () => { throw new RakTimeout('Ping timed out') })
}, timeout, () => {
if ('REPLIT_ENVIRONMENT' in process.env) {
console.warn('A Replit environment was detected. Replit may not support the necessary outbound UDP connections required to connect to a Minecraft server. Please see https://github.com/PrismarineJS/bedrock-protocol/blob/master/docs/FAQ.md for more information.')
}
throw new RakTimeout('Ping timed out')
})
}
connect () {