SAFE Drive - help with testing

Good point. I don’t have bandwidth to think about it atm so be good to have a list of feature ideas. Do you mind raising an issue - seems the simplest way for now - and prefix the title with ‘new feature:’ or something like that.

@isntism great news on Blender and Krita. Please can you keep a list of which apps you experimented with and roughly what you tried? Nothing onerous, just so we can pull things together in one go. Then at some point just send it to me and I’ll build up a list of things different people have tried out.

Cool. This is what I want to hear :slight_smile:

Well if you have put it in _public you are almost there. Anyone can access any file using SAFE Drive, if the file has been saved under a web service. So that means, for now, you need to create a public name and a trivial website using the Maidsafe Web Hosting Manager. Then find the corresponding folder under ~/SAFE/_public or ~/SAFE/_publicNames and save files there.

For example, if you create public name ‘isntism’ and it is accessible at safe://isntism you would copy files into ~/SAFE/_public/isntism/www-root (if I recall correctly - check that!).

Those files will then be available on SAFE Drive, to anyone, via a web mount. So:

ls ~/SAFE/_webMounts/isntism

Or if you chose to set up a different subname/service such as safe://files.isntism it would be available at:

ls ~/SAFE/_webMounts/files.isntism

Let us know how you get on and of course, ask if anything isn’t clear.

I already pulled both, safenetworkjs did change one file when doing so though, but now that I am here may as well share my preliminary findings.

That was probably something changed over the last few days, so if in doubt, yes pull both!

2 Likes

Absolutely, especially to keep it on our radar and not lost in the forum.

2 Likes

Done:

https://github.com/maidsafe/safe_client_libs/issues/700

4 Likes

Transfering a file from ~/SAFE/_public/tests/data1 to ~/SAFE/_public/ism/root-files hangs for a while, jumps to 100% then gives throws error when getting information for file "/home/isntism/SAFE/_public/ism/root-files/blender_on_safe.blend":No such file or directory

Then I tried via desktop as mediator, same issue, then I tried sending a file to data1, which did work, it can see and read index.html and main.css, I used web hosting manager v0.5.0 with the standard layout.

safe://files.ism also works fine on the browser.

