dat-ecosystem-archive / dat-doctor Goto Github PK
View Code? Open in Web Editor NEW:hospital: extension for dat [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
:hospital: extension for dat [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
When installing dat
, I got a warning about crypto
:
$ mkdir foo && cd foo && npm init --yes
$ npm i dat
npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
...
+ [email protected]
added 333 packages in 6.364s
It appears that dat-doctor
is using the crypto
module:
$ npm ls crypto
[email protected] /Users/z/Desktop/foo
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]
However when I clone the dat-doctor repo and npm install, I don't see crypto
, even though it's the same version 1.3.0 that dat
is using...
~/git/forks/dat-doctor master
$ npm ls crypto
[email protected] /Users/z/git/forks/dat-doctor
└── (empty)
🤔
Right now if you run it as dat-doctor directly it'll be confusing because of #4.
for all combos of:
and
we should run all the above combos when running doctor, with different ports/peer ids/swarms each time, so you know exactly which options work/dont work for you
I am reporting: a bug
Please give us details about your installation to assist you. Run dat -v
to see the version of Dat you are using.
unsure
dat Dat DEBUG mode engaged, enabling quiet mode +0ms
dat dat 13.13.1 +7ms
dat node v12.3.1 +0ms
Welcome to Dat Doctor!
Software Info:
linux x64
Node v12.3.1
Dat Doctor v2.1.2
dat v2019-05-28T14:52:34.350Z dat Dat DEBUG mode engaged, enabling quiet mode
Running Basic Tests (Checks your Dat installation and network setup)
✔ Your address is: 89.39.107.210:49791
✔ Loaded native modules
⠼ Pinging the Dat Doctor dat-doctor ERROR - Default Dat port did not work (3282), using random port +0ms
✔ Resolved Dat Doctor Server
⠼ Looking for Doctor on the Dat network... dat-doctor Discovered doctor, 45.55.78.106:8887 +0ms
dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +1ms
⠙ Connecting to Dat Doctor, 45.55.78.106:8887 dat-doctor Connection established to doctor +575ms
⠼ Connected to Dat Doctor! dat-doctor Connection closed +183ms
/usr/local/lib/node_modules/dat/node_modules/discovery-swarm/index.js:455
server.on('error', onerror)
^
TypeError: Cannot read property 'on' of null
at Swarm.listen (/usr/local/lib/node_modules/dat/node_modules/discovery-swarm/index.js:455:12)
at runPublicPeerTest (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/public-test.js:33:6)
at publicPeerTask (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:99:5)
at Task.task (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:48:9)
at /usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:135:28
at Task.skip (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:57:16)
at Task.run (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:134:8)
at runTask (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:55:18)
at taskDone (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:66:9)
at done (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:149:14)
Beaker uses 3282 so we get error if try to use doctor when beaker is open. Should we try other ports? Or do we want to try to use the same port that beaker/CLI will use.
I initially reported this via twitter, but here's more info:
$ DEBUG=dat*,discovery* npx dat doctor
dat Dat DEBUG mode engaged, enabling quiet mode +0ms
dat dat 13.11.5 +7ms
dat node v10.13.0 +0ms
Welcome to Dat Doctor!
Software Info:
darwin x64
Node v10.13.0
Dat Doctor v2.1.1
dat v2019-02-20T16:08:50.615Z dat Dat DEBUG mode engaged, enabling quiet mode
To start a new Peer-to-Peer test, press ENTER.
Otherwise enter test ID.
>
✔ Your address is: 173.249.34.138:58056
✔ Loaded native modules
discovery-channel whoami() started +0ms
discovery-channel chan=396232..66 join() +1ms
Running a new Peer-to-Peer test
To check connectivity with another computer, run the command:
dat doctor 9b201cc2546e1a2c16d4f7ee9852993242f7ea8b307d8ec0674eb1767a9a3b4f
Waiting for incoming connections... discovery-channel whoami() succeeded, I am: { port: 3282, host: '173.249.34.138' } +353ms
discovery-channel chan=396232..66 dns announce { port: 3282, publicPort: 3282, multicast: false } +3ms
discovery-channel chan=396232..66 dns discovery peer=10.6.6.197:51174 +25s
dat-doctor Discovered 10.6.6.197:51174 +0ms
discovery-swarm connecting 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +0ms
Trying to Connect:
10.6.6.197:51174 discovery-swarm timeout 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +590ms
discovery-swarm connecting 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1s
discovery-swarm timeout 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +509ms
discovery-swarm connecting 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +1s
discovery-swarm timeout 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +502ms
discovery-swarm connecting 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=3 +5s
discovery-swarm timeout 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +514ms
discovery-swarm connecting 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=4 +15s
discovery-channel chan=396232..66 dns announce { port: 3282, publicPort: 3282, multicast: true } +37s
discovery-channel chan=396232..66 dns discovery peer=10.6.6.197:51174 +2ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:51174 +140ms
dat-doctor Discovered 173.249.34.138:51174 +38s
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +1s
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:3282 +0ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:51174 +77ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:3282 +0ms
10.6.6.197:51174
173.249.34.138:51174 discovery-swarm timeout 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +2s
discovery-swarm onclose utp+tcp 10.6.6.197:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +525ms
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +965ms
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +1s
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1s
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +510ms
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +1s
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +507ms
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=3 +5s
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +1s
discovery-channel chan=396232..66 dns discovery peer=10.6.6.197:51197 +27s
dat-doctor Discovered 10.6.6.197:51197 +27s
discovery-swarm connecting 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +5s
173.249.34.138:51174
10.6.6.197:51197 discovery-swarm timeout 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +496ms
discovery-swarm connecting 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1s
discovery-swarm timeout 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm onclose utp+tcp 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +502ms
discovery-swarm connecting 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +1s
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=4 +1s
discovery-swarm timeout 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +2s
discovery-swarm onclose utp+tcp 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +507ms
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +969ms
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +535ms
discovery-swarm connecting 10.6.6.197:51197@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=3 +3s
$ DEBUG=dat*,discovery* npx dat doctor 9b201cc2546e1a2c16d4f7ee9852993242f7ea8b307d8ec0674eb1767a9a3b4f
dat Dat DEBUG mode engaged, enabling quiet mode +0ms
dat dat 13.11.5 +7ms
dat node v10.13.0 +1ms
Welcome to Dat Doctor!
Software Info:
darwin x64
Node v10.13.0
Dat Doctor v2.1.1
dat v2019-02-20T16:11:53.045Z dat Dat DEBUG mode engaged, enabling quiet mode
✔ Your address is: 173.249.34.138:52538
The default Dat port (3282) in use, using random port.
This may impact Dat's connectivity if you have a firewall.
✔ Loaded native modules
discovery-channel whoami() started +0ms
discovery-channel chan=396232..66 join() +1ms
discovery-channel chan=396232..66 dns discovery peer=10.6.6.197:3282 +5ms
dat-doctor Discovered 10.6.6.197:3282 +0ms
discovery-swarm connecting 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +0ms
Joining existing Peer-to-Peer test:
dat doctor 9b201cc2546e1a2c16d4f7ee9852993242f7ea8b307d8ec0674eb1767a9a3b4f
Trying to Connect:
10.6.6.197:3282 discovery-channel whoami() succeeded, I am: { port: 51197, host: '173.249.34.138' } +217ms
discovery-channel chan=396232..66 dns announce { port: 51197, publicPort: 51197, multicast: false } +3ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:3282 +147ms
dat-doctor Discovered 173.249.34.138:3282 +366ms
10.6.6.197:3282
173.249.34.138:3282 discovery-swarm connecting 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +367ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:51174 +1ms
dat-doctor Discovered 173.249.34.138:51174 +1ms
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=0 +1ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:51174 +73ms
discovery-channel chan=396232..66 dns discovery peer=173.249.34.138:3282 +1ms
173.249.34.138:3282
173.249.34.138:51174 discovery-swarm timeout 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm timeout 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +369ms
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +0ms
discovery-swarm onclose utp+tcp 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +128ms
discovery-swarm onclose utp+tcp 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +0ms
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +0ms
discovery-swarm connecting 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1s
discovery-swarm connecting 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1ms
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=1 +1ms
discovery-swarm timeout 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm timeout 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +1ms
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +0ms
discovery-swarm onclose utp+tcp 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +501ms
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +0ms
discovery-swarm onclose utp+tcp 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +0ms
discovery-swarm connecting 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +1s
discovery-swarm connecting 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +1ms
discovery-swarm connecting 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 retries=2 +0ms
discovery-swarm timeout 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +3s
discovery-swarm timeout 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +0ms
discovery-swarm timeout 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 +0ms
discovery-swarm onclose utp+tcp 173.249.34.138:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +500ms
discovery-swarm onclose utp+tcp 173.249.34.138:51174@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +1ms
discovery-swarm onclose utp+tcp 10.6.6.197:3282@39623230316363323534366531613263313664346637656539383532393933323432663765613862333037643865633036373465623137363761396133623466 will-requeue=1 +0ms
I'm using ProtonVPN as my VPN, but I'm guessing any VPN will trigger this. Let me know if you need more info.
Welcome to Dat Doctor!
Software Info:
darwin x64
Node v11.0.0
Dat Doctor v2.1.0
dat v13.11.4
Running Basic Tests (Checks your Dat installation and network setup)
✔ Your address is: 198.51.100.5:62456
✖ Error loading native modules
Unable to load utp-native.
This will make it harder to connect peer-to-peer.
✔ Resolved Dat Doctor Server
⠼ Connecting to Dat Doctor, 45.55.78.106:8887/usr/local/lib/node_modules/dat/node_modules/discovery-swarm/index.js:456
server.on('error', onerror)
^
TypeError: Cannot read property 'on' of null
at Swarm.listen (/usr/local/lib/node_modules/dat/node_modules/discovery-swarm/index.js:456:12)
at runPublicPeerTest (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/public-test.js:32:6)
at publicPeerTask (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:92:5)
at Task.task (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:47:9)
at /usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:135:28
at Task.skip (/usr/local/lib/node_modules/dat/node_modules/dat-doctor/lib/tasks-default.js:50:35)
at Task.run (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:134:8)
at runTask (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:55:18)
at taskDone (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:66:9)
at done (/usr/local/lib/node_modules/dat/node_modules/neat-tasks/index.js:149:14)
on a university wifi with latest dat
🐈 dat doctor
[info] Testing connection to public peer
[error] Default Dat port did not work (3282), using random port
[error] FAIL - Connection timeout, fail.
[error] FAIL - Connection timeout, fail.
[error] FAIL - Unable to connect to public server.
[error] FAIL - Data was not echoed back from public server.
Assertion failed: (!uv__io_active(&handle->io_watcher, POLLIN | POLLOUT)), function uv__udp_finish_close, file ../deps/uv/src/unix/udp.c, line 67.
Abort trap: 6
cc @mafintosh
I am reporting: a bug or unexpected behavior
dat doctor --port 8989
and select the peer-to-peer testShould use the specified port as it’s the only one that allows incoming connections.
Output to include: Your address is: <your-ip>:8989
Output includes: Your address is: <your-ip>:<random-port>
This shouldn't happen: dat-ecosystem-archive/dat-node#147 (comment)
May also be an issue in discovery swarm, but we can also fix it here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.