Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json error #7920

Closed
hlubach opened this issue Feb 28, 2024 · 4 comments · Fixed by #7983
Closed

Json error #7920

hlubach opened this issue Feb 28, 2024 · 4 comments · Fixed by #7983

Comments

@hlubach
Copy link

hlubach commented Feb 28, 2024

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
Copy link
Contributor

xoriole commented Feb 28, 2024

@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?

  • The Deb file you mentioned, is it downloaded from the official https://tribler.org website, can you confirm? If not where did you get it from?
  • Could you run the following command on terminal and share the terminal logs? It will show the logs and will give us more insights where the error originated from.
/usr/share/tribler/triber

@hlubach
Copy link
Author

hlubach commented Mar 13, 2024

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
Copy link
Collaborator

drew2a commented Apr 18, 2024

The error occurred here:

def load(self, file_path: Path):
self.logger.info(f'Load: {file_path}')
self.file_data = json.loads(file_path.read_text().strip())

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 drew2a added this to the 7.15.0 milestone Apr 18, 2024
@drew2a drew2a self-assigned this Apr 18, 2024
@drew2a
Copy link
Collaborator

drew2a commented Apr 18, 2024

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

~/.Tribler 
➜ echo > version_history.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants