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

Cannot read property 'wires' of null #324

Closed
Froren opened this issue May 22, 2015 · 1 comment
Closed

Cannot read property 'wires' of null #324

Froren opened this issue May 22, 2015 · 1 comment
Labels
bug

Comments

@Froren
Copy link

@Froren Froren commented May 22, 2015

I've been able to run webtorrent with node on windows with a lot of success.

Recently I tried it on 2 different ubuntu servers (13.10 and 14.~), but I've been receiving these error messages and I'm not sure why:

/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:184
  self.swarm.wires.splice(self.swarm.wires.indexOf(self.wire), 1)
            ^
TypeError: Cannot read property 'wires' of null
    at Peer.destroy (/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:184:13)
    at Wire.destroy (/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:91:10)
    at Wire.g (events.js:175:14)
    at Wire.EventEmitter.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:352:12)
    at afterWrite (_stream_writable.js:272:5)
    at _stream_writable.js:259:9
    at process._tickCallback (node.js:415:13)

and

/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:184
  self.swarm.wires.splice(self.swarm.wires.indexOf(self.wire), 1)
            ^
TypeError: Cannot read property 'wires' of null
    at Peer.destroy (/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:184:13)
    at Timer.ontimeout (/var/pnode/node_modules/webtorrent/node_modules/bittorrent-swarm/lib/peer.js:171:57)

I've also seen a lot more ECONNRESET errors that didn't seem to show up when I was running it on Windows.. any ideas what could be causing this?

@feross feross added the bug label May 25, 2015
@feross feross closed this Jun 12, 2015
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jun 12, 2015

Fixed in bittorrent-swarm 5.0.3. webtorrent should inherit the fix if you're running the latest version and you run npm update.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.