Closed ski closed 3 years ago
Can you try the prev version 1.0.1?
@RangerMauve
I could reproduce the error here: https://github.com/RangerMauve/hyperswarm-web/pull/8
By destroying the hyperswarm-proxy it deletes the network property: https://github.com/RangerMauve/hyperswarm-proxy/blob/master/server.js#L226
but for some reasons (randomly) keep doing a ping here: https://github.com/RangerMauve/hyperswarm-proxy/blob/master/server.js#L126
A quick solution is to check for the network to be null.
I'm super busy with contracts right now. Would anyone be up for submitting a PR based on @tinchoz49 's comments?
@ski would you feel comfortable giving it a shot?
Huge thanks for the fix @tinchoz49 !
Released in 2.0.2 😁
The application crashes when close() is called on Hypercore. I get the following stack trace when close is called.
`Listening on ws://localhost:4977 -> Proxy available on ws://localhost:4977/proxy -> Signal available on ws://localhost:4977/signal /usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/server.js:133 const boundPort = this.network.address().port ^
TypeError: Cannot read property 'address' of null at /usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/server.js:133:38 at /usr/lib/node_modules/hyperswarm-web/node_modules/@hyperswarm/discovery/index.js:262:9 at Object.callback (/usr/lib/node_modules/hyperswarm-web/node_modules/dht-rpc/index.js:196:7) at IO._finish (/usr/lib/node_modules/hyperswarm-web/node_modules/dht-rpc/lib/io.js:157:9) at IO._onmessage (/usr/lib/node_modules/hyperswarm-web/node_modules/dht-rpc/lib/io.js:115:14) at UTP.emit (events.js:315:20) at UTP._onmessage (/usr/lib/node_modules/hyperswarm-web/node_modules/utp-native/index.js:199:8)`
I was just trying out the dat-sdk workshop code :
`const sdk = await window.datSDK(); const { Hypercore, close // <-- Make sure to call this when you're done } = sdk
What can I do to fix this issue? Thank you for your help. su./hail