Search Issue Tracker

Fixed in 2019.1.X

Fixed in 2017.4.X, 2018.3.X

Votes

10

Found in

2017.2.0f3

Issue ID

988573

Regression

No

OnReceivedBroadcast not called on Android/iOs devices when acting as a client

Mobile

-

Steps to reproduce:
1. Open "SimpleRepo.zip" project
2. Build for device (Android/iOS)
3. Launch the build on the phone and go to play mode in the editor
4. Set the device as the server and the editor as the client
5. Observe it working with messages being sent and received
6. Now set the Editor as the server and the device as the client
7. Observe no connection being made

Actual: The device should be able to connect as the client to the editor
Expected: Something seems to prevent the OnReceivedBroadcast event from happening

Devices Under Test:
Google Nexus 6P*, OS:7.1.2, CPU:arm64-v8a, GPU:Adreno (TM) 430, Build:google/angler/angler:7.1.2/N2G48C/4104010:user/release-keys

Google Pixel 2*, OS:8.1.0, CPU:arm64-v8a, GPU:Adreno (TM) 540, Build:google/walleye/walleye:8.1.0/OPM1.171019.013/4474084:user/release-keys

Motorola XT1032*, OS:5.1, CPU:armeabi-v7a, GPU:Adreno (TM) 305, Build:motorola/falcon_retuglb/falcon_umts:5.1/LPBS23.13-58-2/2:user/release-keys

Lge LG D802 (G2)*, OS:4.4.2, CPU:armeabi-v7a, GPU:Adreno (TM) 330, Build:lge/g2_open_com/g2:4.4.2/KOT49I.D80220h/D80220h.1413914494:user/release-keys

Reproduced on: 5.6.5p1, 2017.1.3f1, 2017.2.0f3, 2017.2.1p2, 2017.3.0p3, 2018.1.0b4

Notes: To get them to connect at all I had to disable firewall.

Comments (5)

  1. lvkae

    Apr 26, 2019 12:11

    Sorry, my previous comment was meant for another bug. Please ignore it.

  2. lvkae

    Apr 26, 2019 12:09

    Seems like it is not really a bug. Looks like this new permission was required for "Multiplayer HLAPI" package, for some reasons got installed by default in unity 2019. Removing this package solves the issue with new permission.

  3. Dreamteck

    Sep 17, 2018 09:37

    Can confirm this happening on HTC U11 and SamsungGalaxy S5 as well. Both devices are connected to the same LAN network via Wi-Fi. OnReceivedBroadcast is not called on the devices at all. If I test this with PC builds on different machines, connected to the same network, OnReceivedBroadcast is being called.

  4. JacobK

    May 21, 2018 15:37

    Yup, this is definitely an issue on the Pixel 2

  5. xman800

    Feb 12, 2018 20:20

    I have observed this issue, but only for SOME ANDROID devices -- specifically the Pixel 2 and the Moto E (second generation). I have not observed it on any iOS device, though. It is a HIGH SEVERITY issue for those devices that it affects, because it completely prevents NetworkDiscovery from working for those devices.

    It seems Unity may not be setting the CHANGE_WIFI_MULTICAST_STATE permission for Android, nor acquiring Android's MulticastLock, both of which are apparently necessary for SOME Android devices:

    https://developer.android.com/reference/android/Manifest.permission.html
    https://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.