Bug 57156 - OX connector should handle listener files with broken JSON
OX connector should handle listener files with broken JSON
Status: NEW
Product: Z_Internal OX development
Classification: Unclassified
Component: OX-Connector
UCS 5.0 / 7.10.6
Other Linux
: P5 normal (vote)
: ---
Assigned To: Mail maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-18 11:49 CET by Daniel Tröder
Modified: 2024-03-18 11:49 CET (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2024-03-18 11:49:48 CET
An error like this is repeated indefinitely:

-----------------------------------------------------------------------
2024-03-16 02:44:41 ERROR   Fatal error: The following JSON file is broken: /var/lib/univention-appcenter/listener/ox-connector/2024-03-14-09-14-32-500329.json
Traceback (most recent call last):
  File "/usr/share/univention-appcenter-listener-converter", line 168, in find_and_convert_files
    dumped = json.load(open(filename))
  File "/usr/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
-----------------------------------------------------------------------

A broken file cannot be used.
The ox-connector should recover from this problem.
It should delete or rename the file to allow later debugging.