xcode process launch failed: invalid host string: '(null)'

Discussion in 'Mac Programming' started by dede95064, Mar 23, 2014.

  1. dede95064 macrumors newbie

    Joined:
    Mar 23, 2014
    #1
    I get the above error in Xcode when it tries to run the basic Hello World program. It builds it fine but then Xcode crashes.

    I have scoured the internet for a solution. The closest was making sure my Hosts file has the following:

    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    I still have the problem though.

    Any ideas?

    Thanks!
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    Have you tried restarting your computer? I have this error pop up once a year or so it seems and it always vanishes after a restart as far as I can recall.
     
  3. dede95064 thread starter macrumors newbie

    Joined:
    Mar 23, 2014
    #3
    Yes, I have restarted it multiple times, reinstalled Xcode, flushed the dns cache, checked the other hosts files, and still nothing...
     
  4. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #4
    do you have a linefeed after fe80::1%lo0 localhost like you should, or an extra one up top? hosts can be picky about that.
     
  5. dede95064 thread starter macrumors newbie

    Joined:
    Mar 23, 2014
    #5
    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost
    //I have an empty space here.


    If by linefeed you mean an extra line of space, I only have one at the bottom.
     
  6. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #6
    Yes, that's what I meant. Your's is right, so that's not the problem.
     
  7. DennisBlah macrumors 6502

    DennisBlah

    Joined:
    Dec 5, 2013
    Location:
    The Netherlands
    #7
    Sorry for bumping up an 'older' post like this.

    But because I faced the same problem today, I just wanna post the solution.
    I'll start with my scenario why the error came up.

    I'm trying to make an 'proxy-script' inside the hosts file.
    And use my autoupdater application to copy it to /etc/

    for testing, I took my original one, and putted it on my share, and removed the original one from /etc/

    After I done this, I couldn't launch my apps anymore from within xcode.
    So... I copied back my hosts file to /etc/

    Guess what? It did not solved the issue.

    I rebooted, and done a disk permission repair on my drive, and it fixed the permissions of my hosts file :)

    Solved!

    Hopefully this will help any future coders which are facing the same issue. Since this was a top hit on google on this error.


    Code:
    process launch failed: invalid hoststring '(null)'
    Its a permission error on your /etc/hosts file!
     

Share This Page