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

Daemon bootstrap error #1066

Closed
richardschneider opened this issue Nov 10, 2017 · 1 comment
Closed

Daemon bootstrap error #1066

richardschneider opened this issue Nov 10, 2017 · 1 comment

Comments

@richardschneider
Copy link
Contributor

When running js-ipfs on windows, I get the following error.

C:\Users\Owner\Documents\GitHub\js-ipfs>node src\cli\bin.js daemon
Initializing daemon...
Swarm listening on /p2p-circuit/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
Swarm listening on /p2p-circuit/ip4/0.0.0.0/tcp/4002/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
Swarm listening on /p2p-circuit/ip4/127.0.0.1/tcp/4003/ws/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
Swarm listening on /ip4/192.168.178.21/tcp/4002/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/QmV7Nosg5JQPSunFLc2NR4RKRkNzFmMXPw9VtHUx4qsz7i
API is listening on: /ip4/127.0.0.1/tcp/5002
Gateway (readonly) is listening on: /ip4/127.0.0.1/tcp/9090
Daemon is ready
C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\bs58\node_modules\base-x\index.js:52
    if (string.length === 0) return Buffer.allocUnsafe(0)
               ^

TypeError: Cannot read property 'length' of null
    at decodeUnsafe (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\bs58\node_modules\base-x\index.js:52:16)
    at Object.decode (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\bs58\node_modules\base-x\index.js:80:18)
    at Object.fromB58String (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\multihashes\src\index.js:68:27)
    at Function.exports.createFromB58String (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\peer-id\src\index.js:159:24)
    at bootstrapers.forEach (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\libp2p-railing\src\index.js:28:31)
    at Array.forEach (<anonymous>)
    at Timeout.interval.setInterval [as _onTimeout] (C:\Users\Owner\Documents\GitHub\js-ipfs\node_modules\libp2p-railing\src\index.js:25:25)
    at ontimeout (timers.js:471:11)
    at tryOnTimeout (timers.js:306:5)
    at Timer.listOnTimeout (timers.js:266:5)

C:\Users\Owner\Documents\GitHub\js-ipfs>
@richardschneider
Copy link
Contributor Author

richardschneider commented Nov 11, 2017

This is my fault. I have a test that writes an invalid value to the Bootstrap confilg. go-ipfs errors this, js-ipfs does not. The value /ip4/25.196.147.100/tcp/4001 is invalid because its missing /ipfs/Qm....

It might be a good idea to have libp2p-railing guard against this condition.

richardschneider added a commit to richardschneider/net-ipfs-http-client that referenced this issue Nov 11, 2017
js-ipfs does NOT check IPFS addresses. And this bad addr eventually breaks the server.

See ipfs/js-ipfs#1066
stevefan1999-personal pushed a commit to stevefan1999-personal/net-ipfs-core that referenced this issue Mar 12, 2023
js-ipfs does NOT check IPFS addresses. And this bad addr eventually breaks the server.

See ipfs/js-ipfs#1066
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

1 participant