Networking Add-on - Unhandled Exception Caught when connecting to wifi network

Hi,
I am using OSMC 2018.08-2 on PI 3B.
in My OSMC / Network, I have experienced an handled exeception while trying to connect to a wireless Network protected by passphrase. Each time, I select a given available closed WIFI network, the GUI shows “Networking add-on | unhandled exception” and does launch the screen to enter the WIFI passphrase. As a result, It is impossible to connect the OSMC to any wireless network.

After some investigation, it seems that this GUI exception is a consequence of not having any Bluetooth device enabled in the PI. It means that if the My OSMC / Network menu does not contain any Bluetooth “category”, the exception will raise.

I have experiened this exception when disabling on purpose the internal BT device (dtoverlay=pi3-disable-bt in conf.txt) and without have plugged the external OSMC approved BT device. As a result, no BT category was present in my OSMC / network and the error poped up. When re-enabling the internal device OR plugging the external BT device at startup OR both, the BT category was present and no exception were raised and the screen inviting me to enter the passphrase was properly showed and I could connect to the WIFI network.

Has anyone experienced similar behaviour while playing around with BT devices ?
It looks like a bug but better double-check with OSMC experienced users…

I have copied/pasted here the kodi debug lines linked to this networking add-on exception

1st Attempt

23:38:15.298 T:1645888256 DEBUG: Attempting connection to /net/connman/service/wifi_b827ebd2715d_486f74656c20416e7469717565203635_managed_psk
23:38:15.323 T:1645888256 DEBUG: Unhandled Exception thrown in Networking GUI
Traceback (most recent call last):
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 390, in onClick
self.handle_wireless_selection(controlID)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1205, in handle_wireless_selection
self.handle_selected_wireless_network()
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1284, in handle_selected_wireless_network
self.connect_to_wifi(ssid, encrypted)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1357, in connect_to_wifi
connection_status = osmc_network.wifi_connect(path, None, hiddenssid, script_base_path)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/osmc_network.py”, line 330, in wifi_connect
service.Connect(timeout=15000)
File “/usr/lib/python2.7/dist-packages/dbus/proxies.py”, line 70, in call
return self._proxy_method(*args, **keywords)
File “/usr/lib/python2.7/dist-packages/dbus/proxies.py”, line 145, in call
**keywords)
File “/usr/lib/python2.7/dist-packages/dbus/connection.py”, line 651, in call_blocking
message, timeout)
File “/usr/lib/python2.7/dist-packages/dbus/exceptions.py”, line 47, in init
if name is not None or getattr(self, ‘_dbus_error_name’, None) is None:
TypeError: ‘NoneType’ object is not callable

2nd Attempt

23:40:11.481 T:1645888256 DEBUG: Attempting connection to /net/connman/service/wifi_b827ebd2715d_486f74656c20416e7469717565203635_managed_psk
23:40:11.487 T:1645888256 DEBUG: Unhandled Exception thrown in Networking GUI
Traceback (most recent call last):
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 390, in onClick
self.handle_wireless_selection(controlID)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1205, in handle_wireless_selection
self.handle_selected_wireless_network()
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1284, in handle_selected_wireless_network
self.connect_to_wifi(ssid, encrypted)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/networking_gui.py”, line 1357, in connect_to_wifi
connection_status = osmc_network.wifi_connect(path, None, hiddenssid, script_base_path)
File “/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/lib/osmc_network.py”, line 330, in wifi_connect
service.Connect(timeout=15000)
File “/usr/lib/python2.7/dist-packages/dbus/proxies.py”, line 70, in call
return self._proxy_method(*args, **keywords)
File “/usr/lib/python2.7/dist-packages/dbus/proxies.py”, line 145, in call
**keywords)
File “/usr/lib/python2.7/dist-packages/dbus/connection.py”, line 651, in call_blocking
message, timeout)
File “/usr/lib/python2.7/dist-packages/dbus/exceptions.py”, line 47, in init
if name is not None or getattr(self, ‘_dbus_error_name’, None) is None:
TypeError: ‘NoneType’ object is not callable

Hi,

How was bluetooth disabled?

Thanks Tom.

Hi Tom,
I disabled the internal BT on purpose to keep it shut as I I bought the more reliable external OSMC BT device for using with BT speakers. As I was using exclusively the external BT, I decided to disable the internal one to spare some power and to have an “optimized” configuration (appening the line dtoverlay=pi3-disable-bt in /boot/config.txt)

The issue occured when I brought the PI with me on a trip without the external BT plugged in and therfore I could not connect it to the wireless network.

I guess the OSMC / Network Add-on should be more robust to prevent this “BT dependency” I would say.

I hope this post could help others that faced simliar scenario…I took some time to figure out how to tackle the issue.

Thanks

Ok, I just tried and can confirm (may remember that I had reported that in the past).
Not sure how high the priority is to fix it as not impacting too many people and you already indicated a workaround.

1 Like

Ok. Thanks for your feedback. At least you confirmed that behaviour and community is aware of always having a BT device enabled to prevent such issue.