3

I am working on an iOS app that connects to a web service. For development and testing, we use Bonjour to find servers on the local network, and during sign-in the app offers to connect to one of them instead of the production site.

Since upgrading to El Capitan, I am unable to connect from the Simulator to a web server running on the same Mac. I am able to reproduce this issue using Simulated Mobile Safari and the web server that comes with the stock Python in OS X.

  1. Open Terminal, start a web server: python -m SimpleHTTPServer 8000
  2. Open Safari inside the Simulator, enter URL: http://my-computer-name.local.:8000/

Simulated Mobile Safari displays "Safari cannot open the page because it could not connect to the server."

Additionally, the following message appears in the Console each time I try to load the URL:

assertiond[____]: assertion failed: 15A284 13A340: assertiond + 13207 [28CC4371-F3F9-3578-9436-310B23A2C638]: 0x1  

Other possibly relevant facts:

  • Desktop Safari is able to connect using the URL http://my-computer-name.local.:8000/
  • Real Mobile Safari (on an iOS device on the same network) is able to connect using the URL http://my-computer-name.local.:8000/
  • Simulated Mobile Safari is able to connect using the URL http://127.0.0.1:8000/ (I need it to work with the Bonjour provided hostname, though).
  • Simulated Mobile Safari is able to connect to another machine with an URL like http://other-computer.local.:8000/
  • I'm using Simulator Version 9.0 (SimulatorApp-620 CoreSimulator-179)
  • OS X El Capitan 10.11 (15A284)
  • Amusingly, searching the web for the UUID 28CC4371-F3F9-3578-9436-310B23A2C638 yields only a handful of job posts. (You can make $15 for fixing this bug!)
  • This does not appear to be related to App Transport Security. My app behaves this way when ATS is disabled.

Are you able to reproduce this problem? Am I missing something?

benzado
  • 82,288
  • 22
  • 110
  • 138
  • 1
    I'm on OSX 10.10.5 and using Xcode 7.0 (7A218) which has pending updates I have not yet installed. On Simulator 9.0 (SimulatorApp-620 CoreSimulator-179) the first try failed, but that may be a red herring. I removed the dot trailing the "local" and it works. I tried it with the dot back in place and it works. My python is 2.7.10 – Fran K. Oct 06 '15 at 21:30
  • @FranK. Hmm, yeah, El Capitan seems to be the problem. Also, your Python version is TMI. :-) – benzado Oct 06 '15 at 21:54
  • Well, you never know! – Fran K. Oct 07 '15 at 03:18

1 Answers1

4

I worked the issue around by adding an entry to the local OSX /etc/hosts file:

Append your FQDN after "localhost":

127.0.0.1 localhost mymachine.mydomain.local

Bertl
  • 605
  • 5
  • 10