Skip to content

[Fix] Invalid URL error and image caching #1210

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

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

BrettCleary
Copy link
Collaborator

Summary

URLs were being passed over file protocol like https//gateway.valist.io/ipfs/bafybeig57jh3x3q2vlmctjsdkx6yx36n4uza2rsp373suwlzcs2bgxkpbe without the colon.

This was causing axios to throw a Invalid URL unhandled error on every CachedImage component render. This also broke the image caching functionality at imagesCachePath.

See Heroic-Games-Launcher/HeroicGamesLauncher#1732 for more context on the original implementation.

We may be able to use https://www.electronjs.org/docs/latest/api/command-line-switches#--disk-cache-sizesize, which was suggested here electron/electron#7713, for the same use case in the future as well instead of a custom caching implementation.

Closes https://github.com/HyperPlay-Gaming/product-management/issues/866

@BrettCleary BrettCleary self-assigned this Jan 16, 2025
@BrettCleary BrettCleary changed the title [Fix] Image caching [Fix] Invalid URL and image caching Jan 16, 2025
@BrettCleary BrettCleary changed the title [Fix] Invalid URL and image caching [Fix] Invalid URL error and image caching Jan 16, 2025
@BrettCleary BrettCleary merged commit bb91a87 into main Jan 17, 2025
11 checks passed
@BrettCleary BrettCleary deleted the fix/image_caching branch January 17, 2025 04:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants