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

Invalid add-on store cache in latest alphas, whole cache dumpped to log #15106

Closed
XLTechie opened this issue Jul 7, 2023 · 10 comments · Fixed by #15111
Closed

Invalid add-on store cache in latest alphas, whole cache dumpped to log #15106

XLTechie opened this issue Jul 7, 2023 · 10 comments · Fixed by #15111
Labels
feature/addon-store Features / behavior of the add-on Store p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@XLTechie
Copy link
Collaborator

XLTechie commented Jul 7, 2023

Steps to reproduce:

Run one of the last few alphas, since merger of #15071.

Actual behavior:

An error sound plays on startup. "Invalid add-on store cache" is reported in the log, and the whole cache is dumped to the log in JSON form.
Additionally, an invalid hash is reported:

Traceback (most recent call last):
  File "_addonStore\dataManager.pyc", line 164, in _getCachedAddonData
KeyError: 'cacheHash'

Expected behavior:

No error, no cache dump, no invalid hash.

NVDA logs, crash dumps and other attachments:

nvda-badcachehash.txt

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-28628,67ecd257

Windows version:

10

Name and version of other software in use when reproducing the issue:

N/A

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Have you tried any other versions of NVDA? If so, please report their behaviors.

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

N/A

@XLTechie
Copy link
Collaborator Author

XLTechie commented Jul 7, 2023

CC @nvdaes

@nvdaes
Copy link
Collaborator

nvdaes commented Jul 7, 2023

Hi Luke, I think this is expected and should be resolved when add-ons are cached and the json files are saved again.
Have you tried restarting NVDA and opening the store to fetch last and compatible add-ons?

@XLTechie
Copy link
Collaborator Author

XLTechie commented Jul 7, 2023 via email

@nvdaes
Copy link
Collaborator

nvdaes commented Jul 7, 2023

Have checked that your json files can be modified? I cannot reproduce this after fetching add-ons.
About storing the cache in the log, I think that @seanbudd suggested to do it and I support this in case it makes easy to debug some kind of error

@XLTechie
Copy link
Collaborator Author

XLTechie commented Jul 7, 2023 via email

@nvdaes
Copy link
Collaborator

nvdaes commented Jul 7, 2023

My guess, and it's only a guess, is that the cache on disk is being checked for
validity before it is updated, and if it fails it is not updated.
I think if it fails it should be updated immediately.

In my case, in a portable version of an old alpha (which had a cacheDate key) has been updated. I think that Sean will provide more details about this.

@seanbudd seanbudd added this to the 2023.2 milestone Jul 9, 2023
@seanbudd
Copy link
Member

I believe this issue would solve itself if you opened the add-on store and view available add-ons - can you confirm?

@seanbudd
Copy link
Member

I think we should just delete invalid cache files - I've opened #15111 to do this

@XLTechie
Copy link
Collaborator Author

XLTechie commented Jul 10, 2023 via email

@XLTechie
Copy link
Collaborator Author

XLTechie commented Jul 10, 2023 via email

@seanbudd seanbudd added p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. feature/addon-store Features / behavior of the add-on Store labels Jul 10, 2023
seanbudd added a commit that referenced this issue Jul 14, 2023
Closes #15106

Summary of the issue:
If NVDA has an invalid add-on store cache file it can be safely deleted until a new cache is fetched.
Without deleting it, NVDA will start with an error until it is overwritten by browsing add-ons.

Description of user facing changes
If NVDA has invalid cache data for the add-on store, NVDA will log an exception then delete the invalid cache file.

Description of development approach
If NVDA has invalid cache data for the add-on store, NVDA will log an exception then delete the invalid cache file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/addon-store Features / behavior of the add-on Store p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants