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

Recover from corrupted etags.json #4078

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

HebaruSan
Copy link
Member

Problem

The Discord user from #4077 gave us more information about that exception. Eventually we discovered that %LOCALAPPDATA%\CKAN\repos\etags.json was corrupted, containing only 275 null bytes. Since it does not contain a JSON object, such a string deserializes to null, which caused that NRE.

Changes

Now when we deserialize etags.json, we fall back to an empty Dictionary if it's null, so an NRE won't be thrown.

@HebaruSan HebaruSan added Bug Easy This is easy to fix Core (ckan.dll) Issues affecting the core part of CKAN labels Apr 15, 2024
@HebaruSan HebaruSan merged commit 02c84ba into KSP-CKAN:master Apr 15, 2024
8 checks passed
@HebaruSan HebaruSan deleted the fix/null-etags-nre branch April 15, 2024 20:24
@HebaruSan HebaruSan mentioned this pull request Jun 29, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Core (ckan.dll) Issues affecting the core part of CKAN Easy This is easy to fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant