Blueman networking plug-in broken in Xenial

Bug #1574093 reported by Julius Schwartzenberg
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
blueman (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Trying to enable the networking plug-in in Blueman on Xenial gives a dialog with the following information:

Failed to apply network settings
You might not be able to connect to the Bluetooth network via this machine

Exception
org.freedesktop.DBus.Python.UnicodeDecodeError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3/dist-packages/blueman/main/DbusService.py", line 36, in wrapper
    return method(*args[1:], **kwargs)
  File "/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py", line 63, in ReloadNetwork
    nc = NetConf.get_default()
  File "/usr/lib/python3/dist-packages/blueman/main/NetConf.py", line 219, in get_default
    obj = pickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

s

Tags: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in blueman (Ubuntu):
status: New → Confirmed
Revision history for this message
David Lechner (dlech) wrote :

Same error, but different exception.

Revision history for this message
David Lechner (dlech) wrote :

I was eventually able to reproduce with the same error message as the OP.

I think that the error comes from a corrupt /var/lib/blueman/network.state file. It is possible that when upgrading, the existing file is not compatible. Deleting /var/lib/blueman/network.state will fix the error.

I was not able to reproduce the problem with a fresh 16.04 install.

Revision history for this message
infirit (infirit) wrote :

Can someone please attach "/var/lib/blueman/network.state" file so we can investigate.

Revision history for this message
Julius Schwartzenberg (jschwart) wrote :

Here's mine. I had indeed done an upgrade from 14.04.

Revision history for this message
infirit (infirit) wrote :

Here is a simple patch people can use. To be clear this will automatically drop the previous state and create a new one. This should not cause issues for most people but some that have made specific changes to the ip address or dhcp daemon used will have to to redo their setup in blueman-services.

https://patch-diff.githubusercontent.com/raw/blueman-project/blueman/pull/515.diff

diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py
index 61f5a63..24268df 100644
--- a/blueman/main/NetConf.py
+++ b/blueman/main/NetConf.py
@@ -299,7 +299,7 @@ def get_default(cls):
             NetConf.default_inst = obj
             f.close()
             return obj
- except IOError:
+ except (IOError, UnicodeDecodeError):
             n = cls()
             try:
                 n.store()

infirit (infirit)
description: updated
Revision history for this message
Adam (sailing-dragons) wrote :

In 16.04 the line to change is 225. I don't know how to change pages, but the one provided doesn't work due to the line number being different.

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

confirmed

i just upgraded from 14.04 to 16.04.1

After log in, i have a popup message :

org.freedesktop.DBus.Python.UnicodeDecodeError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3/dist-packages/blueman/main/DbusService.py", line 36, in wrapper
    return method(*args[1:], **kwargs)
  File "/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py", line 63, in ReloadNetwork
    nc = NetConf.get_default()
  File "/usr/lib/python3/dist-packages/blueman/main/NetConf.py", line 219, in get_default
    obj = pickle.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

Google show:
https://github.com/blueman-project/blueman/issues/513 which says it is fixed (upstream ?)

Revision history for this message
Jakub Tušan (jjtusan) wrote :

A little different error

org.freedesktop.DBus.Python.EOFError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3/dist-packages/blueman/main/DbusService.py", line 36, in wrapper
    return method(*args[1:], **kwargs)
  File "/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py", line 63, in ReloadNetwork
    nc = NetConf.get_default()
  File "/usr/lib/python3/dist-packages/blueman/main/NetConf.py", line 219, in get_default
    obj = pickle.load(f)
EOFError

Revision history for this message
Tekchik (techchick) wrote :

Is this fixed yet?

Revision history for this message
Tekchik (techchick) wrote :

Can someone tell me if this is fixed yet?

Revision history for this message
Vera Bucek (vbucek) wrote :

Apparently issue still exists because today I updated from Linux Mint 18.3 to 20.04 (Ulyana) and received this exact error which was resolved by David Lechner's fix in post #3.

Revision history for this message
Vera Bucek (vbucek) wrote :

Apparently issue still exists because today I updated from Linux Mint 19.3 to 20.04 (Ulyana) and received this exact error which was resolved by David Lechner's fix in post #3.

Ken Sharp (kennybobs)
tags: added: xenial
infirit (infirit)
Changed in blueman (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.