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

object.links returns Promise that is never fulfilled or rejected #2922

Open
tniessen opened this issue Mar 12, 2020 · 0 comments
Open

object.links returns Promise that is never fulfilled or rejected #2922

tniessen opened this issue Mar 12, 2020 · 0 comments

Comments

@tniessen
Copy link

@tniessen tniessen commented Mar 12, 2020

Local API server:

go-ipfs version: 0.4.23-
Repo version: 7
System version: amd64/windows
Golang version: go1.13.7

I am using ipfs-http-client@42.0.0 with Node.js v13.11.0 and npm 6.13.7, also in amd64/windows. All three versions are the latest published versions. Consider this JavaScript code:

const ipfs = require('ipfs-http-client')('http://localhost:5001');

function test(hash) {
  ipfs.object.links(hash)
  .then(() => console.log('fulfilled'))
  .catch(() => console.error('error'));
}

This outputs fulfilled as expected:

test('QmTLecu8KRTHZ1K9AQCHoHgN8VjEi3Rh3dERRTKwarSYAX')

However, this just ends the process, without fulfilling or rejecting the Promise, so neither fulfilled nor error is printed:

test('QmdiUaSSNNGpimxaGxrJBbb5RJKoRLRqD6qxb8DJ7cRa3R')

There are no code changes, just the hash changes.

I am able to access both objects using ipfs object links (using go-ipfs), and through curl http://127.0.0.1:5001/api/v0/object/links/....

Am I missing something? Even if I messed up somewhere, I would expect the Promise to at least be rejected.

Please let me know what information I can provide, or how I can approach this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.