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

Unable to detect SSID after update to MacOS Sonoma 14.4 (23E214) #195

Open
1 of 2 tasks
akanksha-atrey opened this issue Mar 29, 2024 · 7 comments
Open
1 of 2 tasks

Comments

@akanksha-atrey
Copy link

akanksha-atrey commented Mar 29, 2024

Expected behavior

The package was detecting networks as expected.

Current behavior

After updating to MacOS Sonoma 14.4, the package is not detecting any networks.

Which are the affected features

  • node API
  • CLI

Which is your operating system?

MacOS

Environment

MacOS Sonoma 14.4 (23E214)

Version of node-wifi

2.0.16

Steps to Reproduce

try {
    await wifi.init({ iface: null });
    const networks = await wifi.scan();

    console.log(`Found the following SSIDs: ${networks}`)

    return networks;
} catch (error) {
    console.error('Error scanning networks:', error);
}

Solutions

Is this a bug or a local issue?

@iogi
Copy link

iogi commented Apr 18, 2024

The same problem occurred.
This is caused by the airport command used by node-wifi being deprecated in MacOS Sonoma.

cmd: '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport',

@akanksha-atrey
Copy link
Author

Yes, I realized that. I figured out a hack using pyobjc modules for CoreWLAN/CoreLocation. Not a pretty way of doing it, but does the job for the time being.

@shaguarger
Copy link

I did some research at lunch and found a hint here:
#195 (comment)

Then I found this:
https://stackoverflow.com/questions/78153143/assistance-in-extracting-fields-and-formatting-using-pyobjc-and-corewlan

Maybe there is a way to use this here?

@aljaramillo
Copy link

I just wanted to chime in and mention that I am also experiencing this issue on my end. After updating to MacOS Sonoma 14.4 (23E214), my system is unable to detect the SSID. Any insights or workarounds would be greatly appreciated.

@deanylev
Copy link

Obviously trickier but I managed to work around this by writing a native module that calls this method https://developer.apple.com/documentation/corewlan/cwinterface/scanfornetworks(withssid:)?language=objc

It's blocking so be sure to wrap it in a promise/callback, I used a Napi::Promise

@vuvivian
Copy link

vuvivian commented Nov 7, 2024

Yes, I realized that. I figured out a hack using pyobjc modules for CoreWLAN/CoreLocation. Not a pretty way of doing it, but does the job for the time being.

how to do?

@shaguarger
Copy link

FYI: There is a way with system profiler. We did a PR in another repo.

sebhildebrandt/systeminformation#937

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

6 participants