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

ipfs.files.get never calls the callback for files that aren't in the network #1314

Closed
@justinmchase

Description

@justinmchase
  • Version:
    js-ipfs version: 0.28.2-
    Repo version: 6
    System version: x64/linux
    Node.js version: v8.9.4
  • Platform:
    Linux justin-pc 4.4.0-17643-Microsoft Read file error on Windows #1000-Microsoft Thu Apr 05 15:09:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem:
    Unknown

Type:

Question

Severity:

Medium

Description:

I am just doing some testing and I went here to find some test images on the network:
https://www.reddit.com/domain/ipfs.pics

But using the hashes of these images using the api ipfs.files.get is never calling my callback. In other cases where the images do exist I successfully get images back.

Question:

What is the average / max times it could take to find a file in the network? Will the call to ipfs.files.get timeout eventually? If so how can I set the timeout value and what is the default?

Steps to reproduce the error:

This Never Calls the Callback

const cid = 'QmNdi3iaWYDoz91Szu6M4zH7r9Qom7bCrb2YyhLvjcp8TH'
ipfs.files.get(cid, (err, files) => {
    if (err) return console.log(err)
    console.log(files)
})

This Succeeds Pretty Quickly

const cid = 'QmQ2r6iMNpky5f1m4cnm3Yqw8VSvjuKpTcK1X7dBR1LkJF'
ipfs.files.get(cid, (err, files) => {
    if (err) return console.log(err)
    console.log(files) // two files, folder and cat.gif
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions