Search Unity

Unable to connect profiler to Surface RT. "Socket: connect failed"

Discussion in 'Windows' started by GarthSmith, Apr 1, 2014.

  1. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Anyone else have problems connecting the Profiler to a Surface RT? I'm hoping someone can point me in the right direction so I don't have to become a Windows RT Admin just to connect the Profiler.

    The Surface RT comes pretty locked down. Pings didn't work by default. I thought I disabled the firewall in "Windows Firewall with Advanced Security" but I'm not sure. It is much different than the normal Windows Firewall I'm familiar with. I can now ping the Surface RT. I cannot telnet into it however, so I suspect that I haven't disabled the firewall properly.

    Each time I attempt, I get this in the Unity console. The port number changes.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Make sure to enable internet capability in application manifest.
     
    Influnza likes this.
  3. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
    Thank you! Got it to work.

    For anyone else with this problem.

    Under Package.appxmanifest -> Capabilities, I had "Internet (Client)" and "Private Networks (Client Server)" checked. Adding a third check mark for "Internet (Client Server)" allowed the profiler to connect. Success!

    In Unity, this setting is found under File -> Build Settings -> Player Settings -> Settings for Windows Store Apps -> Publish Settings -> Capabilities -> "InternetClientServer".
     
    Last edited: Apr 1, 2014
    Influnza likes this.
  4. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    For me the issue was that the port was blocked in my firewall (on the dev PC).
    All three network capabilities enabled + firewall disabled did the trick on Xbox Series X :)
     
  5. Ginny69

    Ginny69

    Joined:
    May 8, 2018
    Posts:
    3
    I see your post is not historical as the others. How were u able to enable those capabilities in present time?

    (I am using Unity 2019.4.8f1 and there is no Capability list under Publish Settings any more (sadly it also is not anywhere else))
     
  6. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    It's in player settings for UWP:
    https://docs.unity3d.com/Manual/class-PlayerSettingsWSA.html

    That's where it's always been.
     
  7. Ginny69

    Ginny69

    Joined:
    May 8, 2018
    Posts:
    3
    - oh, i missed the fact that it is for UWP (since I was looking fow Android specific problems), thanks for clearing that up for me!

    - if I may have another question: is there something similar for the Android platform? My original problem is that I am experiencing FPS drop after the game is installed on Android device (it is very simple game, running about 300 FPS in the editor). But if I run the profiler in editor, it does not tell me much - scripts, rendering and all this does not take more then cca 5-12 ms. So I would like to build && run the game on the device while the device is connected to the profiler.

    Thats where I have the issue (can not connect to player IP, closed socket, etc.). All i was able to find about it were advices related to "Enable Private Networks Capability" or "Enable Internet (Client & Server) Capability". And thats where I am lost since Capabilities list is not present in publish settings for Android platform. (Or am I doing something wrong?)
     
  8. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,452
    Hi @Ginny69,
    I guess this is getting somewhat off topic but anyways:
    Android doesn't need any capabilities for profiling. Just make a development build, have the phone in the same LAN/Wifi as your desktop machine, try disabling mobile data, and see if that works. The profiler documentation has further hints on how to establish that connection. Also, try updating to 2019.4.18f1 and keep an eye out for newer 19.4 releases. We're still landing and backporting fixes that should make establishing the connection easier and more reliable.
     
  9. Ginny69

    Ginny69

    Joined:
    May 8, 2018
    Posts:
    3
    Well, the only way I was able to run the profiler on my Android device: (I did have same wifi etc) make a build && run development build -> that always fails on the first try (unable to connect to player IP ..) -> but if I just quit the App on mobile (device stays connected to PC) and build && run the development build again, it does not throw any error -> I am able to manually switch to Android device in profiler which then starts collecting data

    This step by step worked for me several times. I am not sure why it behaves like this (I might be doing something wrong), but I guess I am ok with it for now. Thanks for the advice anyway!
     
    MartinTilo likes this.