tswast / dat-pin-box

Pin Dat archives on a Raspberry Pi.
Apache License 2.0
2 stars 0 forks source link

Known Issue: TimeoutError the second time dat-pin-box is run with webrun #10

Open tswast opened 6 years ago

tswast commented 6 years ago

Consistently, I get a TimeoutError the second time I run index.js with webrun.

$ webrun 'index.js?pin=dat://464b000900de29e2f02e1c304abb70de0a94266cae55a5ca94bf1abae78839b6/'
(node:16195) ExperimentalWarning: vm.SourceTextModule is an experimental feature. This feature could change at any time
{ TimeoutError: Timed out
    at Timeout.setTimeout [as _onTimeout] (/Users/tswast/.nvm/versions/node/v10.10.0/lib/node_modules/@rangermauve/webrun/node_modules/@beaker/dat-node/lib/util.js:21:14)
    at ontimeout (timers.js:425:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10) name: 'TimeoutError', timedOut: true }

Deleting the .webrun folder and re-running resolves the issue. But, since I'd like dat-pin-box to be used for archival purposes, not just seeding, this is quite a problem.

First reported at https://github.com/RangerMauve/webrun/issues/2#issuecomment-421050184

@RangerMauve did you end up filing an issue in hyperdrive or beaker for this? I think it affects follow-seeder too. I don't get the same TimeoutError message, but I do get Unable to seed /posts/ in dat://6e96b27838c76991ac3563f729beb7c6e6c362fe369793784cd1c729b2b37299 the second time I run it.


Operating system: macOS 10.13.6 Node.js: v10.10.0 webrun: 2.1.2

tswast commented 6 years ago

Found https://github.com/beakerbrowser/beaker/issues/1153

I guess the workaround is to ignore TimeoutError if it's already downloaded?

RangerMauve commented 6 years ago

That's the current workaround, but it's a bug in hypecore resulting from a todo for logic on what to do if you have no peers.

I was going to try to get around to it this weekend, but I'm not 100% sure I'll have time anymore. 😅