edit: Oh got an error trying to resave index.html from gedit, SAFE-Drive then didn’t respond:
(node:10536) UnhandledPromiseRejectionWarning: TypeError: this._safeVfs.vfsCache(...)._saveResultToCache is not a function at RootHandler.create (/home/isntism/Desktop/safe/safenetwork-fuse/src/safe-vfs/root.js:378:34) at <anonymous (node:10536) 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: 34) (node:10536) [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.

2 Likes

Last things first, yes I’m afraid gedit doesn’t work. vim seems OK, so some apps will be fine, but in general to get things done it is best to edit elsewhere, and then copy using the file manager or the command line, as they seem fairly reliable.

I’m not clear on what you did where you say ‘transferring file’, ‘tried via desktop’, ‘sending a file’ etc, and I would need to understand exactly what you did to help here, or to investigate the error. Looks like you are finding some limitations and bugs, but I need more detail to be sure. This is for future reference though, not essential at this stage, so up to you whether you go back and report in more detail. It is also helpful in this form, and great to see you trying these things out. I’m getting a real buzz from that :slight_smile:

It sounds like you may have got there in the end though?

Or if not, if you manually copy files to /home/isntism/SAFE/_public/ism/root-files instead of saving or editing them in place, you should be fine, and anyone will be able to access those files using their SAFE Drive via ~/SAFE/_webMount/files.ism, including yourself :slight_smile:

:clap: :clap:

2 Likes

Ah right, I keep filtering things out that seem unimportant to prevent myself from writing a huge uncohesive monologue, I’ll try to stop doing that if it can be more helpful then annoying.
First things first though, I’m approaching this using the graphical interface instead of the console like any general user would.

After creating the website and the ism public name I attempted to move a .blend file to it by selecting it in nautilus and using copy, then paste in the root-files folder.

At first it froze and an icon-less file appeared as expected, but shortly after it jumped to 100% that error popped up and the file disappeared, reloading the folder did not fix it.

I then went ahead and assumed that it was a bug in the drive software so I dragged the file from the same nautilus page to the desktop, and then copy-pasted it using the keyboard shortcuts from there into the root-files folder, but the same thing happened.

Quickly I tested whether the git pull I did earlier broke the entire drive and dragged a file from one nautilus page, a folder on my desktop, to data1, the folder that worked before, and it got written there without a hitch, well apart from a small and expected freeze.

Now you responded and told me to to try using the console, after looking around the web for the right command to use I attempted using cp -i blender_on_safe.blend ~/SAFE/_public/ism/root-files/ from the data1 folder and it hung for a bit before allowing me to write down a new command, but when I refreshed the root-files folder it still did not show up.

These problems are not existent in the folder created by SAFE-drive, data1

3 Likes

Prefect, that’s what I need, and great that you are using the graphical stuff which as you say, most people will.

I have tested basic copy type stuff with the file manager (not sure if it is nautilus - I’m using whatever the default is in Ubuntu Gnome desktop). I have not tested it much though, so really good that you are. By all means continue.

I suspect those little ‘hangs’ are where it is writing to the SAFE Network. So nothing to worry about so long as they complete and do what you expect, and of course they will take longer for bigger files, or when copying several files at once.

How big is that ‘.blend’ file?

I’m going to do some tricky coding, so will revise these in more detail once that’s done.

Thanks for the detailed report.

Edit:* a couple of questions:

  • which browser version are you using?

  • when you first tried to copy to ‘root-files’, did the browser pop up and ask you to authorise that? If not, that might be the issue, although I would expect that to hang indefinitely (until you clicked to say ‘yes’ it’s OK).

1 Like

The blend file is just 662KB, but my connection is fairly bad so I expected the hanging.
I’m using peruse-v0.7.0-linux-x64 and nautilus 1:3.26.4-0~ubuntu18.04.2, in case you meant file browser.

And I do not remember having to specifically click an authorize prompt from peruse when first trying to move files to that folder, but I may have just forgotten, either way, it doesn’t show up again.
Unless you mean the one that is required to actually get access to the files at all.

Interesting, I just tried again and it moved the .blend file into a new folder named es in its original directory, removing the original file, seems like there are some inconsistent issues.

edit, I also start the drive by going into the safenetwork-fuse folder and typing ./bin.js

2 Likes

Thanks for the info.

It will only happen once each time you create a new web folder with Web Hosting Manager.

No, its a separate thing.

Yes indeed. Things that might seem similar from the user’s view can be very different in the software. This is why it can be hard to replicate issues, and why it helps to know the precise sequence of what was done.

Are you saying that moving the file this way worked - that is, from a folder on SAFE drive to a subfolder of the same folder?

Using ./bin.js won’t enable debug output, so if you want to see more detail of what is going on, use the DEBUG environment variable like this (although the specifics can be varied, this just happens to be what I’m using right now):

DEBUG=safe-fuse:ops*,safe-fuse:stubs*,safe-fuse:vfs-cache*,safe-vfs:*,safenetworkjs:containers*,safenetworkjs:cache*,safenetworkjs:file* node bin.js
3 Likes

safenetwork-fuse-v0.1.0-rc2-linux-x64 <-- is that the latest?

I tried moving the file from ~/SAFE/_public/test/data1 to ~/SAFE/_public/ism/root-files by dragging it over via two nautilus windows, just to see the error pop up again, but somehow the file ended up in an previously nonexistent directory at ~/SAFE/_public/test/data1/es with the original gone.

I’ll try running it with the debug environment for a while, that would be more useful.

3 Likes

No afraid not and there isn’t a more up to date build than that - we’re all working using node to run from source at the moment. It’s not that hard, esp. on Ubuntu as that’s so standard, but some understandably prefer to wait for a build (which is fine, because that will need testing too :slight_smile: ).

So for anyone wanting to try before then, see this post.

@isntism oh right, that’s an interesting bug thinking about it (as if you didn’t know :slight_smile:). It will probably need info from the debug log to see exactly how nautilus tried to do this. You can capture that by adding the following to the end of the line when you start SAFE Drive: 2>&1 ¦ tee nautilus-move-file.log

Oh, and you will need the command to include the DEBUG= stuff I mentioned in a recent post too - that will make sure the info I need is in the log.

If you do this, and you’re OK with it, please create an issue on github, describe the sequence, and upload the nautilu-move-file.log there. Also note your OS version so the info is all in one place - or include a link to the post in this topic. That would be super helpful.

Thanks all. I’ve finished writing some new quite complicated code that I hope will get us closer to decentralised git but it has introduced bugs I’ll be trying to fix today. In some ways these changes make the code nicer too, because when I rewrite stuff I’ve written once and then debugged, I have a better understanding of what I’m are trying to do. :smile:

5 Likes

Seems I can read files OK , make new dirs but cannot create or copy files?

willie@gagarin:~$ cd SAFE/
willie@gagarin:~/SAFE$ ls -al
total 0
drwxr-xr-x 1 willie willie 0 Nov 25 17:44 _public
drwxr-xr-x 1 willie willie 0 Nov 25 17:44 _publicNames
willie@gagarin:~/SAFE$ cd _public
willie@gagarin:~/SAFE/_public$ ls -al
total 0
drwxr-xr-x 1 willie willie 0 Nov 25 17:45 scotcoin
drwxr-xr-x 1 willie willie 0 Nov 25 17:45 southside
drwxr-xr-x 1 willie willie 0 Nov 25 17:45 tests
willie@gagarin:~/SAFE/_public$ mkdir newdir
willie@gagarin:~/SAFE/_public$ cd newdir/
willie@gagarin:~/SAFE/_public/newdir$ touch newfile1 newfile2
touch: cannot touch 'newfile1': Remote I/O error
touch: cannot touch 'newfile2': Remote I/O error
willie@gagarin:~/SAFE/_public/newdir$ ls -al
total 0
willie@gagarin:~/SAFE/_public/newdir$ cd ..
willie@gagarin:~/SAFE/_public$ cp -rv ~/projects/maidsafe/example-sample_sites/nostrils/ .
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/' -> './nostrils'
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/css' -> './nostrils/css'
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/css/styles.css' -> './nostrils/css/styles.css'
cp: cannot create regular file './nostrils/css/styles.css': Remote I/O error
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/index.html' -> './nostrils/index.html'
cp: cannot create regular file './nostrils/index.html': Remote I/O error
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/wom-tut1.html' -> './nostrils/wom-tut1.html'
cp: cannot create regular file './nostrils/wom-tut1.html': Remote I/O error
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/img' -> './nostrils/img'
'/home/willie/projects/maidsafe/example-sample_sites/nostrils/img/nostril.jpg' -> './nostrils/img/nostril.jpg'
cp: cannot create regular file './nostrils/img/nostril.jpg': Remote I/O error

Ubuntu 18.04 all dev versions as recommended

debug.txt is chunky…
willie@gagarin:~/projects/maidsafe/safenetwork-fuse$ ls -l debug.txt
-rw-r–r-- 1 willie willie 5201346 Nov 25 20:33 debug.txt

Do you want me to zip that and share it?

3 Likes

Hey Willie, well done. That’s fantastic, and the behaviour is expected.

Everyone is going to find this confusing, so I think we will need to figure out a better way of handling this, but for now see JPL’s post below. Essentially he’s having the same issue, and my explanation in reply is immediately underneath:

TLDR; you can’t create files just anywhere, but a folder where you have already uploaded files using Web Host Manager, and which appears under _public will work. If it doesn’t, try the next folder deep until you find the folder that is the container. It will be the one with index.html in the case of an uploaded website.

I think Maidsafe might like to rethink having subfolders above that, and instead make every subfolder in _public be the start of a container. I think that will solve a few UX issues like the one you are experiencing. But it needs discussing.

Assuming you get the hang of that, have a play, and report back. Good luck :slight_smile:

4 Likes

I stopped by step 5. Mount Your SAFE Drive, a) Assuming you are in the SAFE FUSE directory type: ./mount-safe

tomas@tomas-Lenovo-IdeaPad-Z510://home/tomas/Plocha/safenetwork-fuse-v0.1.0-linux-x64$ ./mount-safe
Server path not specified, so defaulting to ipc.config.socketRoot + ipc.config.appspace + ipc.config.id /tmp/app.6008
starting server on /tmp/app.6008
starting TLS server false
starting server as Unix || Windows Socket

socket connection to server detected

received event of : auth-uri { id: ‘6008-cli’,
message: ‘safe-c2fmzw5ldhdvcmstznvzzq:AQAAAAU0LTcAAAAAAAAAACAAAAAAAAAAsEMEn_RWABXicc7kzn7ggMcqGeDfmXCfyJhAskZSlssgAAAAAAAAABFiJSGfa5qM5G515ARlxMdkfQRbO6Cw0AAE9b9loUlJIAAAAAAAAAAqtxf_U54oXTuHNiLNUcUM_wuSO-Y-ROz5Ysky_Q1x6EAAAAAAAAAAaymR3vU_Z-YT-MEmBOESFRqrrgtF5ZA9SJtitQU4nM0qtxf_U54oXTuHNiLNUcUM_wuSO-Y-ROz5Ysky_Q1x6CAAAAAAAAAAHYDr_WtQsoLax31lwA-9TP1jYRzmmQTA4awJdOWb4y0gAAAAAAAAAPNYxYdJ9L1TnyGO-EfL2Bh4bqpbqduqLJWLLU2HfUj2GQAAAAAAAAAQAAAAAAAAADE3OC42Mi43Ni44OjU0ODMTAAAAAAAAADEzOC42OC4xODUuMjE4OjU0ODMSAAAAAAAAADEzOC42OC4xODEuNTc6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4MS42MDo1NDgzEgAAAAAAAAAxMzguNjguMTgxLjg2OjU0ODMSAAAAAAAAADEzOC42OC4xODEuODc6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNjg6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNzY6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNzk6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xODA6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xODI6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDI6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDM6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDk6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4xNDo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjE1OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMTc6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4xODo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjE5OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMzE6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4zNDo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjM2OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMzg6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4zOTo1NDgzEQAAAAAAAAA0Ni4xMDEuNS4xNzk6NTQ4MwFrFQAAAAAAAQcAAAAAAAAAYWxwaGFfMgDVlh0-jGsab_NUDY8IiCJu-VwEjonrNybrrbBGegWyLZg6AAAAAAAAGAAAAAAAAAAjzchaYyHotk3TTUw8SOJs7OOk3cw6JvgCAAAAAAAAAAwAAAAAAAAAX3B1YmxpY05hbWVz4EtvBO4G4ERE9hbpM7q6HtV6lbRkAFDZdEl8Rn2uBAWYOgAAAAAAAAEgAAAAAAAAANyYETTugClfKVFd4Kk0HjG1hVfhRxGsTBWY-qCsXDZ8GAAAAAAAAAAQxUAIZVMFvFkzOBdFuf4Myz-8QYcecWkABAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABwAAAAAAAABfcHVibGljCe455GSxmG-3Hfk9I41zuBAxEIo4zAMTjaXFBU_Wv22YOgAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAIAAAADAAAA’ }
socket disconnected 6008-cli
(node:6008) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘gt’ of undefined
at module.exports.statfs.safeVfs.getHandler.statfs.then (/snapshot/safenetwork-fuse-v0.1.0/src/fuse-operations/statfs.js:0:0)
at
(node:6008) 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: 11)
(node:6008) [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.

I think, its may be because some errors by running of Peruse or Safe Browser:

tomas@tomas-Lenovo-IdeaPad-Z510:~/Plocha/Peruse-v0.7.0-linux-x64$ ./peruse
I 18-12-03 19:35:18.263956 Failed to Bootstrap with 138.68.181.87:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:19.742115 Failed to Bootstrap with 138.68.189.38:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:19.744016 Failed to Bootstrap with 138.68.189.39:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:28.344458 Failed to Bootstrap with 138.68.189.36:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:28.389736 Failed to Bootstrap with 138.68.181.168:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:28.391973 Failed to Bootstrap with 138.68.185.218:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:28.392487 Failed to Bootstrap with 138.68.189.38:5483: (ClientNotWhitelisted) Our Client is not whitelisted
I 18-12-03 19:35:28.441990 Bootstrapping(ad1cfc…) Lost connection to proxy PublicId(name: 7b6ee7…).

In http://invite.maidsafe.net is registerd my current IP adress and I can browse the SAFE Network. The step b) authorise SAFE FUSE to access my files, work well. I see, that SAFE Drive is mounted. But after ls ~/SAFE is nothing happened (loading process).

Thank you for your help
edit: Ubuntu 18.04.1

You are running from the compiled version right? that one is very out of date, luckily it’s quite easy to get the development version, and last I checked that one does work fine, you should be able to piece together how to do so from recentish posts.

I think it’s around this post: SAFE Drive - help with testing?

2 Likes

OK, I tried git clone of safenetworkjs and I got some warrning and errors

tomas@tomas-Lenovo-IdeaPad-Z510:~$ git clone GitHub - happybeing/safenetworkjs: SAFE Network application, file system and utility library for NodeJS (web, desktop and cli)
Cloning into ‘safenetworkjs’…

Resolving deltas: 100% (373/373), done.
tomas@tomas-Lenovo-IdeaPad-Z510:~$ cd safenetworkjs

tomas@tomas-Lenovo-IdeaPad-Z510:~/safenetworkjs$ npm install
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

But graceful-fs is in latest version:

tomas@tomas-Lenovo-IdeaPad-Z510:~/safenetworkjs$ dpkg -l | grep graceful-fs
ii node-graceful-fs 4.1.11-1 all drop-in replacement improving the Node.js fs module

And errors:

@maidsafe/safe-node-app@0.8.1 postinstall /home/tomas/safenetworkjs/node_modules/@maidsafe/safe-node-app
yarn run install-prod && node install-dev-libs.js

00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: ‘run’
npm ERR! Linux 4.15.0-39-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! @maidsafe/safe-node-app@0.8.1 postinstall: yarn run install-prod && node install-dev-libs.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @maidsafe/safe-node-app@0.8.1 postinstall script ‘yarn run install-prod && node install-dev-libs.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @maidsafe/safe-node-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! yarn run install-prod && node install-dev-libs.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs @maidsafe/safe-node-app
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls @maidsafe/safe-node-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/tomas/safenetworkjs/npm-debug.log

Do you want npm-debug.log ?

2 Likes

I’m not clever enough to interpret these logs, but think you may not have the prerequisites installed.

Can you tell me the OS / version you are using, and confirm you have the prerequisites according to the safenetwork-fuse instructions on github, and the Maidsafe tutorial here.

If you can’t see the problem, I suggest you try working through that tutorial, because that should ensure you have what is needed.

Thanks for helping out!

1 Like

I checked the points from pre-requisites and all tools are installed.

git is in version (1:2.17.1-1ubuntu0.4).
nodejs in version (8.10.0~dfsg-2ubuntu0.4).
build-essential in version (12.4ubuntu1).
libgconf-2-4 in version (3.2.6-4ubuntu1).

OS Version is Ubuntu 18.04.1 LTS

I will try it again in the next few days. Thank you for your help.

3 Likes

Looks good :slight_smile:

That should be good for the npm install so let me know how that goes now.

To try the drive you also need the dependencies here:

And then back to here

Good luck.