Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS 14.5: Could not parse signal data #1094

Open
VladislavGatsenko opened this issue Jul 24, 2024 · 16 comments
Open

MacOS 14.5: Could not parse signal data #1094

VladislavGatsenko opened this issue Jul 24, 2024 · 16 comments

Comments

@VladislavGatsenko
Copy link

VladislavGatsenko commented Jul 24, 2024

Steps to reproduce

  1. login as admin
  2. run sudo ./WiFiSurveyor

Expected behavior
The wifi adapter should be detected and networks should appear in the application (as it was before)

Observed behavior
The application cannot detect the adapter and does not allow access to networks (this is the case now, resetting network settings does not help)

vladislavgatsenko@MacBook-Pro WiFiSurveyor.1.2.1.Mac % sudo ./WiFiSurveyor
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://127.0.0.1:49424
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/ - -
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
      Sending file. Request path: '/index.html'. Physical path: '/Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac/wwwroot/_content/WiFiSurveyor.Core/index.html'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/ - - - 200 - text/html 25.2854ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/index.8cda34f9.css - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/index.ba0dbf00.js - -
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[5]
      CORS policy execution failed.
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[6]
      Request origin http://127.0.0.1:49424 does not have permission to access the resource.
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
      Sending file. Request path: '/index.8cda34f9.css'. Physical path: '/Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac/wwwroot/_content/WiFiSurveyor.Core/index.8cda34f9.css'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/index.8cda34f9.css - - - 200 - text/css 8.7012ms
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
      Sending file. Request path: '/index.ba0dbf00.js'. Physical path: '/Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac/wwwroot/_content/WiFiSurveyor.Core/index.ba0dbf00.js'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/index.ba0dbf00.js - - - 200 - text/javascript 9.4111ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/noto-sans-latin-300-normal.1aea802d.woff2 - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/roboto-latin-300-normal.f7591131.woff2 - -
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
      Sending file. Request path: '/roboto-latin-300-normal.f7591131.woff2'. Physical path: '/Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac/wwwroot/_content/WiFiSurveyor.Core/roboto-latin-300-normal.f7591131.woff2'
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
      Sending file. Request path: '/noto-sans-latin-300-normal.1aea802d.woff2'. Physical path: '/Users/vladislavgatsenko/Downloads/WiFiSurveyor.1.2.1.Mac/wwwroot/_content/WiFiSurveyor.Core/noto-sans-latin-300-normal.1aea802d.woff2'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/roboto-latin-300-normal.f7591131.woff2 - - - 200 15740 font/woff2 1.1046ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/noto-sans-latin-300-normal.1aea802d.woff2 - - - 200 13024 font/woff2 1.1099ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST http://127.0.0.1:49424/signals/negotiate?negotiateVersion=1 - 0
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[5]
      CORS policy execution failed.
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[6]
      Request origin http://127.0.0.1:49424 does not have permission to access the resource.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/favicon.ico - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/favicon.ico - - - 404 0 - 1.0294ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint '/signals/negotiate'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/signals/negotiate'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 POST http://127.0.0.1:49424/signals/negotiate?negotiateVersion=1 - 0 - 200 - application/json 24.3899ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://127.0.0.1:49424/signals?id=R9zBL9iePAER5vzdq76O8Q - -
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[5]
      CORS policy execution failed.
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[6]
      Request origin http://127.0.0.1:49424 does not have permission to access the resource.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint '/signals'
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
warn: WiFiSurveyor[0]
      Could not parse signal data: For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
^Cinfo: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/signals'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://127.0.0.1:49424/signals?id=R9zBL9iePAER5vzdq76O8Q - - - 101 - - 6210.4602ms
@SteveDesmond-ca
Copy link
Member

Thanks for this report, @VladislavGatsenko -- it looks like Apple has indeed deprecated their airport utility as of macOS 14.4 and removed it in 14.5: https://www.intuitibits.com/2024/03/14/goodbye-airport/

