Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
What42Pizza's avatar
What42Pizza
Honored Guest
1 year ago

(Solved) Unable to do any networking, gives "Access Denied"

Update: I've solved this by using a different vr template (https://github.com/Resistance-Studio/UnityVRTemplate)

My end goal is just to get my project working, but I can't even get networking to work on an empty vr project. I can create connections just fine when I'm running in the editor or running on the headset through the editor, but a soon as I try to build to an apk and load that onto the headset, I get "Access Denied" no matter what I do.

The code I'm testing:

 

 

public class UnityThread : MonoBehaviour {
	void Start() {
		Debug.Log("A");
		Socket testSocket = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
		Debug.Log("B");
	}
	void Update() {}
}

 

 

 

Everything I've tried so far:

  • UdpClient testClient = new EdpClient(12345);
  • Socket testSocket = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
  • Permission.HasUserAuthorizedPermission();
  • Permission.RequestUserPermission();
  • creating an empty vr template project
  • using AARs to add data to android:networkSecurityConfig
  • exporting as a development build
  • adding a custom keystore

1 Reply

Replies have been turned off for this discussion
  • Similar situation here. Trying to use netcode for gameobjects and all I get in the headset debug console is:
    SocketException: Access Denied.

    What toggle/feature/android build settings/unity settings am I missing?