Great stuff @isntism, persistence is invaluable with software. The following instructions are all for Linux, and have been tried on Ubuntu and Debian, and to a lesser extent on other distros. If you can help with Windows and MacOS, see below.
For you and anyone who fancies a go with Linux, I recommend:
- follow the instructions on the github repo to get the basics set up (installing dependencies, using
npm link
with SafenetworkJs etc), but to start at least, don’t worry about doing a build. If you don’t get on with that, explain where you got to, what you’ve tried, and ask for help! - get the
development
branch insafenetwork-fuse
andsafenetworkjs
by doing in each of those directories:
git pull
git checkout development
git checkout .
That will ensure you have the latest code.
Then:
- start Peruse browser
- login to SAFE Network
- in a new terminal console in
safenetwork-fuse
run:
SAFENETWORKJS_TESTS=testing DEBUG=safenetworkjs*,safe-fuse* node bin.js
(Note: that is for the live network. If you want to save PUTs and use mock, you should run the Dev build of the browser, and include NODE_ENV=dev
in the above command.)
At this point you should see some gobbledegook printed to the terminal console, and the browser should jump to the front, requesting authorisation. After you’ve given that, in a new terminal, try:
ls ~/SAFE
And if you see this, give yourself a pat on the back:
_public _publicNames
Success!
If you get to this point, please report back here and mention your setup and anything you think could be done to improve the instructions on github or here. And then play, and again please report back, or post questions and so on.
Bugs n Stuff
If you think you’ve found a bug you can post about it here and/or create an issue on github giving details of your setup, what you did, and what did or didn’t happen. As much detail as possible helps a lot.
For anyone who wants to try, its easy to capture debug output, just add this to the end of the command: 2>&1 | tee test.log
and output will be saved to test.log
which you can upload or post extracts from.
Windows & MacOS
The above instructions are all for Linux, but we have already made some progress with Windows thanks to @lukas and @benno, and with MacOS thanks to @Stout77. If anyone wants to continue those efforts which are tantalisingly close to working, please post on the following topics:
Debugging
This is complicated code so I don’t expect anyone to take it on, but it can be interesting to some and I do welcome anyone who wants to help with it. Or maybe you just fancy trying the debugger. This is fun (ok, I find it fun) and is well worth trying out if you are interested in how code works or why it does something in a certain way. To use the debugger:
- install Chromium (or Chrome) Browser
- start Chromium (or Chrome)
- get rid of the rude login dialog (I never use it)
- paste the following into the address bar: chrome://inspect/#devices
- click
Open dedicated DevTools for Node
- start SAFE Drive as above, but changing
node bin.js
tonode --inspect-brk bin.js
When you start SAFE Drive now, the debugger should open and you will need to press F8 to start the program. You can avoid that step by using --inspect
instead of inspect-brk
but breaking at the start gives you a chance to set a breakpoint before running the program. If you find the debugger confusing, post a request on this topic.
Oops It Stopped Working
After something fails things may stop working and you will keep getting errors. If that happens try this before running the SAFE Drive command again: pkill node; sudo umount ~/SAFE
Thanks anyone for helping. Everyone can join in if you are willing to have a go. I’m happy to help you whatever level you feel you are at and see if we can get you going. Others are welcome to join in and help people get going of course.
Notes:
SAFENETWORKJS_TESTS=testing
causes SAFE Drive to automatically create an NFS container (~/SAFE/_public/tests/data1
). This is used by the test script which you can run yourself, although be aware that it uses up to about 400 PUTs per run! So you’ll only be able to run it a maximum of twice on any account. You can run it on mock of course, but will still have to keep creating new accounts while using it (or keep a copy of the MockVault file for an empty account and keep copying that back to /tmp, which is what I do).
DEBUG=safenetworkjs*,safe-fuse*
produces output to the terminal that will show what its doing, where it hangs etc. and can be modified to extend and filter what is printed according to the require('debug')
statement in different source files. I tend to debug more with the console output than the debugger at the moment because there’s so much useful info printed to show what’s going on.