Update: after updating my system to 1.20.10, I was able to utilize module version 1.4.0-beta and the system.run(() => {} syntax. I think this probably didn't work right in the 1.20.0 client, but it appears to be fine now.
Thanks @PFiS1737 for the link and info. It makes sense...but I cannot get it to work. Even the example on the Bedrock Wiki doesn't seem to work in my creative testing world. Does this only work with the beta Minecraft version (i.e. 1.20.10.21) and module 1.4.0-beta rather than the stable release (1.20.0.01) and module 1.3.0-beta? I'm running 1.20.0.01, and module version 1.4.0-beta appears to be invalid there; I can only use 1.3.0-beta.
When I wrap my function in a system.run(() => {}, it simply doesn't fire. Everything up until that (i.e. event.cancel = true; ) works. I'm thinking this is a 1.4.0-beta vs 1.3.0-beta thing.
@Benjamin Fox - they most likely had Xbox Live Gold or GamePass. It works if you have those, even though it's non intuitive that a LAN game needs something designed for online play. However, I believe this is by design, based on the language Microsoft uses when talking about multiplayer.
Doesn't mean I agree with how it works, though.
I'm able to recreate these seemingly at will if I log into my Bedrock Dedicated Server on my flat skyblock world using mcpelauncher (https://flathub.org/apps/details/io.mrarm.mcpelauncher) via Linux, go to the Nether, then fall into the lava. Appears to happen every time. Doing the same workflow when logged into the same server via Android does not exhibit the same behavior, hence my original thought that this was an issue with mcpelauncher, rather than a Minecraft-specific issue. Sounds like that might reflect others' experience as well?
Loaded 1.17.41 onto the XBox and tested out a world that was affected by this. I didn't stick in there long, but I was able to do far more than I was able to previously. So, initially at least, it appears to be resolved.
I believe this is the same issue in MCPE-143156
Well, I had a workaround - using My Files Explorer on the Xbox, navigating to the Minecraft worlds, copying it to a USB drive, then using Amulet editor on a PC to copy the world to a new, blank (cleared) copy of the world, then copying it back to the Xbox. It worked great, though I'd have to repeat the steps every couple of days.
Sadly, the latest Xbox update completely broke My Files Explorer. It can see neither USB drive, nor the com.mojang folder on the Xbox. Thanks Microsoft!
So, to echo my fellow sufferers...any progress? Anything we can provide to help isolate the issue? Any workarounds? Anything at all?
Notably, the memory leak/spike seems to get worse over time... the more times I load the world, the bigger the memory spike and the longer it takes to load.
I saw this in my testing yesterday; 21MB world using BDS took more memory each load, eventually consuming 28GB.
Additional comment - on the XBox, I'm seeing invalid chunks as a result of this behavior, which exacerbates the problem the next time you try and open the world.
Similar issue here with a relatively small Skyblock map (this map: https://mcpedl.com/classic-skyblock-plus/. I'm running a few versions of this in different environments (Xbox, Android, BDS), and I'm seeing this same issue.
One version I'm running on Bedrock Dedicated Server on Linux, and you can watch the memory usage in htop spike as you load the map, then spike again when someone connects. And by "spike" I mean a 21MB map takes up 2.5GB of RAM to start, spiking up to 4-6GB when someone joins. After that user logs off (or you restart the server) BDS takes forever to start as it's consuming all the memory on the box. Usually the OOM kill (out of memory killer process on Linux) will kill BDS after it's consumed all the memory and all the swap space.
I believe this memory leak is happening on the other platforms, but I don't have the tools to monitor it, especially on the Xbox. If those systems have an OOM killer (Android does at least), then you'll see Minecraft just die immediately, due to the corrupt world eating all the available memory and swap.
I have a similar issue on Xbox One S. It only happens with one world, a Skyblock world. As soon as the autosave completes, or if you select "Save & Exit", Minecraft crashes.
I have this same issue. I've tried on WiFI and cellular (to be sure my gateway/router device wasn't blocking), with the same results.
However I did find a workaround. Setting your storage location (Settings > Profile) to 'Application' allows it to work. Previously I had it set to 'External.'
I think I found a workaround, at least in 1.17.11. If you rename the .mcpack file to .zip and then unzip it into your resource_packs folder, it works.
Probably same issue as BDS-1634, which was filed against the Bedrock Dedicated Server. But I think it makes more sense to log it against MCPE, as this is probably a "client" issue, rather than a "server" issue.
Hi just re-visited this issue by starting from scratch. Note that I do not have XBL. I downloaded the latest BDS (1.16.201.02) and set it up, in it's default state, on my Ubuntu 18.04 system. Same issue as initially described – on the Xbox the "friends" tab shows "1" in the tab, but no servers are listed.
I then fired up a Windows 10 system and did the same test. Same result.
I did some more testing; part of my firewall config is to not allow UPnP, which I know the Xbox prefers to have. So I was thinking perhaps this was causing some issues with detecting friends (and BDS). To that end, I enabled it on my firewall, and I instructed the Xbox to re-test my NAT configuration. I could see it accessing UPnP via the logs, and the Xbox correctly identified my NAT type as 'open.'
Unfortunately, it did not make a difference. The situation remains.
I don't have Xbox Live subscription beyond the free one, so I can't comment on if it's really a requirement. Adrian indicated that it was such, but I'm unable to verify, and unwilling to sign up for a subscription just to find out.
All I can say for sure is that on my Xbox, when my BDS is running it shows that I have 1 friend online, but when you go to that tab, the BDS is not listed.
I'm beginning to wonder if this isn't BDS related specifically, though. Yesterday, while testing, I loaded up a bit of software called phantom (https://github.com/jhead/phantom), which essentially is a proxy server that makes remote Minecraft servers appear as local LAN servers. By using this with an external server (not BDS), it acted the same way - namely, showed that I had 1 friend online, but did not show the server in the list.
Unfortunately, I'm at a loss as to what the issue is. Both my BDS and my Xbox are on the same LAN. All firewalls on the LAN are disabled. The only firewalling I have is on my WAN connection to the outside world, though I do have that fairly restrictive (but I've had it that way forever, even when it was working).
Does the Xbox need to "call home" over the internet to validate something, and perhaps I'm blocking it? Does the BDS need to "call home" for any reason, and I might be blocking? I really don't know at this point, but I'd love any insight. My gut feeling - and 20+ years in IT - tell me this is maybe something network related.
Can someone officially comment on whether or not an XBox Live subscription is now required for XBox to be able to join a Bedrock Dedicated Server instance, even on the same LAN?
@Adrian Lonsdale
I concur, having an Xbox Live subscription is not mentioned as a requirement, ergo the requirement that it have one to function is indeed a bug. The closest things I can find are in the server.properties file (online-mode=true), and the whitelist.json file needs the Xbox Live gamertag. However, at least for "online-mode=true", in the past that has not required an Xbox Live subscription, merely being logged in on the Xbox.
My hunch is this has to do with the whitelisting features. However, even when a whitelist is not used, the problem persists.
I also see this issue - when you restart BDS, keepInventory is toggled to false, even if no configuration changes are made. This is...inconvenient, to say the least, and a breaking change from previous behavior (where gamerules were kept between server restarts, even in hard mode).