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

Cache never expires #822

Closed
1 of 3 tasks
sysrage opened this issue Mar 21, 2023 · 3 comments · Fixed by #888
Closed
1 of 3 tasks

Cache never expires #822

sysrage opened this issue Mar 21, 2023 · 3 comments · Fixed by #888
Assignees
Labels
bug Priority: 1

Comments

@sysrage
Copy link
Contributor

sysrage commented Mar 21, 2023

Issue Type

  • Bug Report
  • Feature Request
  • Other

Current/Missing Behaviour

If you have an old manifest.json file in your cache directory, it's never updated. So, if a new version of NW.js comes out builds will fail.

Expected/Proposed Behaviour

If using a cache, it needs to expire at some point.

Additional Info

  • Package version: 4.1.1
@ayushmanchhabra ayushmanchhabra added the bug Priority: 1 label Mar 23, 2023
@williamwang96
Copy link
Contributor

would it be an acceptable fix to always download manifest.json? It's very lightweight and shouldn't be cached anyways. I can work on a PR if the fix sounds good to you @tharatau .

@ayushmanchhabra
Copy link
Collaborator

ayushmanchhabra commented May 10, 2023

@williamwang96 My motivation for caching manifest.json was to allow builds without network (if the relevant nw binary is already downladed, that is). Ideally we should redownload manifest.json when connected to network and not redownload while not connected to network (so that builds don't fail).

Update: Feel free to open a PR!

@sysrage
Copy link
Contributor Author

sysrage commented Jun 20, 2023

@ayushmanchhabra this still seems to be a problem. I just updated my package.json to NW version 0.77.0-sdk and observed the following error:

[ ERROR ] 2023-06-20T14:33:26.951Z The specified version does not exist in the version manifest. Disable cache to redownload the version manifest. If you still get this error, that means the version you've specified is incorrect.

Deleting cache\manifest.json resolves the issue. Please fix this caching implementation...

My motivation for caching manifest.json was to allow builds without network (if the relevant nw binary is already downladed, that is).

You need to actually try to update the cache, though. Only use the existing manifest.json if a new download was unsuccessful. Otherwise, it should be re-written with the latest version.

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

Successfully merging a pull request may close this issue.

3 participants