oauth errors with TypeError

Bug #1947441 reported by Sebastian Schauenburg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
offlineimap3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

when using offlineimap(3) to sync (in my case gmail) with oauth, it errors with the following:

Traceback (most recent call last):
  File "/usr/share/offlineimap3/offlineimap/threadutil.py", line 146, in run
    Thread.run(self)
  File "/usr/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 283, in syncrunner
    self.remoterepos = Repository(self, 'remote')
  File "/usr/share/offlineimap3/offlineimap/repository/__init__.py", line 77, in __new__
    return repo(name, account)
  File "/usr/share/offlineimap3/offlineimap/repository/Gmail.py", line 35, in __init__
    IMAPRepository.__init__(self, reposname, account)
  File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 43, in __init__
    self.imapserver = imapserver.IMAPServer(self)
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 108, in __init__
    self.oauth2_refresh_token = repos.getoauth2_refresh_token()
  File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 426, in getoauth2_refresh_token
    refresh_token = refresh_token.strip("\n")
TypeError: a bytes-like object is required, not 'str'

It was also reported upstream and fixed there recently (August 3rd): https://github.com/OfflineIMAP/offlineimap3/issues/57

Looking at the package version number ( 0.0~git20210225.1e7ef9e+dfsg-4 ), it dates from February 2021. I assume updating the package to a more recent version will fix this issue.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: offlineimap3 0.0~git20210225.1e7ef9e+dfsg-4
ProcVersionSignature: Ubuntu 5.13.0-19.19-generic 5.13.14
Uname: Linux 5.13.0-19-generic x86_64
ApportVersion: 2.20.11-0ubuntu70
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sat Oct 16 10:07:41 2021
InstallationDate: Installed on 2016-08-25 (1877 days ago)
InstallationMedia: Ubuntu-MATE 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
PackageArchitecture: all
SourcePackage: offlineimap3
UpgradeStatus: Upgraded to impish on 2021-10-16 (0 days ago)

Revision history for this message
Sebastian Schauenburg (sschauenburg) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package offlineimap3 - 0.0~git20211018.e64c254+dfsg-1

---------------
offlineimap3 (0.0~git20211018.e64c254+dfsg-1) unstable; urgency=medium

  * New upstream version 0.0~git20211018.e64c254+dfsg
    - Fixes oauth errors with TypeError. (LP: #1947441)
    - Fixes cert_fingerprint with self-signed certificate. (Closes: #995403)
  * Add an autopkgtest to test with self signed certificates.

 -- Sudip Mukherjee <email address hidden> Mon, 18 Oct 2021 19:22:08 +0100

Changed in offlineimap3 (Ubuntu):
status: New → 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.