mojira.dev
MC-101244

Can't scan for LAN worlds on macOS

For whatever reason, Minecraft on macOS can't scan for LAN worlds because of an error: "Unable to start LAN server detection"

[18:13:53] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[18:13:54] [Render thread/INFO]: Setting user: CatObsession
[18:13:55] [Render thread/INFO]: Backend library: LWJGL version 3.2.1 build 12
[18:14:00] [Render thread/INFO]: Reloading ResourceManager: Default
[18:14:16] [Render thread/INFO]: OpenAL initialized.
[18:14:16] [Render thread/INFO]: Sound engine started
[18:14:18] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas
[18:14:18] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[18:14:18] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[18:14:18] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[18:14:18] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[18:14:18] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[18:14:18] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[18:14:22] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[18:14:22] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[18:14:22] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[18:14:34] [Render thread/WARN]: Unable to start LAN server detection: Can't assign requested address
[18:20:31] [Render thread/INFO]: Stopping!

Workaround
Find your internal IP address (Windows, macOS) on the computer hosting the world, then on the other computer(s) go to the Multiplayer screen in Minecraft and click Direct Connect. Then on the hosts computer start the LAN world and take note of the message that says "LAN world hosted on Port xxxx". Then, on the other computer, in the Direct Connect field, put the internal IP address of the host computer followed by a colon ( : ) and then the number in the "LAN World hosted on Port xxxx" so for example 0.0.0.0:123456. You should now be able to connect.

Linked issues

Attachments

Comments 22

Affects 1.11

I was able to resolve this on my Mac (in 1.11) by forcing the JVM to use IPv4 by adding

-Djava.net.preferIPv4Stack=true

to the JVM arguments field in my profile.

This is driving me nuts! I have researched for days. Changed the java settings on the launcher window per a recommendation. Can we PLEASE FIX THIS??? Thank you.

Thank you. After the edit, this is what happens:
Unrecognized VM option 'Djava.net.preferIPv4Stack=true:-UseAdaptiveSizePolicy'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I have spent so very long looking for answers for this!

This is still happening in 1.12.

Could you please fix this in code so we don't need to disable ipv6, or at the very least include the parameter mentioned by Andy Molloy above to the launcher defaults.

12 more comments

This issue is still happening for me but I am not sure if it is the same. 

So I want to join a LAN world and the person who has the LAN world is on a Macbook as am I. But no matter what I have done I cannot seem to join it. The world just will not show up and I have tried to change the current IPv6 to IPv4 but I am not sure how and when I try to type -Djava.net.preferIPv4Stack=true into JVM arguments it doesn't work. I have looked for how to enable JVM arguments but I can't find it. When I search the internet for answers anything remotely close to what I need is very outdated and unhelpful. This is the best thing I have found yet no resolution has been given.

Did you try the workaround that I outlined in the bug's description?

Not sure if this has been the experience for everyone, but this problem appears to be resolved for me as of 21w19a. Possibly related to Java 16?

Can someone still reproduce this issue in the latest development version?

[Mod] markderickson

I can confirm that this has been fixed in 21w19a. 🙂

J Whiklo

Southpaw1496

(Unassigned)

Community Consensus

Important

Networking

LAN, macOS, network

Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 1.11, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.13.1, ..., 20w51a, 21w05b, 21w07a, 21w08b, 21w16a

21w19a

Retrieved