{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/76","labels_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/76/comments","events_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/76/events","html_url":"https://github.com/ipfs/js-ipfs-api/issues/76","id":112005015,"number":76,"title":"findprovs returns object or string","user":{"login":"VictorBjelkholm","id":459764,"avatar_url":"https://avatars.githubusercontent.com/u/459764?v=3","gravatar_id":"","url":"https://api.github.com/users/VictorBjelkholm","html_url":"https://github.com/VictorBjelkholm","followers_url":"https://api.github.com/users/VictorBjelkholm/followers","following_url":"https://api.github.com/users/VictorBjelkholm/following{/other_user}","gists_url":"https://api.github.com/users/VictorBjelkholm/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorBjelkholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorBjelkholm/subscriptions","organizations_url":"https://api.github.com/users/VictorBjelkholm/orgs","repos_url":"https://api.github.com/users/VictorBjelkholm/repos","events_url":"https://api.github.com/users/VictorBjelkholm/events{/privacy}","received_events_url":"https://api.github.com/users/VictorBjelkholm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-18T07:10:02Z","updated_at":"2015-11-18T15:20:05Z","closed_at":null,"body":"using the method `ipfs.dht.findprovs` in node environment does not work like one would expect. Using the following code:\r\n```\r\nvar ipfsAPI = require('ipfs-api')\r\n\r\nvar ipfs = ipfsAPI('localhost', '5001')\r\n\r\nconst hash = \"QmXFmCEhamPHvpbzQ3HMFABrpAXgE7D9jzp6QtvyC8Xp55\"\r\n\r\nipfs.dht.findprovs(hash, (err, res) => {\r\n\tif(err) throw err\r\n\tconsole.log(res)\r\n\tconsole.log(typeof res)\r\n\tconsole.log(\"Streamable?\", !!res.readable)\r\n\tconsole.log('So what to do with `res` here?')\r\n})\r\n```\r\n\r\nI get the following output sometimes (which works correctly):\r\n```\r\nobject\r\nStreamable? false\r\nSo what to do with `res` here?\r\n```\r\nbut other times, it returns this (which is neither streamable or valid json)\r\n```\r\nstring\r\nStreamable? false\r\nSo what to do with `res` here?\r\n```\r\n\r\nOriginally open issue https://github.com/ipfs/go-ipfs/issues/1851 on go-ipfs but seems to be a bug in this library."},"comment":{"url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/comments/157745884","html_url":"https://github.com/ipfs/js-ipfs-api/issues/76#issuecomment-157745884","issue_url":"https://api.github.com/repos/ipfs/js-ipfs-api/issues/76","id":157745884,"user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars.githubusercontent.com/u/1211152?v=3","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T15:20:05Z","updated_at":"2015-11-18T15:20:05Z","body":"Is this still a issue with the latest changes? Could you confirm @VictorBjelkholm ?"}}