parallaxinc / BlocklyPropClient

Client to provide access to the propeller for loading binaries and serial terminal
9 stars 7 forks source link

Client launch fails on Mac - gethostbyname() failed. #29

Closed zfi closed 7 years ago

zfi commented 7 years ago

The BlocklyPropClient fails immediately upon launch and does not report any error condition. Launching from the command line produces this output.

Traceback (most recent call last):
  File "<string>", line 205, in <module>
  File "<string>", line 50, in __init__
  File "<string>", line 107, in initialize
  File "/Users/michel/Documents/Development/blocklyprop/BlocklyPropClient/ip.py", line 16, in get_lan_ip
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
BlocklyPropClient returned -1
zfi commented 7 years ago

The code referenced in the error is this:

ip = socket.gethostbyname(socket.gethostname())

The code is trying to obtain the IP address of the client machine. Hostname resolves correctly. a nslookup command returns a 'can't find hostname - NXDOMAIN'. Adding an A record in DNS for this host allows the client to launch successfully.

PropGit commented 7 years ago

@zfi - From what we've seen in tests, can we say with certainty that this issues is now resolved?

PropGit commented 7 years ago

@zfi - on a related note, if your answer is "yes" to the above, can we push out the updated Win/Mac builds of BPClient to solve this problem on Macs that are experiencing it? We have a known classroom that is stunted by this item.

Remember, the Mac build needs to either be wrapped in a .dmg file (and named exactly as the current Production and Demo systems expect it) or the Production and Demo systems need be updated to support the new link to the .pkg file.

zfi commented 7 years ago

The new code does correctly detect and accommodate the failed DNS lookup. Fixed in 0.5.1. Building the client is separate issue.

PropGit commented 7 years ago

This has been confirmed through a customer. @zfi - I think this issue can be closed.