Hi i am a ios/android developer and use MacOS for android wifi debugging and it was always problematic.
I almost used all the solutions above like, restart everything, revoke adb authorizations, adb kill-server, sometimes worked, adb connect, adb pair, i have experience so i know how to write commands, i never made mistake still it stopped working.
All solutions and work arounds - for Mac
- My solution was to re enable the app Android Studio to access Local Networks - for this goto Settings->Privacy & Security->Local Network - then disable android studio and then re enable it - then restart androd studio, it detected all paired devices
- note the "Randomized MAC Address" should be disabled, you should use "Device Mac" if option not available, forget the network on android device and re-add wifi network and change the Randomized MAC Address
- ./adb connect and ./adb pair are useless if they will work then the Android studio connect dialog will work too, so not really useful, when android studio connect dialog doesn't work, these commands will also not work, i tried a lot
- disable in wifi network connection settings - Limit IP tracking, if necessary