WEEK 9 & 10 QUESTIONS | May 31 - June 13, 2021 (times are in EST)
This is a rollup for weeks 9 & 10! I’ve attempted to highlight interesting or common questions. I’ve also connected these items to either their direct solution, or a related issue on Github. This will be how these reports will be formatted from now on . There’s a fair amount of content buried in here, I hope you enjoy!
Questions, Items, and Issues
js-ipfs dht.findProvs: TypeError: key.toBaseEncodedString is not a function
(js-ipfs#3502)
I’ve noticed at least a couple users ran into this issue:
- javascript - Js-IPFS Error: cid.toBaseEncodedString() is not a function - Stack Overflow
- Does anyone know if it is possible to “findProvs” with js-ipfs in the browser? The goal would be to know how many peers there are for a cid
Observation:
Currently the issue related to this is closed. I’m pretty sure it’s recommended to stay away from using DHT in js-ipfs for the time being .
Adam Faturahman asked on StackOverflow: UnhandledPromiseRejectionWarning: InvalidRepoVersionError: Incompatible repo versions. (IPFS-JS 0.55.3)-(NODE JS 14.17.0) (js-ipfs#3717)
UnhandledPromiseRejectionWarning: InvalidRepoVersionError: Incompatible repo versions. Automatic migrations disabled. Please migrate the repo manually.
Observation:
I’ve personally run into a corrupted repo. This appears to be a migration issue, not sure why. The easiest solution to me seems to be a feature that allows the developer to programmatically re-initialise a repo, or delete it. I’d love to hear more thoughts on this!
How do I get peers using js-ipfs in the browser? (Create a simple chat app)
I noticed at least 3 questions in this period possibly asking something along these lines (though I lost a link due to a room migration):
- Pubsub peers connected but not receiving messages - StackOverflow
- When i am uploading a file on ipfs and then using its hash and opening in another tab its not opening.Can anyone help me to solve this issue?
Observation:
I linked “Create a simple chat app” above, a new docs page explaining how to discover and communicate with peers using js-ipfs in the browser.
Fayne Aldan asked in #ipfs: Does anyone know what I’d do if I want to host a gateway? (ipfs-docs#788)
I believe this question was actually featured in the last rollup, but now it has an issue attached .
Observation:
Now there’s an issue open to get a nice doc explaining how to setup your very own gateway! Just in case though, I’m going to quote my previous answer too:
You actually get the gateway from your very own local gateway! You might have noticed you can access your own local gateway with URLs like http://ipfs.io.ipns.localhost:8080. Well, it’s actually that very gateway that you’d configure and use! To enable SSL, you simply use Nginx as a reverse proxy, and there are plenty of guides online about how to do that. Using Nginx, you can also give your gateway a publicly accessible address but be warned, there’s no telling how popular your public gateway might get, and consume all your bandwidth .
nickreserved asked on the forums: Download stopped (go-ipfs#8192)
Observation:
I would have imagined the blocks would be downloaded in the background after the failure, as they’re available anyways. I’m unsure if this mechanism actually exists though, so I filed the linked issue above . If anyone has more insight on what’s going on, your input would be greatly appreciated.
Discordian asked on the forums: How do I get peer’s IP when using Nginx reverse proxy? (go-ipfs#8193)
Observation:
It’s me! I’ve been quite stumped on this issue. This is one where I’d personally love some ideas .