If you're comfortable doing so, could you please run wdutil info > wdutil-info-user.txt and sudo wdutil info > wdutil-info-sudo.txt and post those files (scrubbed, if desired) here, or email directly to [ Steve (at) ecoAPM (dot) com ] ?

Thanks again!
-Steve

@VladislavGatsenko
Copy link
Author

Thank you for your response.

Here are the files:
wdutil-info-user.txt
wdutil-info-sudo.txt

@SteveDesmond-ca
Copy link
Member

Wow, super speedy response! 🏎️

It looks like info only returns the currently connected SSID, so let's give the following a try:

/usr/bin/time -v sudo wdutil diagnose > wdutil-diag.txt 2>&1

The troubleshooting is truly appreciated, as I don't have any Apple devices to test with!

@VladislavGatsenko
Copy link
Author

I used sudo /usr/bin/time sudo wdutil diagnose > wdutil-diag-3.txt 2>&1, because /usr/bin/time -v sudo wdutil diagnose > wdutil-diag.txt 2>&1:

/usr/bin/time: illegal option -- v
usage: time [-al] [-h | -p] [-o file] utility [argument ...]

wdutil-diag-3.txt
WirelessDiagnostics_C02X531FJGH6_2024-07-25_02.01.13

@SteveDesmond-ca
Copy link
Member

Oof, sorry, I did not expect the output to be so large! Some research this morning shows that Apple has not replaced the required underlying functionality with anything else that works similarly.

I found all the info that's needed in the wifi_scan.txt file that's part of the diagnostic archive, but that obviously takes too long to generate for Wi-Fi Surveyor's frequency of feedback.

If you're willing to continue providing support from your end, I've got a couple more things I'd like to try with wdutil to see if we can pull what we need out of it. Could you post both the terminal output and any files created from the following commands?

  • time sudo wdutil dump
    it looks like this creates a file in /tmp with an auto-generated name, so hopefully the name is specified in the console output?
  • time sudo wdutil log +wifi
    I'm not sure if this logs to the terminal or not, and keeps running, or same as dump outputs to a file

Thanks again for all your help with this!
-Steve

@SteveDesmond-ca
Copy link
Member

If the above don't work, we may need to wait for .NET 9 to be able to call Swift code, where the functionality we need does exist: dotnet/runtime#93631

@VladislavGatsenko
Copy link
Author

I found no output after running the wdutil commands, which is strange. I tried different command calls, according to the documentation, but the result is “0”.
However, I found an alternative option. You can use the command: system_profiler SPAirPortDataType
Here is the result of its execution. As it seems to me, this might be a solution.

time system_profiler SPAirPortDataType > 1.txt

1.txt

@SteveDesmond-ca
Copy link
Member

Ahh, that is so awesome, thanks for finding that!

Did you need to be root in order to run it? Removing the sudo requirement would be great!

It seems straightforward enough to parse, so I'll hopefully get a v2.0 out at some point next week 🤞🏻

@VladislavGatsenko
Copy link
Author

Yes, it works without specifying sudo.

Thanks for the help :)

@VladislavGatsenko
Copy link
Author

Maybe json format for parsing would be more convenient:

time system_profiler -json SPAirPortDataType > 2.txt

2.txt

@SteveDesmond-ca
Copy link
Member

Even better! Almost there! The only thing missing is the AP MAC addresses, which I think we can get from:

/usr/sbin/system_profiler -json SPAirPortDataType -detailLevel full > system_profiler.json

🤞🏻

@VladislavGatsenko
Copy link
Author

Mac addresses are unfortunately unavailable.

system_profiler.json

@SteveDesmond-ca
Copy link
Member

Arg, that goes against the schema/spec I found. Do MAC addresses show up with sudo?

@VladislavGatsenko
Copy link
Author

Unfortunately, the result is similar, the mac address is still missing.

@SteveDesmond-ca
Copy link
Member

F, I guess we're going to need to remove some Mac functionality in v2.0 😢

@VladislavGatsenko
Copy link
Author

It looks like there's no other option right now. Until either apple finalizes wdutil, or until .NET 9 comes along to use swift.

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

No branches or pull requests

2 participants