Search Unity

Unity's version control component has been upgraded to Plastic SCM.

[Solved] Localhost Unavailable

Discussion in 'Unity Collaborate' started by k3ndro, Sep 27, 2017.

  1. k3ndro

    k3ndro

    Joined:
    Dec 8, 2016
    Posts:
    28
    I keep getting this after upgrading to Unity 2017.1.1

    I already did right clicking tab and hit reload.
    I made sure Unity is allowed in firewall and restarted the project.
    I also tried turning off my firewall and restarted the project.

    It says: Collaborate was unable to establish a connection to Unity. Please ensure you are able to visit http://127.0.0.1:38000 in your browser and reopen the project.

    I tried visiting the site and says "invalid url".

    Seems to not working. Help please?
     

    Attached Files:

  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @k3ndro! I'm sorry you're running into this issue. "Invalid URL" is actually a valid result if the Collab Toolbar is already using that port. But the error message is indicating that you can't reach your localhost, which is odd. Do you know if you've edited your hosts file recently? You can take a look at it using the instructions here.

    I noticed in your Toolbar's image that it's asking you to try to reach 38001, instead of the default 38000. That's totally fine, since it's meant to increment itself if that port is used by another application. I just want to confirm if you tried to access the same URL in your browser. Can you also try to access http://localhost:38000/unity/service/collab/localChanges (using either 38000 or 38001 depending on which one the Collab Toolbar is asking you to check) to see if it returns anything?
     
  3. k3ndro

    k3ndro

    Joined:
    Dec 8, 2016
    Posts:
    28
    Hi @ryanc-unity, thanks for your reply. I don't remember editing my host file.

    Code (CSharp):
    1. # Copyright (c) 1993-2009 Microsoft Corp.
    2. #
    3. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    4. #
    5. # This file contains the mappings of IP addresses to host names. Each
    6. # entry should be kept on an individual line. The IP address should
    7. # be placed in the first column followed by the corresponding host name.
    8. # The IP address and the host name should be separated by at least one
    9. # space.
    10. #
    11. # Additionally, comments (such as these) may be inserted on individual
    12. # lines or following the machine name denoted by a '#' symbol.
    13. #
    14. # For example:
    15. #
    16. #      102.54.94.97     rhino.acme.com          # source server
    17. #       38.25.63.10     x.acme.com              # x client host
    18.  
    19. # localhost name resolution is handled within DNS itself.
    20. #    127.0.0.1       localhost
    21. #    ::1             localhost
    22.  
    This shows up for http://localhost:38000/unity/service/collab/localChanges . right now, it is asking for 38000.
    Code (CSharp):
    1. {"changes":[{"path":"Assets/_Scenes/Main.unity","state":17,"revertableState":5,"relatedTo":"","isRevertable":true,"isMeta":false,"isConflict":false,"isFolderMeta":false,"localStatus":"modified","remoteStatus":"","resolveStatus":""}],"filter":false}
    also, will running multiple unity projects affect this?
     
    Last edited: Sep 28, 2017
  4. k3ndro

    k3ndro

    Joined:
    Dec 8, 2016
    Posts:
    28
    hi again @ryanc-unity, i noticed that restarting my computer fixes this issue. i leave my computer on sleep mode most of the time and barely shuts it down. i've had 3 successful attempts to fix the issue now by restarting. does this make sense? i also am not having this issue back when i was still on 5.6.2..

    hope there are other fixes or else i'll keep on restarting my computer just because of this.

    thanks
     
  5. k3ndro

    k3ndro

    Joined:
    Dec 8, 2016
    Posts:
    28
    nevermind. the problem still keeps coming back after restarts.
     
  6. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    It sounds like you might have an app that's interfering with Collab's connection. Your connection works fine after you restart. Are you opening any other apps (or are any opening in the background) before you open Unity and notice the localhost issue? Normally, Collab would work around another app using the port it typically uses, but for some reason it doesn't seem to be doing that.
     
  7. malimondota

    malimondota

    Joined:
    Sep 30, 2017
    Posts:
    1
    i have the same problem here gg.png
     
  8. nciofi

    nciofi

    Joined:
    Nov 3, 2014
    Posts:
    8
    I'm running on the same problem. I got the "Invalid URL" when accessed 127.0.0.1:38000 and got a JSON response from that link http://localhost:38000/unity/service/collab/localChanges. And Collab still shows the error.
    But I did some steps that worked around here, thou the problem is not solved.
    1 - close unity
    2 - reopen unity and choose another project.
    3 - now collab works, then close unity again.
    4 - reopen unity with the project you really want and collab is working again.
    If in any time, I close and try to reopen the same project, the collab stops working, requiring me to go through all those steps again. The problem happens even after reboot. Open a different project has worked so far.
     
  9. k3ndro

    k3ndro

    Joined:
    Dec 8, 2016
    Posts:
    28
    the only major change i remember doing was allowing all my unity apps in firewall (i had 3 off them). but it didn't fix right away. after a couple of days now, i'm not having that problem anymore. very weird...

    so yeah, im not seeing the local host problem now for the last couple days..
     
  10. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Thanks for your update @k3ndro! @aeondonovan and @malimondota, please check to see if your firewalls are blocking any of the following domains:
    *.unity3d.com
    *.cloud.unity3d.com
    *.*.amazonaws.com
    *.pubnub.com

    You may need to flush your DNS cache for Unity to retry a new connection to these domains. You can find the steps on how to do that here. Then reopen Unity and see if you're still experiencing issues using the Collab Toolbar.
     
  11. bkrabach

    bkrabach

    Joined:
    Aug 30, 2014
    Posts:
    1
    I ran into this error today and this is the only post I saw via a search that referred to this error, so I'm leaving my fix here for anyone else who may need it in the future.

    After trying everything above, I still could not get the collab panel to load properly. I also noticed that it took about 12-15 seconds to load the url's listed above (the localhost/127.0.0.1 ones). I had recently experienced a similar problem loading package manager and it was resolved by adding a process exclusion to Windows Defender, so I gave that a shot here and now the url's load near-instantly and the panel works correctly within Unity again.

    Steps:
    • Launch "Windows Defender Security Center" (type it into the Cortana search bar)
    • Click "Virus & threat protection"
    • Click "Virus & threat protection settings"
    • Scroll down to "Exclusions" and click "Add or remove exclusions"
    • Click "Add an exclusion"
    • Choose "Process" from list of exclusion types
    • Enter "unity.exe" to the text input and click "Add"
    • Try the collab panel in unity again
     
    Ryan-Unity likes this.
  12. esteban16108

    esteban16108

    Joined:
    Jan 23, 2014
    Posts:
    159
    I stumbled into this and found out that the problem is having 2 or more instance at the same time, closed all the instances and then started the one I needed to work with Collad and that fixed the Issue.
     
  13. samuelmorais

    samuelmorais

    Joined:
    Aug 3, 2012
    Posts:
    62
    In my case, the problem occurred when I was uploading the project to BitBucket at the same time the Unity editor was open.
    After I finish the "git push" command and closed the Terminal, the problem did not happen anymore.