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 data at $HOME/.config/apdatifier/news.json is corrupted or broken and cannot be processed #92

Open
Damglador opened this issue Mar 24, 2025 · 8 comments

Comments

@Damglador
Copy link

I have all available news enabled. If I update the widget, so it gathers updates and news, then dismiss all news and restart plasmashell or the system, it'll send Exit with error code 1 (or something like that) and JSON data at $HOME/.config/apdatifier/news.json is corrupted or broken and cannot be processed. The news.json file in .config/apdatifier is just empty. The widget is unusable until I remove the news.json and restart plasmashell

My config:

config.conf

@exequtic
Copy link
Owner

The news.json file in .config/apdatifier is just empty

If the file is truly empty (0B), this error cannot occur.
So there must have been something in it (even with a single whitespace character).

Did it happen once, or does it happen constantly?

@Damglador
Copy link
Author

It happens every time I dismiss the news and restart plasmashell. The file has just 2 lines

@exequtic
Copy link
Owner

Need to figure out when the JSON file breaks.

Reproduce the same actions and keep an eye on the open file news.json. After checking for updates, valid data should appear there, when deleting a news item, the key removed should change to true, and after restarting plasmashell, the file should not change in any way.

@Damglador
Copy link
Author

@exequtic the file breaks when news finish refreshing.

  1. I update the news
  2. Dismiss article 1
  3. Dismiss article 2
  4. Dismiss article 3
  5. Dismiss article 4
  6. The news are clear, file is fine, everything has true for "removed"
  7. I click "Check updates"
  8. "Checking latest news finishes" and the file wipes (except for empty 2 lines)

@exequtic
Copy link
Owner

Reinstall with latest commit: Settings -> General -> Misc tab -> Install development version

@Damglador
Copy link
Author

Still wipes the file.

Installed dev version from the settings, restarted Plasma, dismissed all news, refreshed news, file wiped, the exit with code 1 after another Plasma restart still happens

@exequtic
Copy link
Owner

Could be due to an old news date format in your file. Added a check for it.

@Damglador
Copy link
Author

Seems to be okay now 👍

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

No branches or pull requests

2 participants