Bug 53588 - TypeError: coercing to Unicode: need string or buffer, NoneType found
TypeError: coercing to Unicode: need string or buffer, NoneType found
Status: NEW
Product: UCS
Classification: Unclassified
Component: Office 365
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Mail maintainers
Mail maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-16 19:57 CEST by Christian Castens
Modified: 2022-04-27 16:02 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022020721000377, 2021071521000391, 2021082321000284, 2021020821000402, 2022042721000121
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Castens univentionstaff 2021-07-16 19:57:56 CEST
Version: 4.4-7 errata893 (Blumenthal)

Remark: Microsoft 365 connector Error.

Error:
Internal server error during "office365/query".
Request: office365/query

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/office365/__init__.py", line 92, in query
    'initialized': AzureAuth.is_initialized(self.adconnection_alias),
  File "%PY2.7%/univention/office365/azure_auth.py", line 376, in is_initialized
    tokens = cls.load_tokens(adconnection_alias)
  File "%PY2.7%/univention/office365/azure_auth.py", line 418, in load_tokens
    return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read()
  File "%PY2.7%/univention/office365/azure_auth.py", line 323, in read
    with open(self.filename, "r") as fd:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Role: domaincontroller_master

Errno: bd264e9fcf0b24256a3c09459a72eda0
Comment 1 Christian Castens univentionstaff 2021-08-26 14:07:33 CEST
Version: 4.4-8 errata1029 (Blumenthal) - UCS@school 4.4 v9

Remark: Beim Herunterladen des Zertifikats im "Microsoft 365 Einrichtungsassistenten".
Musste zuvor eine bereits bestehende Verknüpfung mit MS365 löschen, da man die AD-Connection nicht umbenennen kann.

Error:
Interner Server-Fehler in "office365/query".
Request: office365/query

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/office365/__init__.py", line 92, in query
    'initialized': AzureAuth.is_initialized(self.adconnection_alias),
  File "%PY2.7%/univention/office365/azure_auth.py", line 376, in is_initialized
    tokens = cls.load_tokens(adconnection_alias)
  File "%PY2.7%/univention/office365/azure_auth.py", line 418, in load_tokens
    return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read()
  File "%PY2.7%/univention/office365/azure_auth.py", line 323, in read
    with open(self.filename, "r") as fd:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Role: domaincontroller_master
Comment 2 Maximilian Janßen univentionstaff 2021-11-26 16:20:27 CET
reported again:
Version: 4.4-7 errata887 (Blumenthal)
Remark: Der Fehler tritt sofort nach einer Neuinstallation auf.
Comment 3 Daniel Duchon univentionstaff 2022-04-27 16:02:17 CEST
A school customer is directly affected.

After removing the office365 connector from backup and reinstalling it on master, a new initialisation wasn't possible.

A workarround was to set the following ucr variable back to default:
ucr set office365/adconnection/wizard=defaultADconnection