Building dev-mode SAFE Browser (Debian 8)

Hey @hunter I’m trying to build using the README.md instructions on your Browser dev-mode repo (I have done this before ok following this topic in May) but am now getting errors with npm run pack-authenticator. It appears to get a long way through (and takes ages :slight_smile:) and then:

...
5098ms optimize chunk assets

 90% optimize assets

594ms optimize assets

 95% emit

1841ms emit

[0] Hash: e36cd4e6fa6778dc1752
[0] Version: webpack 1.15.0
[0] Time: 183900ms
[0]         Asset       Size  Chunks             Chunk Names
[0]     bundle.js    4.65 MB       0  [emitted]  main
[0] bundle.js.map    4.99 MB       0  [emitted]  main
[0]      app.html  286 bytes          [emitted]  
[0]   favicon.png    22.8 kB          [emitted]  
[0]     + 507 hidden modules

[0] npm run build-app exited with code 0

npm
 
ERR!
 Linux 3.16.0-4-amd64

npm
 ERR!
 argv
 "/usr/bin/nodejs" "/usr/local/bin/npm" "run" "copy-bin:unix"

npm 
ERR! node
 v6.11.0

npm 
ERR! npm  v4.0.3



npm
 ERR! missing script: copy-bin:unix

npm 
ERR! 

npm ERR!
 If you need help, you may report this error at:

npm ERR!
     <https://github.com/npm/npm/issues>



npm
 ERR! Please include the following file with any support request:
npm
 ERR!
     /home/mrh/src/safe-mock/safe_browser/authenticator/npm-debug.log



npm
 
ERR!
 Linux 3.16.0-4-amd64

npm
 ERR! 
argv "/usr/bin/nodejs" "/usr/local/bin/npm" "run" "pack-authenticator:unix" ""

npm ERR!
 node v6.11.0

npm
 ERR! 
npm  v4.0.3

npm
 ERR! code
 ELIFECYCLE

npm ERR!
 @ pack-authenticator:unix: `sh ./scripts/pack_authenticator.sh ""`
npm 
ERR! Exit status 1

npm 
ERR! 

npm 
ERR! Failed at the @ pack-authenticator:unix script 'sh ./scripts/pack_authenticator.sh ""'.

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  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:

npm
 ERR!     sh ./scripts/pack_authenticator.sh ""

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs 

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!
     npm owner ls 
npm ERR!
 There is likely additional logging output above.



npm
 ERR! Please include the following file with any support request:

npm ERR!
     /home/mrh/src/safe-mock/safe_browser/npm-debug.log

Pack Authenticator exited with code 1

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "run" "pack-authenticator"
npm ERR! node v6.11.0
npm ERR! npm  v4.0.3
npm ERR! code ELIFECYCLE
npm ERR! @ pack-authenticator: `node ./scripts/main.js --authenticator`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ pack-authenticator script 'node ./scripts/main.js --authenticator'.
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  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./scripts/main.js --authenticator
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mrh/src/safe-mock/safe_browser/npm-debug.log

I’m using Rust stable (1.16.0) and node 6.11.0 on Debian 8. Can you help?

UPDATE: I can build the maidsafe repo maidsafe/safe_browser for mock (assuming git checkout dev achieves that), and it runs but I can’t create an account (it looks like its trying to connect to the network and failing). So I’m stuck with issues for both hunterlester/safe_browser (npm run pack-authenticator errors as pasted above) and maidsafe/safe_browser (failing to connect to network).

Is this dev-mode SAFE Browser meant for developers to work on the browser or to work on their apps?

Anything - it’s a mock-routing browser so you can develop web apps, or use it to auth desktop apps… if you can get it to build! It is also for hunter’s safe_dom_api_playground as in the videos linked from the last Dev update.

I’m trying again with sn_browser/README.md at dev · maidsafe/sn_browser · GitHub in case hunter’s repo is broken.

You mean, all I had to do was install the safe_browser with NODE_ENV=dev npm i, and that includes the normal safe_browser, and I can play around with it?

You have to build it - its all in the README.md.

No it’s not.
There’s no line on sn_browser/README.md at dev · maidsafe/sn_browser · GitHub saying:

Use of NODE_ENV=dev will ensure that mock routing is used.

That line is only on https://github.com/hunterlester/safe_browser/blob/dev-mode/README.md and it caught me by surprise.

The instructions are different (cf. git checkout dev in the latter) but the result is the same - please go to riot.im if you want to chat. Leave this topic for my issue. Thanks.

I’m finding that my build is now failing on my system as well because Crust was updated and a routing library version I’m using is referencing Crust methods that no longer exist.

I’ll sort the issues and push updates soon.

Hi @hunterlester,

I’m trying again today with a fresh git clone and have different errors. It did build the browser, which runs, but doesn’t seem to have the authenticator (visiting: safe-auth://home/ doesn’t do anything).

Here are the build errors I’m seeing:

$ npm run package

> @ package /home/mrh/src/safe-mock/safe_browser
> node ./scripts/main.js --package

Skip app dependencies rebuild because npmRebuild is set to false

Packaging for platform linux x64 using electron 1.4.1 to dist/linux-unpacked


Error: stderr maxBuffer exceeded
GNU xorriso 1.4.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Drive current: -dev '/home/mrh/src/safe-mock/safe_browser/dist/safe-browser-0.2.2-x86_64.AppImage'
Media current: stdio file, overwriteable
Media status : is blank

[snip - and later...]

xorriso : UPDATE : 14521 file filters processed in 82 seconds
xorriso : UPDATE : 14533 file filters processed in 82 seconds
libisofs: WARNING : File "/usr/bin/resources/app/node_modules/accessibility-developer-tools/lib/closure-library/closure/bin/labs/code/generate_jsdoc_test.py" can't be added to Joliet tree, because its path length is larger than 240
libisofs: WARNING : File "/usr/bin/resources/app/node_modules/accessibility-developer-tools/lib/closure-library/closure/goog/a11y/aria/announcer_test.html" can't be added to Joliet tree, because its path length is larger than 240
libisofs: WARNING : File "/usr/bin/resources/app/node_modules/accessibility-developer-tools/lib/closure-library/closure/goog/async/animationdelay_test.html" can't be added to Joliet tree, because its path length is larger than 240
libisofs: WARNING : File "/usr/bin/resources/app/node_modules/accessibility-developer-tools/lib/closure-library/closure/goog/async/animationdelay_test.js" can't be added to Joliet tree, because its path length is larger than 240
libisofs: WARNING : File "/usr/bin/resources/app/node_modules/accessibility-developer-tools/lib/closure-library/closure/goog/async/conditionaldelay_test.html" can't be added to Joliet tree, because its path length is larger than 240
[lots more like the above]

[snip - and to finish off...]

From previous event:
    at tsAwaiter (/home/mrh/src/safe-mock/safe_browser/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at Object.build (/home/mrh/src/safe-mock/safe_browser/node_modules/electron-builder/out/builder.js:135:12)
    at Object.<anonymous> (/home/mrh/src/safe-mock/safe_browser/node_modules/electron-builder/out/build-cli.js:23:11)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

Release Safe Browser exited with code 255

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "run" "package"
npm ERR! node v6.11.0
npm ERR! npm  v4.0.3
npm ERR! code ELIFECYCLE
npm ERR! @ package: `node ./scripts/main.js --package`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the @ package script 'node ./scripts/main.js --package'.
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  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./scripts/main.js --package
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mrh/src/safe-mock/safe_browser/npm-debug.log

[ends]

Any clues? Or can you post a binary for use with mock? Thanks.