MaidSafe Dev Update - April 20, 2017

I got it working - fairly straightforward.
Certainly I can now fire up the browser and get on with trying to understand safe-nodejs.
Still havent managed to actually upload a file though…

6 Likes

Hmm … not going so well for me. I seem to be missing a file package.json

You need to clone the SAFE Launcher repo and follow the instructions in the README here :slight_smile:

3 Likes

Yes, that’s what I’m doing (although I downloaded the zip rather than cloning). Then I ran the build script
cargo build --release --features use-mock-routing which seemed to go fine and copied libsafe_core.so to src/ffi
After that I ran npm install and got a few warnings then npm run rebuild-native which failed.

Any ideas what I’m doing wrong?
EDIT: ah … do I need to run those npm commands from within the launcher repo folder ?
Yes - I’m being an idiot… bear with me!

3 Likes

Linux is done now and I’ll post the binary tomorrow. Windows isn’t behaving though, it’s failing to compile rust_sodium-sys in safe_core. Anyone have any ideas? I’m using Rust 1.16.0 btw.

7 Likes

OK I give up on Windows. Life’s too short, it’s a nice day and the Launcher is not long for this world anyway.

A packaged Linux version as a zip file can be downloaded here. Just use it in the normal way.

Annoyingly you still have to ask for an authentication code even though the network is not real. EDIT: You don’t have to - just make one up.

If you fancy building the Launcher yourself here are the steps I took (basically a fleshed out version of these instructions https://github.com/maidsafe/safe_launcher#installation for Ubuntu / Debian linux)

  1. Install node and npm
    $ sudo apt-get install nodejs npm

  2. Install nvm so you can choose node version 6.5 - not sure if later versions work too, I didn’t try. Possibly you can miss this step. https://github.com/creationix/nvm#installation

  3. Install Rust version 1.16.0
    $ curl https://sh.rustup.rs -sSf | sh
    Follow the instructions and select defaults

  4. Type $ source $HOME/.cargo/env

  5. Download safe_client_libs-master.zip from https://github.com/maidsafe/safe_client_libs (or clone the repo). Extract it somewhere, e.g. home folder.

  6. Download safe_launcher-master.zip from https://github.com/maidsafe/safe_launcher (or clone the repo). Extract it somewhere, e.g. home folder.

  7. In a terminal cd into the safe_client_libs-master directory and run

$ cargo build --release --features use-mock-routing

Make a cup of tea. It takes a while…

  1. Then copy libsafe_core.so from the safe_client_libs-master/target/release subfolder to safe_launcher-master/app/ffi

  2. In a terminal cd into safe_launcher-master directory and run

$ npm install

then

$ npm run rebuild-native

  1. Once that’s done, to start the launcher with mock routing run:

$ npm run dev

  1. To make a distribution package use command based on the platform:

$ npm run package

this will generate the package files in the release subfolder.

Have fun :slight_smile:

18 Likes

Thanks for the detailed guide. I got the launcher to run in mock-routing, but how to login the account? Do I still need to register one, and get the invitation token also?

4 Likes

I just reused the code from my last invite and it JustWorks.
I suspect you might get away with making a random string of the appropriate length if you don’t have an old invite to hand although I have not tested this. I’m not at home right now, perhaps some kind person can post an old auth code for others to use.
Nothing is going outside your own box so I don’t see a security issue there.
I’m sure I’ll be told soon enough if I’m wrong.

2 Likes

Yes, you need to register an account. But you don’t need to have an invitation token. You can enter anything you want in the “Invitation Token” field.

You can enter a random string of any length :slight_smile:

6 Likes

Ah OK. That’s good to know. I just used my twitter account to get another one without trying the easy way first.

2 Likes

Ohh that’s the step I been missing. Never able to get mock routing work.

Now I got a problem with NPM. I always have problems with NPM for some reason. (I hate npm) Could someone help me out?

safe_launcher is on master branch.

npm version is 4.6.1

I clean out npm cache, and re-install npm. Same error.

1 Like

What version of Node are you using?

1 Like

nodejs, right?

I updated my system, and nodejs. The latest version is 7.7.3-1

Arch linux.

he said use the 6.5 version in his step-by-step, it’s more stable :slight_smile:

1 Like

This is amazing, I’ll send your GH link to everyone who needs it. Great read, makes much more convenient thanks :smiley:

BTC address? :smiley: Or do you prefer a bit of MAID

What were the problems you were having on Windows?

Yes, I’m just following the instructions! I don’t know how backwards compatible node is but my guess is ‘not very’. If you can’t build it you can always use the pre-compiled package. :slight_smile: which I guess will work on any 64-bit Linux.

3 Likes

Does this mock routing give you an unlimited PUT balance? Haven’t tested yet

Also, what problems were stopping you from doing this on Windows?

1 Like

I couldn’t get safe_core to compile. Seems to be something to do with the C++ compiler so I reinstalled Visual Studio but no joy. Then I gave up. You should have a try if you have a few hours to kill. :slight_smile: The basic process is the same except on point (8) the file you copy across is different (see the original instructions).

Don’t worry about payment. It’s fun (mostly)!

2 Likes

Okay. I installed nvm. And changed it to 6.5.

more npm problems. (Dear npm devs, go to hell.)

3 Likes

Created this Repo with everything bundled for you to play / dev with SAFE Mock Routing on Linux

Comes with:

  • Mock Routing Launcher v11 (thx @JPL)
  • SAFE Browser 0.4.3 (thx @joshuef)
  • Desktop Demo App (thx @maidsafe)
  • 5 Web Apps for you to upload and play with (thx SAFE-FS :smiley: )
5 Likes