SAFE Drive - help with testing

SAFE Drive is a virtual drive giving access to your SAFE account (storage, public names and services) on your local hard drive, based on FUSE.

This topic is for people testing SAFE Drive on Linux, Windows or Mac.

If you would like to help with testing, please post a reply on this topic including the operating system(s) you would be willing to help with.

I will post details of releases and instructions on how to install them on this topic.

Starting points if you want to help:

  • dive in and play <- note to self (and you :smile: , if you want to edit this ‘wiki’ post): update this to point to the current ‘dive in’ instructions.

  • helping fix bugs and write code <- Introduce yourself there and we can discuss ways you can get involved

Related Projects

Reporting BUGS and Feature Requests

How to report problems or suggest enhancements.

Questions: If you have a question about how to get one of the test releases working please post on this topic. For anything not about testing and feedback please ask here.

BUGS: If you think you have found a bug, please report as noted below, and be sure to give enough information for the bug to be replicated, such as your operating system, all the steps needed to get to the bug, and sufficient details of what did/didn’t happen.

Sometimes copying and pasting text or uploading a screenshot can help a lot. And if you fancy debugging a bit, let me know, it isn’t that hard once you have the debugger running!

Reporting BUGs and possible enhancements:

  • If you have a github account, please go to github.com/theWebalyst/safenetwork-fuse/issues and click “New Issue”, but have a look at the existing issues first in case it has already been reported (there a search to help with that).

  • If you don’t have a github account, post on this topic and I’ll pick it up and create an issue for you.

Please give lots of details when reporting bugs!

12 Likes

Awesome work, Mark!

Excited to test on Windows.

4 Likes

Sounds like a very useful project!

I’m going through the tutorials to learn the basics and can take this for a spin on Ubuntu, Mac, and Windows in a bit.

5 Likes

Announcing SAFE Drive v0.1.0-rc2 for Linux x64

This is the first release for testing so expect bugs! :slight_smile: Currently it is only for Linux, but for Windows and Mac OS see the note at the end.

What this does

This gives you read-only access to your SAFE files, public names and services as if they were on your local hard drive (i.e. in ~/SAFE). For more on current and planned capabilities, see the SAFE FUSE topic on the community forum.

How to try SAFE FUSE for Linux

  1. Download the v0.1.0-rc2.zip file from github here or use this direct link to rc2
  2. Unzip the file to its own folder (e.g. right click on the .zip file and choose ‘Extract here’ on Ubuntu/GNOME)
  3. Install dependencies:
    sudo apt-get install libfuse-dev xdg-utils
  4. Start Peruse or SAFE Browser (any version should work).
  5. Log into your account.
  6. Open a command line console, cd to the folder your created and type ./mount-safe
  7. In another console, type ls ~/SAFE and so on. With luck you will see output similar to the following, but some commands may take a while to complete (see notes below):
    0-rc1-example
    NOTES:
  • to kill it, I recommend the following command
    pkill mount-safe; sudo umount ~/SAFE
    
  • this is very slow as no attempt has been made to optimise the code so you may find it takes a while to generate the output.

If you want to check the activity, you can run it with extra debug output as follows:

DEBUG=safe-fuse*,safenetworkjs* ./mount-safe

And if you want to capture the output, to help with a bug report for example:

DEBUG=safe-fuse*,safenetworkjs* ./mount-safe 2>&1 | tee debug.log

Bugs and Suggestions

If you want to report a bug or have suggestions for features and improvements see the OP above for how to do this.

If you just need help getting it working, reply to this topic.

Windows and Mac OS

If this release works on Linux I would like somebody (no special skills required) to try packaging this for Windows and/or Mac OS as I don’t have access to those at the moment.

Get in touch if you’d like to do this - I can give detailed instructions and help with any issues you encounter so it should be relatively straightforward.


UPDATES to the instructions:

  • added dependencies, step 3)
  • updated build to rc2: download link
  • changed dependency libfuse2 to libfuse-dev, step 3)
5 Likes

Thanks to @bzee I think we have a working build for Linux.

If you tried rc1, check out the updated download above for rc2.

1 Like

Just tried it on Ubuntu 18.04.1 and Peruse 0.7.0. I’m getting errors on step #6 when executing ./mount-safe:

tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ ./mount-safe 
ERROR:  { Error: ENOENT: no such file or directory, open '/home/tom/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64/node_modules/@maidsafe/safe-node-app/src/native/mock/libsafe_app.so'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.openSync (pkg/prelude/bootstrap.js:483:32)
    at Object.fs.readFileSync (fs.js:551:33)
    at fs.readFileSync (pkg/prelude/bootstrap.js:679:36)
    at new DynamicLibrary (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/node_modules/ffi/lib/dynamic_library.js:67:21)
    at Object.DynamicLibrary (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/node_modules/ffi/lib/dynamic_library.js:33:12)
    at Object.ffi.init (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/native/lib.js:20:15)
    at new SAFEApp (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/app.js:36:9)
    at Object.initializeApp (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/node_modules/@maidsafe/safe-node-app/src/index.js:61:25)
    at authorise (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/bootstrap.js:0:0)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/tom/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64/node_modules/@maidsafe/safe-node-app/src/native/mock/libsafe_app.so' }
(node:5338) UnhandledPromiseRejectionWarning: Error: SafeContainer initialise failed: _public (Cannot read property 'getContainer' of undefined)
    at PublicContainer.initialise (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safe-containers.js:0:0)
    at SafenetworkApi.getSafeContainer (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safenetwork-api.js:0:0)
    at RootHandler.initRootContainer (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at new RootHandler (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at SafeVfs.mountContainer (/snapshot/safenetwork-fuse/src/safe-vfs/index.js:0:0)
    at safeJsApi.bootstrap.then.safeVfs.mountFuse.then._ (/snapshot/safenetwork-fuse/bin.js:0:0)
    at <anonymous>
(node:5338) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:5338) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5338) UnhandledPromiseRejectionWarning: Error: SafeContainer initialise failed: _publicNames (Cannot read property 'getContainer' of undefined)
    at PublicNamesContainer.initialise (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safe-containers.js:0:0)
    at SafenetworkApi.getSafeContainer (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safenetwork-api.js:0:0)
    at RootHandler.initRootContainer (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at new RootHandler (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at SafeVfs.mountContainer (/snapshot/safenetwork-fuse/src/safe-vfs/index.js:0:0)
    at safeJsApi.bootstrap.then.safeVfs.mountFuse.then._ (/snapshot/safenetwork-fuse/bin.js:0:0)
    at <anonymous>
(node:5338) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)

I think that you’ve set the system variable NODE_ENV to dev for safe-mount.
Because if you see, in the error message you get, the last subdir of the file path not found is ‘mock/’…
And because when I test it this way, I get the same result. Without NODE_ENV it works.
Maybe you expect it also to work in dev mode, but that doesn’t seem to be supported yet.
Or that also works without NODE_ENV=dev.

ps if you want to check on the running mount-safe if NODE_ENV is set, you could use the following command in another terminal:

cat /proc/$(pgrep mount-safe)/environ|tr ‘\0’ ‘\n’|grep NODE_ENV

2 Likes

You’re right. I have NODE_ENV set to DEV. Thanks.

UPDATE

Still getting errors after fixing NODE_ENV issue:

tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ ./mount-safe 
Server path not specified, so defaulting to ipc.config.socketRoot + ipc.config.appspace + ipc.config.id /tmp/app.6905
starting server on  /tmp/app.6905 
starting TLS server false
starting server as Unix || Windows Socket
## socket connection to server detected ##
received event of :  auth-uri { id: '6905-cli',
  message: 'safe-c2fmzw5ldhdvcmstznvzzq:AQAAAHqoEPgAAAAAAAAAACAAAAAAAAAAzndILF9uhcRZEpo2Si_wPOCtIlUCLuPe7CXPo5aQecAgAAAAAAAAAFlUqVuU0onXyKWkQ3qtzt4tbWn6GYUBA3bRYRq8mEdsIAAAAAAAAABfzJEIRfF_0I5V9C9ha2YEJtVksPTZ1wwbUO0PLm1DD0AAAAAAAAAAyRQMS1g4BRVH-1MKrkFeNnXUPy6Wk2KuQH3B14i-LqVfzJEIRfF_0I5V9C9ha2YEJtVksPTZ1wwbUO0PLm1DDyAAAAAAAAAAuGAAzwyQySml6XTgwU9I_rOAKMK8B7Lu77XJ8-tqWlMgAAAAAAAAAN44CYwkJqc4nH2UY6lB37VKggXvqbJTyBg-O7Cym5VXAAAAAAAAAAAAAAAAAAAAAMrUoDUQYw2S47O_bmo7NaWaipMO7ZkwuJa6Tq8XEIczmDoAAAAAAAAYAAAAAAAAAP5A7WhSKU5qi0Nyws3yxgV_9h9zIEudWgIAAAAAAAAADAAAAAAAAABfcHVibGljTmFtZXOOp9aa1BV6x8GPlYGSn5zQS0AOqzCphLuqkWcQdD0KWpg6AAAAAAAAASAAAAAAAAAA32qixW66VDOakhT08XP3_fYKG5HPs72Pgh1bso77KVQYAAAAAAAAANRdwDxCEGYY-T0LtLIHc_VAHO_KtPC1uAAEAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAHAAAAAAAAAF9wdWJsaWO3YEcoHEJKN5H9vsJ-8f3EHh_PvmvGdBXHYvfQC2FDIZg6AAAAAAAAAAAEAAAAAAAAAAAAAAABAAAAAgAAAAMAAAA' }
socket disconnected 6905-cli
(node:6905) UnhandledPromiseRejectionWarning: Error: SafeContainer initialise failed: _public (Cannot read property 'getContainer' of undefined)
    at PublicContainer.initialise (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safe-containers.js:0:0)
    at SafenetworkApi.getSafeContainer (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safenetwork-api.js:0:0)
    at RootHandler.initRootContainer (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at new RootHandler (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at SafeVfs.mountContainer (/snapshot/safenetwork-fuse/src/safe-vfs/index.js:0:0)
    at safeJsApi.bootstrap.then.safeVfs.mountFuse.then._ (/snapshot/safenetwork-fuse/bin.js:0:0)
    at <anonymous>
(node:6905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:6905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6905) UnhandledPromiseRejectionWarning: Error: SafeContainer initialise failed: _publicNames (Cannot read property 'getContainer' of undefined)
    at PublicNamesContainer.initialise (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safe-containers.js:0:0)
    at SafenetworkApi.getSafeContainer (/snapshot/safenetwork-fuse/node_modules/safenetworkjs/src/safenetwork-api.js:0:0)
    at RootHandler.initRootContainer (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at new RootHandler (/snapshot/safenetwork-fuse/src/safe-vfs/root.js:0:0)
    at SafeVfs.mountContainer (/snapshot/safenetwork-fuse/src/safe-vfs/index.js:0:0)
    at safeJsApi.bootstrap.then.safeVfs.mountFuse.then._ (/snapshot/safenetwork-fuse/bin.js:0:0)
    at <anonymous>
(node:6905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

and

tom@tom-ubuntu:~/SAFE$ ls
ls: cannot access '_public': Remote I/O error
ls: cannot access '_publicNames': Remote I/O error
_public  _publicNames
tom@tom-ubuntu:~/SAFE$ 

UPDATE

I was using the “dev” version of Peruse. I got it mounting with the non-dev version, but managed to get it “stuck”:

tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ cd ~/SAFE
tom@tom-ubuntu:~/SAFE$ ls
_public  _publicNames
tom@tom-ubuntu:~/SAFE$ cd _public
tom@tom-ubuntu:~/SAFE/_public$ ls
tom@tom-ubuntu:~/SAFE/_public$ cd ..
tom@tom-ubuntu:~/SAFE$ ls
_public  _publicNames
tom@tom-ubuntu:~/SAFE$ cd _publicNames/
tom@tom-ubuntu:~/SAFE/_publicNames$ ls
tom@tom-ubuntu:~/SAFE/_publicNames$ cd ..

^C^C^C^Z^Z^X^X^C^C

It seems to work fine in the terminal until I double-click on the mounted SAFE icon - after that it’s stuck.

image

And once it’s stuck, I can’t umount it and need to reboot:

tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ pkill mount-safe
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ sudo umount ~/SAFE
[sudo] password for tom: 
umount: /home/tom/SAFE: target is busy.
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ 
3 Likes

umount: /home/tom/SAFE: target is busy.

You’re probably still in the ~/SAFE directory branch in one of the terminals.
Close this terminal or ‘cd’ out of ~/SAFE.

1 Like

@tmark have a go with @draw’s suggestion but I think you still have the error you posted, just that you’re not seeing the error message in the second attempt - the behaviour you’re seeing with ls ~/SAFE is as expected given that error. The next command to try would be ls ~/SAFE/_public and I think that will fail with an error.

@bzee and I have it working, probably because we have a particular package installed so we need to track that down but the errors aren’t helpful so it might take some effort.

Thanks for the reports, they help a lot @tmark, and thanks for helping out here @draw.

If anyone has success, please also let me know!

The errors @tmark is posting appear quite common although at this time I don’t know the cause so I’ll need to investigate next week.

Strangely, @bzee (who has helped a lot getting this far with some tricky problems already) has the branch with safe-node-app v0.9.1 working, but it won’t work for me. And we both have the branch which uses safe-node-app v0.8.1 working (which is the release published here).

All of these errors only happen with the packaged build though (made using pkg as in the safe-cli-boilerplate), so it is possible to run it by installing nodejs and then running node bin.js if anyone is keen to try it out that way - or wants to help debug it of course!

Debugging is pleasant because you can use the Chrome debugger which is very powerful. You can debug any node program this way.

2 Likes

@tmark if you are still willing to play, may I suggest:

sudo apt-get install libfuse-dev xdg-utils

Probably not needed, but as I’ve changed the instructions, best you stay in step.

And then I suggest you only use the console, and don’t change directory to any ~/SAFE path, but just give them on the command line, for example:

ls ~/SAFE/_public

and

ls ~/SAFE/_publicNames

and any subfolders of those.

And if you are adventurous, and patient!

tree ~/SAFE

I think if you change to a SAFE directory FUSE tries operations which I haven’t implemented yet (such as statfs) and that may cause it to hang.

I should go through and handle those better, but until then stay SAFE :wink:

If you have another go, let me know how you get on.

In the mean time I have been trying out a different packaging app called nexe which was promising but is not working yet.

3 Likes

@happybeing, I only run into the hanging situation when using the GUI “Files” to try to browse the mounted SAFE drive, which may be due to those unimplemented operations you mention.

Everything seems to be working fine from the terminal, including changing to ~/SAFE and ls inside:

tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ ls ~/SAFE
_public  _publicNames
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ ls ~/SAFE/_public
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ ls ~/SAFE/_publicNames
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ tree ~/SAFE
/home/tom/SAFE
├── _public
└── _publicNames

2 directories, 0 files
tom@tom-ubuntu:~/Apps/safenetwork-fuse-v0.1.0-rc2-linux-x64$ cd ~/SAFE
tom@tom-ubuntu:~/SAFE$ ls
_public  _publicNames
tom@tom-ubuntu:~/SAFE$ cd _public
tom@tom-ubuntu:~/SAFE/_public$ ls
tom@tom-ubuntu:~/SAFE/_public$ cd ../_publicNames/
tom@tom-ubuntu:~/SAFE/_publicNames$ ls
tom@tom-ubuntu:~/SAFE/_publicNames$ cd ..
tom@tom-ubuntu:~/SAFE$ ls
_public  _publicNames
tom@tom-ubuntu:~/SAFE$
3 Likes

I’d like to help by trying to package and testing this on Windows. Where do I start?

3 Likes

That’s great news @lukas! :slight_smile:

I have now updated the README.md for developers and created a github issue with some notes on Windows support: issue #6

Good luck and ask away if you have any questions. Ask here or on Riot.im

BTW If anyone wants to try packaging for Mac OS it should be even easier than Windows.

2 Likes

And we have a release!

SAFE Drive v0.1 Linux 64 bit

3 Likes

Great! I’ll try it out within a week!

1 Like

tree works but don’t do this…

willie@sputnik:~/SAFE$ tree >tree.txt
bash: tree.txt: Software caused connection abort

My intent was to show that not all my public_names are shown. I’ll post separately about this bug/feature shortly

1 Like

It’s not really a bug, but because you are trying to create a file in your SAFE drive which isn’t possible yet - will be working on that soon I hope.

This early code is a bit ropey in places I’m afraid, so you have to behave if you don’t want to break it :stuck_out_tongue_winking_eye:

So instead of > tree.txt use > ~/tree.txt

1 Like

obvious really PEBKAC

1 Like

My babelfish is malfunctioning, I thought you said PEBKAC.

Oh, and I see I misread your post and look forward to the bug report about your public names not showing up. That’s an odd one assuming they are valid names (lower case alpha numeric with 3 to sixty something characters)?

1 Like