Search Unity

CHANGE_WIFI_MULTICAST_STATE ?

Discussion in 'Android' started by GuruGurra, Apr 24, 2019.

  1. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    I updated the Unity Editor to version 2019.1.0f2 (from 2018.3.12f1).

    Now when I re-build my app (no changes, just a re-build with the new Unity version) and publish it to Google Play I get a warning about a new requested right "CHANGE_WIFI_MULTICAST_STATE".

    When investigating the AndroidManifest file, I can see that "android.permission.INTERNET" and "android.permission.CHANGE_WIFI_MULTICAST_STATE" by some reason has been added.

    Why are those rights suddenly required without me changing anything in my app? Will users have to acknowledge these rights, and if so - what happens if they deny?

    Edit: In addition, Google Play warns about a number of devices that are no longer supported by my "new" version. The reason for no longer being supported is the lack of support for "android.hardware.wifi" (?) What is this? I couldn't care less for WiFi, this is a local app that require no network access at all.

    Edit: Is this the "fix" that cause this? "Fixed in Unity 2019.1" If so - why does it require CHANGE_WIFI_MULTICAST_STATE when there's nothing in the app that use WiFi?

    https://issuetracker.unity3d.com/is...oid-slash-ios-devices-when-acting-as-a-client
     
    Last edited: Apr 25, 2019
  2. cdnDave

    cdnDave

    Joined:
    Mar 13, 2013
    Posts:
    5
    I've experienced the same thing and am also curious about why this permission is required all of a sudden
     
    Last edited: Apr 25, 2019
  3. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167
    The code says that the permission is being added when:
    - UnityEngine.Networking.NetworkTransport::SetMulticastLock method is used
    - or UnityEngine.Networking.NetworkDiscovery type is used.

    I'm not sure why the latter was added. Please submit a bug report, attach a project and report the case # here.
     
  4. lvkae

    lvkae

    Joined:
    Mar 20, 2014
    Posts:
    8
    Hello guys,

    If you still having this issue. I had the same on my side, but after some investigation, I found that Unity 2019 has "Multiplayer HLAPI" package installed by default. I've removed it and additional permission has gone.

    Hope it helps.
     
    _geo__, p0w1nd, piotrjun and 25 others like this.
  5. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    Perfect! Thank you :)

    I removed that package and it solved the problem.
     
  6. cdnDave

    cdnDave

    Joined:
    Mar 13, 2013
    Posts:
    5
    That was my issue as well, thanks!
     
  7. roshan090

    roshan090

    Joined:
    Mar 20, 2018
    Posts:
    35
    you just saved me :) thanks
     
  8. chriscode

    chriscode

    Joined:
    Mar 2, 2015
    Posts:
    49
    Same issue here. Fixed by removing package. Thanks
     
  9. Knub

    Knub

    Joined:
    Feb 8, 2017
    Posts:
    2
    Thanks!
     
  10. Develoop

    Develoop

    Joined:
    Dec 22, 2013
    Posts:
    11
    Unfortunately the solution by removing "Multiplayer HLAPI" package doesn't worked for me. I'm with Unity 2019.1.6 and If I found fix I will write again...
     
  11. Develoop

    Develoop

    Joined:
    Dec 22, 2013
    Posts:
    11
    If there is anybody who removed the package "Multiplayer HLAPI" and the permissions are still in the build, should try this:

    Go to your Android.manifest and add:
    <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/>
    <uses-permission android:name="android.permission.BROADCAST_STICKY" tools:node="remove"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" tools:node="remove"/>


    don't forget to add xmlns:tools="http://schemas.android.com/tools" to your xml schema. That's completely worked for me :):):)
     
  12. tuncturel

    tuncturel

    Joined:
    Jul 20, 2012
    Posts:
    47
    So what's the latest news regarding this creeping permission? My cloud builds are useless due to this problem. Could we get an official response regarding when they will fix this and how?
     
  13. eylulatilgan

    eylulatilgan

    Joined:
    Jun 7, 2013
    Posts:
    12
  14. Nieles_GH

    Nieles_GH

    Joined:
    Jun 26, 2017
    Posts:
    57
    I'm having the same issue. I removed the Multiplayer package but builds are still having the CHANGE_WIFI_MULTICAST_STATE permission. At least from Unity Cloud Builds they do.
     
  15. KVinS

    KVinS

    Joined:
    Aug 27, 2013
    Posts:
    21
    Umm. Which package do you remove from? I can not understand (
     
  16. tuncturel

    tuncturel

    Joined:
    Jul 20, 2012
    Posts:
    47
    Go to Unity. Look at your Project window where you see all the files that belong to your project. Navigate to packages and find multiplayer hlapi. Right click, open file location. Delete it. Build again.
     
  17. Morwin25

    Morwin25

    Joined:
    Oct 20, 2016
    Posts:
    4
    Fixed, Thank you!
     
  18. unity_Go3u1hR8zbkCuw

    unity_Go3u1hR8zbkCuw

    Joined:
    Nov 26, 2019
    Posts:
    3
    o brother thank you. You saved me from QA team. I have no words to thank you. you are legend, The Guru of Unity. Unity should hire you instead of Yury-Habets. ;)
     
  19. matheus_inmotionvr

    matheus_inmotionvr

    Joined:
    Oct 3, 2018
    Posts:
    63
    Any news on this? I need the Multiplayer HLAPI but I don't use any of the API calls that add the permission request according to the documentation:
    - NetworkDiscovery
    - NetworkTransport.SetMulticastLock

    Edit: I've filed a bug report, case ID 1216963. I'm running Unity 2019.2.15f1
     
    Last edited: Feb 4, 2020
  20. cradiff

    cradiff

    Joined:
    Feb 7, 2015
    Posts:
    66
    Remove from <Project>/Packages/manifest.json and restart unity. It will not showing in Project/Packages
     
    Tymianek likes this.
  21. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,336
    Still happens in Unity 2019.4.35f1 LTS.
    Can confirm that the solution is to remove the "Multiplayer HLAPI" package.
     
  22. matheus_inmotionvr

    matheus_inmotionvr

    Joined:
    Oct 3, 2018
    Posts:
    63
    I filed a bug report on that and here's what I've been told:

    So if there are any calls to a function that's part of the package's API are made, the permission will be added, even if that function doesn't require that permission.
     
    _geo__ likes this.
  23. Yasiranwaar

    Yasiranwaar

    Joined:
    Oct 30, 2017
    Posts:
    1
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" tools:node="remove" />

    Add in Manifest File