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

Corrupted uuid_cache.json #46

Closed
Protonull opened this issue Jun 10, 2022 · 0 comments
Closed

Corrupted uuid_cache.json #46

Protonull opened this issue Jun 10, 2022 · 0 comments

Comments

@Protonull
Copy link
Contributor

Whoops, in my commit (cca301c) that updated metadata parsing, I failed to remove the conversation to an array during the saving process (see here), which means that the uuid_cache.json file is being saved as an array and loaded as an object.

const json = JSON.parse('[["Orinnari","ecf75ae0-4fa1-418d-b5bc-813abfac7626"]]');
const uuid_cache = new Map();
for (const [key, value] of Object.entries(json)) {
	uuid_cache.set(key, String(value));
}
// Map(1) {'0' => 'Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626'}

This means that, through progressive saves, each entry will duplicate and get progressively more corrupted. Here's my current development uuid_cache.json:

[["0","0,0,0,0,Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626"],["1","1,1,1,Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626"],["2","2,2,Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626"],["3","3,Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626"],["4","Orinnari,ecf75ae0-4fa1-418d-b5bc-813abfac7626"],["Orinnari","ecf75ae0-4fa1-418d-b5bc-813abfac7626"]]
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

1 participant