XX-net/XX-Net · warning
helper failed:%r, please manually reset proxy settings after
Error message
helper failed:%r, please manually reset proxy settings after switching connection
What it means
This warning is emitted by MacTrayObject.loadConfig when the PyObjC helper calls to enable/disable the system proxy (e.g. helperSetPac / helperDisableAutoProxy / helperDisableGlobalProxy) raise an exception while a network change is being processed. The launcher catches the exception so the app keeps running, but the macOS proxy settings may now be stale or left pointing at the old connection.
Source
Thrown at code/default/launcher/mac_tray.py:426
if proxy_setting == "pac" and config.enable_smart_router:
helperDisableGlobalProxy(currentService)
helperEnableAutoProxy(currentService)
elif proxy_setting == "gae" and config.enable_gae_proxy:
helperDisableAutoProxy(currentService)
helperEnableGlobalProxy(currentService)
elif proxy_setting == "x_tunnel" and config.enable_x_tunnel:
helperDisableAutoProxy(currentService)
helperEnableXTunnelProxy(currentService)
elif proxy_setting == "smart_router" and config.enable_smart_router:
helperDisableAutoProxy(currentService)
helperEnableSmartRouterProxy(currentService)
else:
helperDisableAutoProxy(currentService)
helperDisableGlobalProxy(currentService)
# else:
# xlog.warn("proxy_setting:%r", proxy_setting)
except Exception as e:
xlog.warn("helper failed:%r, please manually reset proxy settings after switching connection", e)
sys_tray = MacTrayObject.alloc().init()
currentService = None
def fetchCurrentService(protocol):
global currentService
status = SystemConfiguration.SCDynamicStoreCopyValue(None, "State:/Network/Global/" + protocol)
if not status:
currentService = None
return
serviceID = status['PrimaryService']
service = SystemConfiguration.SCDynamicStoreCopyValue(None, "Setup:/Network/Service/" + serviceID)
if not service:
currentService = None
return
currentService = service['UserDefinedName']View on GitHub (pinned to cfa5bc17b6)
Solutions
- Reinstall/repair the privilege helper and PyObjC: sudo pip3 install -U PyObjC, then restart the launcher
- Manually reset the proxy: System Settings -> Network -> Advanced -> Proxies, turn off the Web/Secure Proxy or PAC the launcher set
- Check the launcher log for the underlying %r exception to identify which helper call failed
- If it recurs on every network change, remove and re-grant the helper's authorization (re-run the helper install step)
Defensive patterns
Strategy: try-catch
Validate before calling
import subprocess
def helper_available():
try:
subprocess.run(['networksetup','-getwebproxy','Wi-Fi'], capture_output=True, timeout=5)
return True
except Exception:
return False Try / catch
try:
apply_proxy_settings()
except Exception as e:
log.warning('helper failed: %r; resetting proxy manually', e)
revert_to_direct_connection() Prevention
- Install/repair the PyObjC privilege helper before enabling proxy control
- Test proxy switching after installing on a new macOS machine
- Watch logs after network changes to catch stale proxy state
When it happens
Trigger: Calling loadConfig via applicationDidFinishLaunching_ or the networkChanged callback on macOS; any exception thrown by the PyObjC-backed helper functions that manipulate network location proxy settings (helper not installed, missing privileges, NSException from SystemConfiguration APIs).
Common situations: Switching Wi-Fi networks or docking/undocking Ethernet while the launcher runs; PyObjC or the xxnet_helper privilege helper not properly installed; macOS SystemConfiguration refusing the change due to a profile/MDM lock.
Related errors
- import mac_tray except:%r, Please try run 'sudo pip3 install
- request version:%d error
- request version:%d error
- entity header:%s
- set LAN Proxy to %s:%d fail.
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/65208e4741c227e8.
Report an issue: GitHub.