How to build the SAFE Browser and upload a website with Mock-Vault

I have same symptoms as @southside, but on Debian.

You and me both pal. Im here under false pretences. I’m really a screwdrivers/hardware kinda guy who just plunges in until I get stuck and shout for help. I am no developer, never taken a single days software course in my puff.

That said, I know enough to know that if @happybeing has the same symptoms on Debian, but it works for you on Mint, then the issue must lie in the tiny differences between the distros.
I imagine Debian as the daddy, Ubuntu as the grown up son with a bit more polish and Mint as the incredibly cool grandson with amazing dress sense.
But until we know exactly what environment was getting used at MaidSafe maybe I am talking mince…
It has been known to happen…

Why does the code to make this dialog box


work on Mint but nit on Debian and Ubuntu. We also know it works on a Mac but I know nothing of these things. Its not a huge sample, I may be barking up the wrong tree but the fact that we seemed to need to install different dependencies may be a clue.
@frabrunelle can you tell is who else was working on this and what distro they were using?

EDIT:
Can @ben @hunterlester @bochaco @Krishna tell us if this could be related to this issue ?

1 Like

Just to add to the confusion it works for me now on Ubuntu 15.10. Before I was getting stuck at the authentication stage but I wiped everything and followed @draw’s instructions to the letter and it worked. I can’t view my website, but I guess that’s the next chapter.

2 Likes

I’m happy for you. Blows my rather unlikely theory about differences in thee Debian family theory to shreds but thats what theories are for - getting disproven sooner or later.

1 Like

Yeah, I thought I’d better stick my oar in before you want too far down that particular blind alley!

1 Like

thank you .
Hopefully one of @frabrunelle @ben @bochaco @Krishna or @hunterlester can let us kno if it could be related to the Safe browser auth request pop-up error issue

Hi @southside, do you think it’s worthy to try out by wiping everything as @JPL did? We did test this with Debian 8.
I guess you are using the correct versions for node and rustc, and make sure you install the dependencies for the web-hosting app. It’s crucial to switch to dev branch right after you clone the repo.

1 Like

Thank you - its working now after a complete wipe and reinstall.
Still can’t see what I did differently but I get the auth dialog now.
BEd now its past 4am here and I’ll test furthe r in the morning

Thank you

2 Likes

Just tried, and I believe that the browser auth only works with the release version, which means have to do the package. Once I did that, the auth dialog pops up in the browser. Hope that clarifies a bit.

2 Likes

And the same holds true to the accompanied sample apps, eg. safe_hosting_manager, etc. it has to be the released package in order to work properly.

2 Likes

OK, I probably missed something so will go through carefully when I get time. Plenty of clues in these posts - and I am on node 6.10.2 still so please don’t give me any sympathy :wink:

So @southside you are ahead of me. Watch your back man!

1 Like

When you run npm run pack-authenticator, it will run one of the two shell scrips in this directory.

For example, if you’re on Linux or macOS, it will run this script:

Let me know if that answers your question :slight_smile:

2 Likes

Ok, I’m good, I can confirm that if you do as you are told (mostly - I’m still on node 6.10.2 :wink: ) rather than miss vital steps like installing the prerequisites for keytar it works on LMDE / debian 8. I have a Web Hosting Manager that authorises (if I log into my keyring :blush:) and lets me create a public ID. Not gone further than that yet so node version might still trip me up. Thanks everyone!

@frabrunelle Thanks for answering my curiosity :slight_smile:

2 Likes

Congrats! yeah the node version shouldn’t matter, as I’m always on node v7.2.0, and compiled without problems.

2 Likes

I have TWO public IDs
Eat my dust!!!

2 Likes

Its all gone kinda quiet…

I can now load the web_hosting_manager and authenticate
Next problem: My sites will not load. Individual index.html files will sometimes load.

I create a public ID, southside create a service nostrils, click on it and upload the relevant directory with index.html and css and img subfolders. I know this works cos its the same very simple site I have been using to test the past few months
In the terminal I see
gvfs-open: safe://nostrils.southside/index.html: error opening location: The specified location is not supported

Ignoring this I go to the browser and enter safe://nostrils.southside

However if I enter safe://nostrils.southside/index.html, my handsome face is shown in all its glory.

The authorisation link doesnt work though…

ALSO:
when I try safe_examples/demo_app and do

npm install
npm run package
$ ./app_dist/safe_demo_app-v0.6.2-linux-x64/safe_demo_app

no authorisation dialog box is shown and it fails likes this

safe_examples/demo_app is not compatible with the new API. The only example apps that are currently compatible with the new API are the ones mentioned in the OP :slight_smile:

