Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

IPNS Resolves only CLI, not Gateway #3793

Closed
johnnyshankman opened this issue Aug 6, 2021 · 3 comments
Closed

IPNS Resolves only CLI, not Gateway #3793

johnnyshankman opened this issue Aug 6, 2021 · 3 comments

Comments

@johnnyshankman
Copy link

johnnyshankman commented Aug 6, 2021

  • Version:
    0.56.1

  • Platform:
    OSX Mojave

  • Subsystem:

Severity:

Medium

Description:

I cannot get IPNS content that resolves locally in the CLI to resolve on the gateway even after waiting 24hrs for propagation.

I added and pinned content to IPFS successfully.

I then used name publish to reference that content via IPNS.

○ → jsipfs name publish QmbatBaJZCpEDoDx8CrFSM4NVaH9MnbbGL58JonoJaNnCu
Published to QmfSPG1QgJM9oEHsLvH1rZ4qH7WESGjiq1p5TZuXdg6b4f: /ipfs/QmbatBaJZCpEDoDx8CrFSM4NVaH9MnbbGL58JonoJ

The IPFS Gateway resolves original IPFS pinned content
https://ipfs.io/ipfs/QmbatBaJZCpEDoDx8CrFSM4NVaH9MnbbGL58JonoJaNnCu

CLI resolves the IPNS reference:

○ → jsipfs resolve -r /ipns/QmfSPG1QgJM9oEHsLvH1rZ4qH7WESGjiq1p5TZuXdg6b4f
/ipfs/QmbatBaJZCpEDoDx8CrFSM4NVaH9MnbbGL58JonoJaNnCu

but Gateways refuse to resolve:
https://ipfs.io/ipns/QmfSPG1QgJM9oEHsLvH1rZ4qH7WESGjiq1p5TZuXdg6b4f
https://gateway.ipfs.io/ipns/QmfSPG1QgJM9oEHsLvH1rZ4qH7WESGjiq1p5TZuXdg6b4f

It loads for a few minutes then eventually times out and says:

ipfs resolve -r /ipns/QmfSPG1QgJM9oEHsLvH1rZ4qH7WESGjiq1p5TZuXdg6b4f: could not resolve name

Which is the exact command that resolves for me using the CLI.
Daemon is running the whole time, I have 5 peers.

Also not sure how I'm supposed to access file using 127.0.0.1 webui

Steps to reproduce the error:

$ jsipfs add -r somedirectory
# returns <the_ipfs_hash>
$ jsipfs pin add <the_ipfs_hash>
$ jsipfs name publish <the_ipfs_hash>
# returns a peer ID for IPNS that never resolves on gateway
@johnnyshankman johnnyshankman added the need/triage Needs initial labeling and prioritization label Aug 6, 2021
@lidel
Copy link
Member

lidel commented Aug 13, 2021

@johnnyshankman please reinstall (update to the latest patch of js-ipfs) – it should include relevant IPNS fix, then you need to republish IPNS record using the latest version.

lmk if this helped.

@lidel lidel added the need/author-input Needs input from the original author label Aug 13, 2021
@ipfs ipfs deleted a comment from welcome bot Aug 13, 2021
@carlosdp
Copy link

Doesn't seem to be working still, latest patch

@lidel lidel added need/analysis Needs further analysis before proceeding and removed need/author-input Needs input from the original author labels Sep 10, 2021
@lidel
Copy link
Member

lidel commented Sep 10, 2021

Ok, it seems the problem you are experiencing is caused by the lack of full DHT support in js-ipfs (see #3722).
go-ipfs running on gateways is unable to resolve IPNS record because js-ipfs is only publishing on pubsub, which is not enabled by default in go-ipfs (you need to opt-in on your node – https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipns-pubsub).

tldr blocked by #3722 ← lets continue there

@lidel lidel removed need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization labels Sep 10, 2021
@lidel lidel closed this as completed Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants