hypercore-protocol / hyperdrive-daemon

Hyperdrive, batteries included.
MIT License
156 stars 23 forks source link

daemon starts, status 'not running', and force-unmount fails #80

Open karlmoubarak opened 4 years ago

karlmoubarak commented 4 years ago

Describe the bug I installed the daemon based on the documentation. Fuse setup was successful. Creating a drive was successful. Then I installed Beaker, and viewing the drive in beaker worked.

Later in the day, the contents of ~/Hyperdrive disappeared. Trying hyperdrive status said the daemon was not running. And then:

karl @ 15:16:03 → hyperdrive start
✔ Hyperdrive daemon listening on localhost:3101
karl @ 15:21:00 → hyperdrive status
The Hyperdrive daemon is not running.
karl @ 15:21:07 → hyperdrive stop
✔ The Hyperdrive daemon has been stopped.

and so I tried to force-unmount:

karl @ 15:21:11 → hyperdrive force-unmount
Password:
Unmount failed for /Users/km/Hyperdrive
Error: Command failed: sudo diskutil unmount /Users/km/Hyperdrive
Unmount failed for /Users/km/Hyperdrive
    at ForceUnmountCommand.run (/usr/local/lib/node_modules/hyperdrive-daemon/node_modules/hyperdrive-daemon-client/bin/commands/force-unmount.js:14:7)
    at ForceUnmountCommand._run (/usr/local/lib/node_modules/hyperdrive-daemon/node_modules/@oclif/command/lib/command.js:43:31)

The log.json file reports that this is because the mountpoint is in use by Beaker. So I quit beaker, and retried, but the same error is reproduced.

Beaker doesn't launch anymore, stuck at Failed to connect to daemon, retrying:

Screenshot 2020-06-22 at 15 42 44

At some point the whole thing got a bit messy so I uninstalled the daemon, uninstalled Beaker, removed the ~/.hyperdrive folder, and restarted my computer.

Re-installing the daemon and trying everything again reproduces the same errors.

To Reproduce

npm install -g hyperdrive-daemon
hyperdrive start
hyperdrive status
hyperdrive stop
hyperdrive force-unmount

Expected Behavior I expected status to report the daemon was running after start. I expected force-unmount to work after quitting Beaker.

OS MacOS Catalina 10.15.5

Node version v12.18.1

Was the daemon installed from NPM or bundled with Beaker? Daemon was installed with NPM, and Beaker was installed afterwards.

aadilayub commented 4 years ago

I'm facing the same error, except I don't have FUSE set up on my machine, so don't have the unmount errors.

OS: Fedora 32 Node version: 14.8.0