1 Like

Some updates got pulled in the repo:

2 Likes

I get a new error at npm run pack-authenticator


   Compiling ffi_utils v0.1.0 (file:///home/willie/projects/maidsafe/safe_browser/authenticator/native/ffi_utils)


error: struct field shorthands are unstable (see issue #37340)
  --> /home/willie/projects/maidsafe/safe_browser/authenticator/native/ffi_utils/src/catch_unwind.rs:54:21
   |
54 |                     error_code,
   |                     ^^^^^^^^^^



error: aborting due to previous error



error: Could not compile `ffi_utils`.

Build failed, waiting for other jobs to finish...


error: build failed

less /home/willie/projects/maidsafe/safe_browser/authenticator/npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ ‘/home/willie/.nvm/versions/node/v6.9.5/bin/node’,
1 verbose cli ‘/home/willie/.nvm/versions/node/v6.9.5/bin/npm’,
1 verbose cli ‘run’,
1 verbose cli ‘build-libs’,
1 verbose cli ‘features=mock-routing’ ]
2 info using npm@3.10.10
3 info using node@v6.9.5
4 verbose run-script [ ‘prebuild-libs’, ‘build-libs’, ‘postbuild-libs’ ]
5 info lifecycle beaker-plugin-safe-authenticator@0.1.0~prebuild-libs: beaker-plugin-safe-authenticator@0.1.0
6 silly lifecycle beaker-plugin-safe-authenticator@0.1.0~prebuild-libs: no script for prebuild-libs, continuing
7 info lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: beaker-plugin-safe-authenticator@0.1.0
8 verbose lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: unsafe-perm in lifecycle true
9 verbose lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: PATH: /home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/bin/node-gyp-bin:/home/willie/projects/maidsafe/safe_browser/authenticator/node_modules/.bin:/home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/bin/node-gyp-bin:/home/willie/projects/maidsafe/safe_browser/node_modules/.bin:/home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/bin/node-gyp-bin:/home/willie/projects/maidsafe/safe_browser/node_modules/.bin:/home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/bin/node-gyp-bin:/home/willie/projects/maidsafe/safe_browser/node_modules/.bin:/home/willie/.cargo/bin:/home/willie/.rbenv/shims:/home/willie/.rbenv/bin:/home/willie/.nvm/versions/node/v6.9.5/bin:/home/willie/.cargo/bin:/home/willie/.local/share/umake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/local/go.bin:/home/willie/projects/fabric/bin
10 verbose lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: CWD: /home/willie/projects/maidsafe/safe_browser/authenticator
11 silly lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: Args: [ ‘-c’, ‘node ./build_libs.js “features=mock-routing”’ ]
12 silly lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: Returned: code: 1 signal: null
13 info lifecycle beaker-plugin-safe-authenticator@0.1.0~build-libs: Failed to exec build-libs script
14 verbose stack Error: beaker-plugin-safe-authenticator@0.1.0 build-libs: node ./build_libs.js "features=mock-routing"
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/home/willie/.nvm/versions/node/v6.9.5/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid beaker-plugin-safe-authenticator@0.1.0
16 verbose cwd /home/willie/projects/maidsafe/safe_browser/authenticator
17 error Linux 4.4.0-75-generic
18 error argv “/home/willie/.nvm/versions/node/v6.9.5/bin/node” “/home/willie/.nvm/versions/node/v6.9.5/bin/npm” “run” “build-libs” “features=mock-routing”
19 error node v6.9.5
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error beaker-plugin-safe-authenticator@0.1.0 build-libs: node ./build_libs.js "features=mock-routing"
22 error Exit status 1
23 error Failed at the beaker-plugin-safe-authenticator@0.1.0 build-libs script ‘node ./build_libs.js “features=mock-routing”’.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the beaker-plugin-safe-authenticator package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node ./build_libs.js “features=mock-routing”
23 error You can get information on how to open an issue for this project with:
23 error npm bugs beaker-plugin-safe-authenticator
23 error Or if that isn’t available, you can get their info via:
23 error npm owner ls beaker-plugin-safe-authenticator
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
/home/willie/projects/maidsafe/safe_browser/authenticator/npm-debug.log (END)


willie@gagarin:~/projects/maidsafe/safe_browser$ rustc -V && node -v && npm -v
rustc 1.16.0 (30cf806ef 2017-03-10)
v6.9.5
3.10.10

Hey @southside, I will double check tomorrow and upgrade the tutorial but I’m quite sure that error is due to an upgrade to rust v1.17 from the safe_client_libs, v1.16 is not supported anymore since last few days. Please upgrade rust to 1.17 and it should be fine.

2 Likes