Catch key, index and type error when getting scan results#19956
Merged
Conversation
seanbudd
approved these changes
Apr 16, 2026
Collaborator
|
Thanks @SaschaCowley.
|
Contributor
|
Trying from last beta branch version (commit 3d07d82) from source, I can open the Store, but NVDA still logs an error each time; and even a lot of time when you open the available add-ons list. Here is the error, taken from a brand new empty config, and after having installed only one add-on. From this error, it's quite obvious that it's not a matter of corrupted or badly transferred file. @SaschaCowley or @seanbudd, could you have a look? Even if the Store now opens, it's quite ugly to ship with such a systematic error logged. You can reproduce with last beta branch, empty new config folder, install an add-on, restart and open the Add-on Store again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #19952
Summary of the issue:
The add-on store fails to load if invalid data is returned from the server.
Description of user facing changes:
Crash no-longer occurs.
Description of developer facing changes:
None.
Description of development approach:
When extracting scan results, catch
TypeErrorandIndexErroras well asKeyError.Testing strategy:
Created a faulty cache:
Ran from source and checked that the add-on store opened.
Known issues with pull request:
In my testing, the invalid file also caused NVDA not to start, but the OP didn't report any such problem, so their problem may have been slightly different? Nevertheless this fix solves an actual bug.
Code Review Checklist: