Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26462] iOS: Build throws unhelpful error when connecting to log server if localhost does not resolve

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-10-18T13:11:51.000+0000
Affected Version/sRelease 7.4.0, Release 7.3.1
Fix Version/sRelease 7.5.0
ComponentsCLI, iOS
Labelsn/a
ReporterSimon Buckingham
AssigneeEwan Harris
Created2018-10-16T13:11:07.000+0000
Updated2018-11-13T13:19:02.000+0000

Description

I sometimes have to change my internet provider as I have two and sometimes one goes down. Typically this is changing from Virgin ethernet to Talk Talk wi-fi. Obviously the IP address of my machine changes. When I try and compile after the change with: $appc ti build -p ios --target simulator ... I can't because of the error: [ERROR] Another process is currently bound to port 46032 [ERROR] Set a unique between 1024 and 65535 in the section of the tiapp.xml I have no idea what to set the value to. One shouldn't have to do this anyway. This is only a relatively recent problem as it didn't used to happen (not sure at which version it changed). I have tried restarting the simulator, my terminal (quitting processes) and restarting my computer.

Comments

  1. Ewan Harris 2018-10-16

    [~icecandyent], thanks for the report. I think it's possible this is similar to TIMOB-25872, where localhost is not resolving as expected. I've seen UK ISPs do similar behaviour before (BT was sniping localhost, and .int domains for me) Does this only cause issues for you on one ISP? Could you check your /etc/hosts file, there should be some entries like below mapping localhost. If they don't exist could you try adding them and seeing if the issue still occurs?
       127.0.0.1	localhost
       ::1             localhost
       
  2. Simon Buckingham 2018-10-17

    Ewan Harris. Thanks for such a prompt reply. Yes there was a load of gunk in my /etc/hosts file. Been doing a lot of local web development. Setting the localhost values you suggest seems to work. Thanks a bunch.
  3. Ewan Harris 2018-10-18

    Awesome, glad it works. I'll move this ticket over to TIMOB, we really should be erroring with information that can guide you how to fix this issue here.
  4. Ewan Harris 2018-10-18

    https://github.com/appcelerator/titanium_mobile/pull/10384
  5. Christopher Williams 2018-10-18

    Updated verbiage is merged to master for eventual 7.5.0 release.
  6. Samir Mohammed 2018-10-19

    *Closing ticket* Verified fix in SDK Version 7.5.0.v20181018133006. *FR Passed (Test steps):*

    Edited the /etc/hosts file (removed localhost mapping)

    Built a Titanium application to an iOS simulator

    Able to see a more helpful error message

       [ERROR] Unable to connect to log server on localhost
       [ERROR] Please ensure your /etc/hosts file contains a valid entry for localhost
       
    *Test Environment*
       APPC Studio: 5.1.0.201808080937
       iPhone 7 plus Sim (iOS 12)
       APPC CLI: 7.0.7-master.4
       Operating System Name: Mac OS Mojave
       Operating System Version: 10.14
       Node.js Version: 8.9.1
       Xcode 10.0
       

JSON Source