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

ENS Avatar resolution fails if image metadata is set to IPFS link #2590

Closed
cpixy3810 opened this issue Jan 24, 2022 · 5 comments
Closed

ENS Avatar resolution fails if image metadata is set to IPFS link #2590

cpixy3810 opened this issue Jan 24, 2022 · 5 comments
Labels
investigate Under investigation and may be a bug.

Comments

@cpixy3810
Copy link

cpixy3810 commented Jan 24, 2022

Reproduction steps

const provider = new ethers.providers.JsonRpcProvider("<your url>");

const ENS = "vitalik.eth"

console.log(await provider.getAvatar(ENS));

Error:
Fetch API cannot load ipfs://ipfs/QmYTuHaoY1winNAxmf7JmCmSrkChuMAAnqgSuJBTiWZe9f. URL scheme "ipfs" is not supported.

Metadata URL: https://metadata.ens.domains/mainnet/avatar/vitalik.eth/meta

Thanks for your help :)

@cpixy3810 cpixy3810 added the investigate Under investigation and may be a bug. label Jan 24, 2022
@ricmoo
Copy link
Member

ricmoo commented Jan 24, 2022

This is a duplicate of another issue, and I have fixed it locally.

This is only an issue for IPFS links which use an invalid URI. But due to the wide use of the specific invalid format and because it does not conflict with correct URIs, support will be published soon.

@ricmoo
Copy link
Member

ricmoo commented Jan 24, 2022

Found it. See #2271. :)

@cpixy3810
Copy link
Author

Thanks!

@ricmoo
Copy link
Member

ricmoo commented Jan 31, 2022

This should be fixed as of 5.5.4. Try it out and let me know if there are still any issues.

Thanks! :)

@cpixy3810
Copy link
Author

Just in time! Works like a charm, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug.
Projects
None yet
Development

No branches or pull requests

2 participants