Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.74k stars 445 forks source link

Json error #7920

Closed hlubach closed 2 months ago

hlubach commented 4 months ago

After install the Deb file And starting Tribler this error came up

JSODecoder error: Expecting value: Line 1 Column 1 (char 0)

Running the latest Linux mint version

xoriole commented 4 months ago

@hlubach Thank you for reporting. You mentioned the latest Linux mint version and Deb file installation, so I assume 7.13.2 version. Could you provide a bit more information below?

hlubach commented 3 months ago
han@han-iMac:~$ /usr/share/tribler/tribler
INFO:__main__:Run Tribler: Namespace(allow_code_injection=False, chant_testnet=False, core=False, gui_test_mode=False, testnet=False, torrent='', trace_debug=False, trace_exception=False, trustchain_testnet=False, tunnel_testnet=False)
INFO:__main__:Root state dir: /home/han/.Tribler
INFO:__main__:Sentry has been initialised in normal mode
INFO:tribler.gui.start_gui:Running GUI in normal mode
INFO:tribler.gui.start_gui:Enabling a workaround for Ubuntu 21.04+ wayland environment
INFO:tribler.core.logger.logger:Load logger config: app_mode=tribler-gui, config_path=/usr/share/tribler/tribler_source/tribler/core/logger/logger.yaml, dir=/home/han/.Tribler
[tribler-gui PID:170689] 2024-03-14 00:26:12,366 - INFO - tribler.core.logger.logger(80) - Config loaded for app_mode=tribler-gui
[tribler-gui PID:170689] 2024-03-14 00:26:12,366 - INFO - tribler.core.check_os(121) - Check and enable code tracing. Process name: "gui". Log dir: "/home/han/.Tribler"
[tribler-gui PID:170689] 2024-03-14 00:26:12,367 - INFO - tribler.core.check_os(103) - Enable fault handler: "/home/han/.Tribler"
[tribler-gui PID:170689] 2024-03-14 00:26:12,367 - INFO - tribler.core.check_os(45) - Check environment
[tribler-gui PID:170689] 2024-03-14 00:26:12,367 - INFO - tribler.core.check_os(51) - Checking free space for the folder: /home/han/.Tribler
[tribler-gui PID:170689] 2024-03-14 00:26:12,367 - INFO - tribler.core.check_os(59) - There is enough free space: 138133 MB
[tribler-gui PID:170689] 2024-03-14 00:26:12,368 - INFO - TriblerApplication(25) - Start Tribler application. Win id: "triblerapp". Sys argv: "['/usr/share/tribler/tribler']"
Gtk-Message: 00:26:12.446: Failed to load module "xapp-gtk3-module"
[tribler-gui PID:170689] 2024-03-14 00:26:12,522 - INFO - TriblerApplication(51) - No running instances (socket error: 2)
[tribler-gui PID:170689] 2024-03-14 00:26:12,601 - INFO - tribler.gui.utilities(498) - Available Tribler translations {'Chinese': 'zh_CN', 'Russian': 'ru_RU', 'Spanish': 'es_ES', 'Portuguese': 'pt_BR', 'English': 'en_US'}
[tribler-gui PID:170689] 2024-03-14 00:26:12,602 - INFO - tribler.gui.utilities(499) - System language: ['nl-NL'], Tribler language: ['nl', 'nl-NL', 'nl-Latn-NL']
[tribler-gui PID:170689] 2024-03-14 00:26:12,603 - INFO - tribler.gui.start_gui(76) - Start Tribler Window
[tribler-gui PID:170689] 2024-03-14 00:26:12,620 - INFO - Tribler Config(86) - Init. State dir: /home/han/.Tribler. File: /home/han/.Tribler/triblerd.conf
[tribler-gui PID:170689] 2024-03-14 00:26:12,620 - INFO - VersionHistory(307) - Files to copy: ['ec_multichain.pem', 'ecpub_multichain.pem', 'secondary_key.pem', 'ec_trustchain_testnet.pem', 'triblerd.conf', 'lt.state']
[tribler-gui PID:170689] 2024-03-14 00:26:12,620 - INFO - VersionHistory(315) - Load: /home/han/.Tribler/version_history.json
[tribler-gui PID:170689] 2024-03-14 00:26:12,621 - ERROR <start_gui:86> tribler.gui.start_gui.run_gui(): Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "tribler/gui/start_gui.py", line 77, in run_gui
  File "tribler/gui/tribler_window.py", line 207, in __init__
  File "tribler/core/upgrade/version_manager.py", line 237, in __init__
  File "tribler/core/upgrade/version_manager.py", line 316, in load
  File "json/__init__.py", line 357, in loads
  File "json/decoder.py", line 337, in decode
  File "json/decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
********************************************************************************
Tribler Exception
********************************************************************************
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
****************************

Just tried the latest vdebfil from the site ,but with the same json message

drew2a commented 2 months ago

The error occurred here: https://github.com/Tribler/tribler/blob/591426394fe65c507c807c9d8c4b1db5d08ac805/src/tribler/core/upgrade/version_manager.py#L314-L316

Based on the logs provided, my guess is that there was a corrupted version_history.json

VersionHistory(315) - Load: /home/han/.Tribler/version_history.json

I suppose that just removing this file should solve the problem, @hlubach

drew2a commented 2 months ago

I was able to reproduce the bug by executing the following command:

~/.Tribler 
➜ echo > version_history.json