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

bug: A broken thread.json could break the entire thread list #3693

Open
3 tasks done
louis-jan opened this issue Sep 18, 2024 · 0 comments
Open
3 tasks done

bug: A broken thread.json could break the entire thread list #3693

louis-jan opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
category: threads P1: important Important feature / fix type: bug Something isn't working
Milestone

Comments

@louis-jan
Copy link
Contributor

louis-jan commented Sep 18, 2024

Jan version

0.5.4

Describe the Bug

When the thread.json file is corrupted or contains invalid JSON, it causes the entire thread list to become inaccessible (empty list). This issue is critical as it disrupts the user experience by preventing access to all threads.

Please refer to the discussion for more context:
https://discord.com/channels/1107178041848909847/1285798898161418260

Expected Behavior

The application should handle the corrupted thread.json gracefully. It should either:

  1. Skip the corrupted entries and continue to load the rest of the threads.
  2. Display an error message indicating the issue with the specific file, without crashing the entire thread list.

Actual Behavior

The application fails to load any threads, displaying an error or crashing due to the corrupted thread.json.

Possible Solution

Implement error handling for JSON parsing in the thread loading functionality. Ensure that:

The application can detect and skip over corrupted JSON entries.
A user-friendly error message is displayed, indicating the problem with the thread.json file.

Steps to Reproduce

  1. Create a thread
  2. Manually edit the JSON, remove any comma
  3. Save the corrupted file.
  4. Attempt to load the thread list in the application (by pressing Ctrl + Shift + R)

Screenshots / Logs

No response

What is your OS?

  • MacOS
  • Windows
  • Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: threads P1: important Important feature / fix type: bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants