Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Handling ssid scanning exception #34

Closed
clburlison opened this issue Mar 5, 2018 · 3 comments
Closed

Handling ssid scanning exception #34

clburlison opened this issue Mar 5, 2018 · 3 comments

Comments

@clburlison
Copy link
Owner

It's unclear if this is just a bug on 10.13 but I've managed to get airport command to give bad data multiple times tonight. This might be due to the very active wifi area that I'm in but Apple shouldn't give an incomplete file. 😞

# TODO (clburlison): This can error with
# FoundationPlist.FoundationPlist.NSPropertyListSerializationException: Encountered unexpected EOF # noqa
ssid_scan = FoundationPlist.readPlistFromString(ssid_scan)

@clburlison clburlison added the bug label Mar 5, 2018
@clburlison clburlison changed the title Handing ssid scanning exception Handling ssid scanning exception Mar 5, 2018
@danner26
Copy link
Contributor

danner26 commented Mar 6, 2018

This happened to me many times. On campus, we will have machines that cannot report data because printer wifi networks cause issues (the stupid HP DIRECT wifi signals). Not sure if some have carriage returns or something, but during the airport scan the xml fetched will quit halfway.

@clburlison
Copy link
Owner Author

So this issue is just to track the hard crash. pinpoint should read the exception and write out an error.

I'm pretty sure it isn't a carriage return issue simply the airport command not being written in a way that it can handle that many SSIDs. I was able to replicate this a few times without pinpoint by calling:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s --xml 

It does look like I can replace the airport subprocess call with code from the Core WLAN framework. https://developer.apple.com/documentation/corewlan/cwinterface?language=objc That however it going to take a bit of time to write up and test.

@clburlison
Copy link
Owner Author

Switching to CoreWLAN is going to be the better solution. I have a mock up working so I'll switch to that in the next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants