hyperdrive-daemon: Unable to install hyperdrive-daemon on a Raspberry Pi

Describe the bug I’ve managed to get the hyperdrive-daemon working on macOS by installing latest Fuse and switching to Node 12 and it’s working fantastic.

But I’m still having trouble installing the hyperdrive-daemon on a Raspberry Pi, without any issues. It’s hard to tell if the following error is the origin of the issue, since we npm only considers fuse-native an optional dependency, but it might be a clue.

I would love to get this working since I have a few rPi distributed in different places that I would like to have connected to each other so I can help debugging.

I have a rPi running at home, and I can provide you root ssh access if it would help debugging. Just let me know.

➜  ~ npm i hyperdrive-daemon@latest -g
/home/me/.node/bin/hyperdrive -> /home/me/.node/lib/node_modules/hyperdrive-daemon/bin/run/run

> fuse-native@2.2.1 install /home/me/.node/lib/node_modules/hyperdrive-daemon/node_modules/fuse-native
> node-gyp-build

make: Entering directory '/home/me/.node/lib/node_modules/hyperdrive-daemon/node_modules/fuse-native/build'
  CC(target) Release/obj.target/fuse/fuse-native.o
  SOLINK_MODULE(target) Release/obj.target/fuse.node
/usr/bin/ld: /home/me/.node/lib/node_modules/hyperdrive-daemon/node_modules/fuse-shared-library-linux/libfuse/lib/libfuse.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
make: *** [fuse.target.mk:142: Release/obj.target/fuse.node] Error 1
make: Leaving directory '/home/me/.node/lib/node_modules/hyperdrive-daemon/node_modules/fuse-native/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-1008-raspi
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/me/.node/lib/node_modules/hyperdrive-daemon/node_modules/fuse-native
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/hyperdrive-daemon/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fuse-native@2.2.1 (node_modules/hyperdrive-daemon/node_modules/fuse-native):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fuse-native@2.2.1 install: `node-gyp-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ hyperdrive-daemon@1.13.8
updated 1 package in 33.935s
➜  ~ node -v
v12.16.3
➜  ~ npm -v
6.14.4

To Reproduce npm install -g hyperdrive-daemon

Expected Behavior What did you expect to happen?

A working install of hyperdrive-daemon

** OS **

➜  ~ uname -a
Linux black 5.4.0-1008-raspi #8-Ubuntu SMP Wed Apr 8 11:13:06 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal

** Node version **

➜  ~ node -v
v12.16.3

** Was the daemon installed from NPM or bundled with Beaker? **

Installed via NPM

Add any other context about the problem here.

Noticed that the hyperdrive directory on home is never created either

Added a asciinema recording here: https://asciinema.org/a/ycJvsngG7P8RBtrMVmzAL7sW9

Important Note: Daemon errors are likely to be found in ~/.hyperdrive/log.json or ~/.hyperdrive/output.log (the latter is for unexpected, non-JSON output). These files might contain sensitive drive keys, so don’t upload the whole thing – just extract any stack traces or odd error messages!

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

To be clear though if you’re planning on using your raspberry pi as an always-online seeder, that command’s not gonna cut it (because it’s not going to eagerly sync changes from your main machine). To do that, you currently have to do something ugly involving running the export command (which watches the drive for changes) in the background.

Adding a mirror command that can be used for archiving or making always-online seeders is at the top of my non-bug-related feature list though 😃

@akavel Yep hyperdrive mirror (some-drive-key) and hyperdrive unmirror (some-drive-key) is exactly what the CLI usage will look like! I’ll definitely update this issue when it’s out 😃

Hey @akavel @erangell there’s no top-level issue tracking it at the moment, but I’ve added the necessary bits to Hyperdrive (this PR) so now it’s just a matter of adding an API method for it in the daemon.

Been trudging through bugs for a while, but this is at the top of the feature list for this week.

@andrewosh Uhh, not really sure what this means, I don’t yet really know anything about internal architecture of Hyper at all, but it sounds great and I’m really happy it apparently is close to being available! 😄 And more than that, that you cared so much that you let us know here in this issue! ❤️ ❤️ I understand that asking you to also kindly let us know once the… umm, what was it… API Method Is Added To The Daemon™ (assuming that this probably means I can write hyper mirror and there are some docs/help about how to use it?) might be too much of a stretch, but I’ll let myself still try and do it anyway, crossing fingers that you might have enough patience for us to drop by here once again when you’re done! 😋 💖

@andrewosh is there some issue somewhere that I could subscribe to to track the progress on the mirror command? I’d love it if I could have my RPi mirror and serve any stuff I created or archived/mirrored/hosted from a Beaker Browser running on my main PC!

I was able to successfully install on a raspberry pi, but the daemon seems to fail silently.

hyperdrive start
✔ Hyperdrive daemon listening on localhost:3101
hyperdrive status
The Hyperdrive daemon is not running.

EDIT: Looks like I’m OOM… I’ll retest with a fresh pi and post an update.

cat ~/.hyperdrive/log.json
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory