Timac / VPNStatus

VPNStatus, a replacement for macOS builtin VPN Status
https://blog.timac.org/2018/0719-vpnstatus/
MIT License
221 stars 31 forks source link

duplicate VPN connection #9

Closed Potato-007 closed 3 years ago

Potato-007 commented 3 years ago

in Apple / System Preferences / Network pref.pane I have 2 locations and within each there's the same VPN connection - this is fine. But in VPNStatus I see many possible VPN connections, these seams to be previous settings I used for testing that are already deleted days ago and should not exits anymore. I have an impression that the Network pref.pane and the VPNStatatus are not pooling network setting infos from the same place.

Screen Shot 2021-01-29 at 10 00 31 Screen Shot 2021-01-29 at 9 34 55

Timac commented 3 years ago

Thanks for the bug report!

VPNStatus loads the list of VPNs using the private API loadConfigurationsWithCompletionQueue:handler: from the NetworkExtension framework. It could be a bug in Apple's code or just some unsupported edge cases by using this private API.

I am wondering:

I would love to hear more about this to see if I can do anything.

Potato-007 commented 3 years ago

No > "Do you see the same duplicated list with the official 'VPN Status' status item from Apple in the menubar?" Yes > "If you quit and relaunch VPNStatus, do you still have duplicated VPNs?" Yes > "Did you try to reboot your computer to make sure that the NetworkExtension is not in some weird state?"

what I tried now is that I deleted one of the 2 locations I had, then restarted VPNStatus, but old deleted VPN settings still appear in the list

update: in the meantime I delete these files from /Library/Preferences/SystemConfiguration/ and restarted:

NetworkInterfaces.plist com.apple.network.identification.plist com.apple.airport.preferences.plist

after the restart all network related settings were reset and the default Automatic location appeared. previous VPN seetings gone too. Using the official 'VPN Status' I see nothing to choose from, still in VPNStatus I see the old settings. I quit VPNStatus and deleted the org.timac.VPNStatus folder and the and .plist, started VPNStatus again, and I still see the old, deleted VPN settings

akiltopu commented 3 years ago

exactly same problem on Big Sur 11.4 :(

shlyakpavel commented 3 years ago

I'm facing the same issue

Potato-007 commented 3 years ago

here's how I fixed it:

1) boot into Recovery Mode with CMD + R 2) run the following command with Terminal: rm -rf /Volumes/Macintosh\ HD/Library/Preferences/com.apple.networkextension.plist

reboot

note: this will delete all the settings related to Network and VPN if you have FileVault enabled, you might need to run Disk Utility first and Mount / unlock your Macintosh HD volume

Timac commented 3 years ago

Thanks a lot @Potato-007 for sharing your solution. It definitively seems like some caches from Apple are not cleaned up when removing the VPNs.

shlyakpavel commented 3 years ago

Thanks a lot @Potato-007 for sharing your solution. It definitively seems like some caches from Apple are not cleaned up when removing the VPNs.

It's not a complete solution imo

  1. It looses all the network data (that is bad)
  2. It requires to disable system integrity protection on m1 that disables some features such as iOS apps

In fact, I'm able to manually edit this file to remove networks I don't need, but now I don't know a way to edit this file without disabling integrity protection
P. S. And, of course, it's not an issue of this app, so it's fine it's closed

Timac commented 3 years ago

@shlyakpavel Sadly I guess that only Apple would be able to properly address this issue. I would recommend to submit a bug to Apple at https://feedbackassistant.apple.com

Olivier-Levasseur commented 4 days ago

hi, is there something we can do to delete old VPNs in the list of VPNStatus?

Timac commented 4 days ago

hi, is there something we can do to delete old VPNs in the list of VPNStatus?

VPNStatus uses the VPN list provided by macOS. You can delete old VPNs using System Settings > VPN

Olivier-Levasseur commented 4 days ago

the problem is that I still see old VPN that now are no longer present in System Settings.

Olivier-Levasseur commented 4 days ago

ah ok, I just found out that in the options of VPNstatus, under the section called "ignored", you can specify which old VPN to hide. cheers to the developer ;)