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

Old settings might cause new extension versions to crash #156

Open
ifl0w opened this issue Dec 14, 2022 · 1 comment
Open

Old settings might cause new extension versions to crash #156

ifl0w opened this issue Dec 14, 2022 · 1 comment
Assignees
Milestone

Comments

@ifl0w
Copy link
Owner

ifl0w commented Dec 14, 2022

It seems that previously stored settings can cause issues with changes introduced in #143

More context can be found in this discussion: #143 (comment)

Should check what can be done to avoid such issues. Maybe we could reset stored settings or just use a schema id so that the old settings would not influence the extension. Obviously, this would also clear the previous history for all users. Maybe there is a better way to work around this issue.

@Lucki
Copy link
Contributor

Lucki commented Dec 14, 2022

I looked briefly into it:
I think that happened because I've renamed the gsetting, and it was returning by default an empty path.
The jsonpath then returns directly because of the empty string with a null and then the genericJson is missing the crucial null check. The null is now checked because TypeScript mocked me there.
The schemaId actually will change later on too because they need a dynamic path to support multiple different source settings for the same source type. We can't (and shouldn't?) carry them over easily.
The history is still the same and should still work as before. I have to recheck which elements I've added to the history object.

Edit: I did add a name for the history entry which is used for blocking and saving images. That already was checked against null and is now properly typed for null. The history should be fine. Source settings will be "lost"* however.

*They're still in the dconf but not accessible through the UI.

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

No branches or pull requests

2 participants