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

wifiNetworks returns an empty list on macOS >= 14.4 #912

Open
accnops opened this issue Jun 7, 2024 · 2 comments · May be fixed by #937
Open

wifiNetworks returns an empty list on macOS >= 14.4 #912

accnops opened this issue Jun 7, 2024 · 2 comments · May be fixed by #937

Comments

@accnops
Copy link

accnops commented Jun 7, 2024

Describe the bug
Before macOS 14.4, wifiNetworks worked correctly, and returned Wi-Fi network information. On macOS 14.4 and later, it returns an empty list.

This is because they dropped support for the airport utility which systeminformation is dependent on on macOS.

When running the airport command directly, it returns this:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x
WARNING: The airport command line tool is deprecated and will be removed in a future release.
For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.

See more discussion here: https://www.reddit.com/r/MacOS/comments/1bjjchk/rip_airport_cli_macos_sonoma_144_removes_the/

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you have a Mac running 14.4 or later.
  2. Create a tiny script that runs wifiNetworks.
  3. Observe that it returns an empty array.

Current Output
[]

Expected behavior
Should return list of available Wi-Fi networks.

Environment (please complete the following information):

  • systeminformation package version: 5.22.10
  • OS: macOS 14.4 or later
  • Hardware: Macbook

To get all needed environment information, please run the following command:

  npx systeminformation info

│  SYSTEMINFORMATION                                                     Version: 5.22.10 │
└─────────────────────────────────────────────────────────────────────────────────────────┘

Operating System:
──────────────────────────────────────────────────────────────────────────────────────────
Platform         : darwin
Distro           : macOS
Release          : 14.4.1
Codename         : macOS Sonoma
Kernel           : 23.4.0
Arch             : arm64
Codepage         : UTF-8
Build            : 23E224

System:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : Apple Inc.
Model            : MacBookPro
Version          : 18,1
Virtual          :

CPU:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : Apple
Brand            : M1 Pro
Family           : 458787763
Model            :
Stepping         : 4
Speed            : 2.4
Cores            : 10
PhysicalCores    : 10
PerformanceCores : 8
EfficiencyCores  : 2
Processors       : 1
Socket           : SOC
@accnops accnops changed the title wifiNetworks returns an empty list on MacOS >= 14.4 wifiNetworks returns an empty list on macOS >= 14.4 Jun 7, 2024
@VladislavGatsenko
Copy link

I was looking for a solution to a different problem, but maybe this will help with a solution. Just execute in the console:

system_profiler SPAirPortDataType

@sebhildebrandt
Copy link
Owner

@VladislavGatsenko ... wow I did not know about that. This is awesome. I will try to come up with a solution.

@FlorianSW FlorianSW linked a pull request Oct 8, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants