oneconf-service crashed with TypeError in get_oauth_params(): Unicode-objects must be encoded before hashing

Bug #1497708 reported by shankao
106
This bug affects 20 people
Affects Status Importance Assigned to Milestone
oneconf (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Found this error after unlocking the session

ProblemType: Crash
DistroRelease: Ubuntu 15.10
Package: oneconf 0.3.8
ProcVersionSignature: Ubuntu 4.2.0-10.11-generic 4.2.0
Uname: Linux 4.2.0-10-generic x86_64
ApportVersion: 2.18.1-0ubuntu1
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Sun Sep 20 07:42:47 2015
EcryptfsInUse: Yes
ExecutablePath: /usr/share/oneconf/oneconf-service
InstallationDate: Installed on 2012-11-25 (1029 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120627)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/share/oneconf/oneconf-service
ProcEnviron:
 XDG_RUNTIME_DIR=<set>
 SHELL=/bin/bash
 LANGUAGE=en_SG:en
 PATH=(custom, no user)
 LANG=en_SG.UTF-8
PythonArgs: ['/usr/share/oneconf/oneconf-service']
SourcePackage: oneconf
Title: oneconf-service crashed with TypeError in get_oauth_params(): Unicode-objects must be encoded before hashing
UpgradeStatus: Upgraded to wily on 2015-03-14 (189 days ago)
UserGroups: adm cdrom dip libvirtd lpadmin plugdev sambashare sudo vboxusers

Revision history for this message
shankao (shankao) wrote :
tags: removed: need-duplicate-check
Changed in oneconf (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in oneconf (Ubuntu):
status: New → Confirmed
information type: Private → Public
Revision history for this message
Jeb E. (jebeld17) wrote :

I constantly get this bug! Very annoying, please fix!

Revision history for this message
Doudz (sebastien-ramage) wrote :

I got this bug too after upgrading from Ubuntu 15.04 to Ubuntu 15.10

Revision history for this message
Doudz (sebastien-ramage) wrote :

looks like I "solved" the bug by reinstalling oneconf

sudo apt-get install --reinstall oneconf
sudo dpkg-reconfigure oneconf

Revision history for this message
Doudz (sebastien-ramage) wrote :

The bug re-appears after 2/3 boot...

Revision history for this message
Marco Eminente (marcoeminente158) wrote :

Same problem after upgrade from 15.04 to 15.10, the error occur after I empty the trash and the home directory is suddenly opened in a new window

Revision history for this message
Risun Fan (fan123199) wrote :

Same problem after upgrade from 15.04 to 15.10.

Revision history for this message
Rafael P. (rafael-p) wrote :

Same problem on fresh 15.10 install.

I thought Ubuntu One was obsolete?? Why are related packages still being used?

Revision history for this message
MankyGitt (dnadruff) wrote :

I have this problem also on a fresh install of 15.10 x64

The advice at
http://osdir.com/ml/ubuntu-bugs/2015-11/msg03922.html
appears to provide a temporary solution.
The problem reappears after some event occurs: Possibly that event described by marcoeminente158 - regardless of whether the device is running a clean or upgraded installation.

Attached is a copy of the oneconf crash log.

Revision history for this message
Fordi (fordiman) wrote :

I've located the cause of this in my machine, and it's environmental: python3.4 has a pip3-sourced oauthlib, while oneconf depends on the apt-get-sourced version (python3-oauthlib). The following procedure fixed it.

    # capture the list of apt packages that depend on oauthlib
    APTNAME=python3-oauthlib
    PIPNAME=oauthlib
    DEPS=$(sudo apt-get remove $APTNAME -sy | grep $APTNAME | head -1)
    # Need to do this; pip's lib gets "hidden" from pip by the OS-managed lib, even though it takes precedence.
    sudo apt-get remove $APTNAME -y
    # Remove the offending pip version
    sudo pip3 uninstall $PIPNAME
    # Restore the applications we just removed.
    sudo apt-get install $DEPS -y

Revision history for this message
Fordi (fordiman) wrote :

It might be possible to do a workaround in code to compensate for different versions of oauthlib, but that's above my paygrade in terms of python code. Possibly just encoding the unicode content to ascii before b64 encoding, as the traceback states.

Changed in oneconf (Ubuntu):
assignee: nobody → Fordi (fordiman)
Revision history for this message
Fordi (fordiman) wrote :

Ok, I worked out a place where the `body` argument could be wiggled into place to stop breaking the sha1 hasher. Attached a patch that overloads infraclient_pristine.WebCatalogAPI#_prepare_body to encode the string correctly.

Changed in oneconf (Ubuntu):
assignee: Fordi (fordiman) → nobody
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch creating `infraclient_pristine.WebCatalogAPI#_prepare_body` to utf-8 encode the `body` for requests." seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
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.