-
-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
placeBlock promise chain #2629
Comments
Show the error |
Sorry, forgot.
|
Try it with just the try catch block and await |
I tried it, same problem. Edited the first comment with the code. |
I have the same error still with Mineflayer 4.5.1 :(
|
This should be fixed with this merge request https://github.com/PrismarineJS/mineflayer/pull/2833/files |
@IceTank - thank you for letting us know. I also run a program with |
This sounds like the node process is not keeping up with event handling. No one really tests mineflayer's performance when you have lots off entities or block updates. You can try debugging the issue with https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients . Chromium based browsers can also record a process to list off functions that take up a lot off processing time. If you find a function that takes up to much time you can make an issue or a pull reuqest to fix it in mineflayer. There are definitely ways to improves mineflayers performance. |
any updates on this? |
Maybe this one could help (at least to reproduce) |
Versions
Detailed description of a problem
placeBlock sometimes break out of the promise chain and because of that, no catches and crashes when errors happens.
Seens to be related to when the block the bot is trying to place is out of reach, and times out after the attempt.
EDIT
What did you try yet?
Using .then(onfulfilled, onrejected)
Using .then().catch()
Using try catch with async
Ended up settings unhandled exceptions to warn.
Your current code
Expected behavior
Catch errors when place block fails somehow
The text was updated successfully, but these errors were encountered: