node-wifi: [Bug]: Returning [] empty array on macOS Monterey

Expected behavior

When scanning networks either by node API using wifi.scan or with the CLI using npx node-wifi-cli --scan Should return list of scanned networks.

Current behavior

When scanning networks either by node API using wifi.scan or with the CLI using npx node-wifi-cli --scan, it returns [] an empty array. No errors, just an empty list.

Which are the affected features

  • node API
  • CLI

Which is your operating system?

MacOS

Environment

  • Macbook Pro 16" Intel Big Sur: working
  • Macbook Pro 16" Intel Monterey: empty list
  • iMac Intel Monterey: empty list

Version of node-wifi

2.0.15

Steps to Reproduce

Scan networks by either CLI or node-wifi api and log the result.

Solutions

I’m wondering if there are any new permissions to manage the wifi hardware on Monterey. There were no dialogs shown whatsoever when trying to use the CLI or the node app we are developing that relies on this lib.

Also tried using debug: true as a parameter for the wifi.init but couldn’t see any additional info when logging the resulting networks.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (12 by maintainers)

Most upvoted comments

Yes it helps a lot. Besides using xml is safer than parsing the command output. It was in the roadmap but I guess we just have to reprioritize this feature. I will work on it.

node-wifi and node-wifi-cli fixes have been released. I hope it will work for you.

Ok perfect. I look into your issue.