Mock-routing questions

md
auth

#35

yep, but one thing i found useful is copying your javascript after you changed it and pasting it in the console instead of deleting and uploading the file in the web hosting manager


#36

That’s a really cool tip. Thanks :slight_smile:


#37

Strange - it works fine for me.


#38

Can you try my safe_vault fork for local network? I have just updated it to allow 5_000_000 operations per account. That should be enough for some time.

Instructions to build and run a local network are here.


Trying to develop
#39

Should certainly be do-able.


#40

Can you please try the following commands for building the hosting example to work with mock,

set NODE_ENV=dev
npm i && npm run rebuild && npm run package

Email app

set NODE_ENV=dev
npm i && npm run package

the NODE_ENV flag is used to decide whether mock or actual library to use


#41

Should be able to add support using the electron API even if it is not there in the upstream. As @joshuef said, it is certainly doable.


#42

Oh yes…thank you for bringing this up. I needed a reminder to address this issue.
I too am having trouble with mock routing as of only several days ago.

I think core is no longer saving data to a single MockVault file because it didn’t simulate how a live network actually accesses and writes data. I’m wondering if this is a good clue to start my search.

I’ll be back…


#43

Error message:

C:\Users\wom\Desktop\web_hosting_manager>set NODE_ENV=dev                                                                                                                                                                                     C:\Users\wom\Desktop\web_hosting_manager>npm i && npm run rebuild && npm run package                                  npm WARN deprecated redux-promise-middleware@4.3.0: Critical bug in 4.3.0 swallows errors in render. Please downgrade to 4.2.1.                                                                                                                 npm WARN deprecated antd@2.5.0: It's recommended to upgrade antd to the latest compatible version 2.x                   npm WARN deprecated rc-radio@2.0.1: rc-radio is deprecated, please use rc-checkbox instead.                             npm WARN prefer global node-gyp@3.6.2 should be installed with -g                                                                                                                                                                               > electron-chromedriver@1.7.1 install C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-chromedriver     > node ./download-chromedriver.js                                                                                                                                                                                                                                                                                                                                       > node-sass@3.13.1 install C:\Users\wom\Desktop\web_hosting_manager\node_modules\node-sass                            > node scripts/install.js                                                                                                                                                                                                                       Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-48_binding.node           Download complete..] - :                                                                                                Binary saved to C:\Users\wom\Desktop\web_hosting_manager\node_modules\node-sass\vendor\win32-x64-48\binding.node      Caching binary to C:\Users\wom\AppData\Roaming\npm-cache\node-sass\3.13.1\win32-x64-48_binding.node                                                                                                                                           > electron@1.4.12 postinstall C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron                          > node install.js                                                                                                                                                                                                                                                                                                                                                       > node-sass@3.13.1 postinstall C:\Users\wom\Desktop\web_hosting_manager\node_modules\node-sass                        > node scripts/build.js                                                                                                                                                                                                                         Binary found at C:\Users\wom\Desktop\web_hosting_manager\node_modules\node-sass\vendor\win32-x64-48\binding.node      Testing binary                                                                                                          Binary is fine                                                                                                                                                                                                                                  > web-hosting-manager@0.1.1 postinstall C:\Users\wom\Desktop\web_hosting_manager                                      > concurrently "install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"                                                                                                                                       [1] node node_modules/fbjs-scripts/node/check-dev-engines.js package.json exited with code 0                            [0] Installing app dependencies for arch x64 to C:\Users\wom\Desktop\web_hosting_manager\app                          [0] Error: C:\Program Files\nodejs\node.exe exited with code 1                                                          [0] Error output:                                                                                                       [0] npm ERR! git clone --template=C:\Users\wom\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/maidsafe/safe_app_nodejs.git C:\Users\wom\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-maidsafe-safe-app-nodejs-git-2750b887: undefined                                                                                 [0] npm ERR! git clone --template=C:\Users\wom\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/maidsafe/safe_app_nodejs.git C:\Users\wom\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-maidsafe-safe-app-nodejs-git-2750b887: undefined                                                                                 [0] npm ERR! Windows_NT 10.0.15063                                                                                      [0] npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production" "--cache-min" "999999999" "--build-from-source"                                                [0] npm ERR! node v6.11.1                                                                                               [0] npm ERR! npm  v3.10.10                                                                                              [0] npm ERR! code ENOGIT                                                                                                [0]                                                                                                                     [0] npm ERR! not found: git                                                                                             [0] npm ERR!                                                                                                            [0] npm ERR! Failed using git.                                                                                          [0] npm ERR! This is most likely not a problem with npm itself.                                                         [0] npm ERR! Please check if you have git installed and in your PATH.                                                   [0]                                                                                                                     [0] npm ERR! Please include the following file with any support request:                                                [0] npm ERR!     C:\Users\wom\Desktop\web_hosting_manager\app\npm-debug.log                                           [0]                                                                                                                     [0]     at ChildProcess.childProcess.once.code (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\src\util\util.ts:125:14)                                                                                               [0]     at ChildProcess.g (events.js:292:16)                                                                            [0]     at emitTwo (events.js:106:13)                                                                                   [0]     at ChildProcess.emit (events.js:191:7)                                                                          [0]     at maybeClose (internal/child_process.js:891:16)                                                                [0]     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)                                        [0] From previous event:                                                                                                [0]     at spawn (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\src\util\util.ts:88:3)       [0]     at installDependencies (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\src\yarn.ts:65:3)                                                                                                                      [0]     at C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\src\yarn.ts:11:11                   [0]     at next (native)                                                                                                [0] From previous event:                                                                                                [0]     at installOrRebuild (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\out\yarn.js:33:21)[0]     at C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\src\install-app-deps.ts:29:2        [0]     at next (native)                                                                                                [0] From previous event:                                                                                                [0]     at main (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\out\install-app-deps.js:27:21)[0]     at Object.<anonymous> (C:\Users\wom\Desktop\web_hosting_manager\node_modules\electron-builder\out\install-app-deps.js:73:1)                                                                                                           [0]     at Module._compile (module.js:570:32)                                                                           [0]     at Object.Module._extensions..js (module.js:579:10)                                                             [0]     at Module.load (module.js:487:32)                                                                               [0]     at tryModuleLoad (module.js:446:12)                                                                             [0]     at Function.Module._load (module.js:438:3)                                                                      [0]     at Module.runMain (module.js:604:10)                                                                            [0]     at run (bootstrap_node.js:389:7)                                                                                [0]     at startup (bootstrap_node.js:149:9)                                                                            [0]     at bootstrap_node.js:504:3                                                                                      [0] install-app-deps exited with code 4294967295                                                                                                                                                                                                npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.1.0 (node_modules\7zip-bin\node_modules\7zip-bin-linux):                                                                                                                      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-linux@1.1.0: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})                                                                          npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules\7zip-bin\node_modules\7zip-bin-mac):  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})                                                                           npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):          npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})                                                                               npm ERR! Windows_NT 10.0.15063                                                                                          npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" npm ERR! node v6.11.1                                                                                                   npm ERR! npm  v3.10.10                                                                                                  npm ERR! code ELIFECYCLE                                                                                                npm ERR! web-hosting-manager@0.1.1 postinstall: `concurrently "install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"`                                                                                       npm ERR! Exit status 1                                                                                                  npm ERR!                                                                                                                npm ERR! Failed at the web-hosting-manager@0.1.1 postinstall script 'concurrently "install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"'.                                                                  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 web-hosting-manager package,                                 npm ERR! not with npm itself.                                                                                           npm ERR! Tell the author that this fails on your system:                                                                npm ERR!     concurrently "install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"    npm ERR! You can get information on how to open an issue for this project with:                                         npm ERR!     npm bugs web-hosting-manager                                                                               npm ERR! Or if that isn't available, you can get their info via:                                                        npm ERR!     npm owner ls web-hosting-manager                                                                           npm ERR! There is likely additional logging output above.                                                                                                                                                                                       npm ERR! Please include the following file with any support request:                                                    npm ERR!     C:\Users\wom\Desktop\web_hosting_manager\npm-debug.log   

hg

and that good old message I remember from the early days :stuck_out_tongue:

But really, I’m good now, because @joseph_meagher reminded me I can just pass JS to the console on my webpages without using my PUT balance to update files, so I’ve been doing that for testing, before PUT-ting my final changes to TEST 17. All I mostly do is JS anyway, so I’m good to continue devving now, thanks to that :slight_smile:


#44

also, is there no current API for NFS options to map a safe:// url to an index.html file we upload yet?

I see the NFS Emulation section of the DOM API but joseph said it’s not currently allowing us to map safe:// URLs to files just yet.

Wanted to confirm if that was true thanks!


#45

well i wasn’t able to retrieve an NFS file but i think even it is working right now there will be changes soon to how datamaps are handled and could be moved over to the mutable data

the mapping urls to nfs data is a seperate a mutable data with the typetags 15002 and 15001, @hunterlester made a great topic about how to achieve it on the safe dev forums https://forum.safedev.org/t/how-to-upload-a-file-to-the-network/ but it could be a bit deprecated depending on how the changes are made


#46

kk

looks like I couldn’t use the console the way I wanted, with all the different types of files I modify while developing, so now I keep running into these…

Might ask around for more invitations for more accounts, as I would like to continue trying to make things work on TEST 17


#47

sorry to keep bothering all u guys all the time every day… just trying to develop…

hosting manager looks like a white screen as soon as I upload a file… repeated 7 times to same result…

Happening to one of my safe-fs guys right now too…

is anyone developing successfully on Windows? Switching to Linux now.


#48

lol I wish I could develop everyday but I cannot.

I don’t think you’re being annoying or bugging. It is a good thing. You’re trying unlike most of people who would crowdfund, then ditch at last resort.


#49

hi I keep getting “Insufficient Balance” and I think it’s definitely not true,

I’ve just uploaded my initial, 68 file web project, and then as soon as I try to make any updates (new edited html file upload, etc) then it gives that insufficient error.

happens every time, to me and my different devs too.

Is this real? just trying to make progress thanks


#50

we keep having trouble in these areas.

Trying older versions of mock browser & apps now, to try to find anything that can work


#51

This was something that I forgot about and had to do before.

If I delete my local MockVault file, restart browser, and application, then everything in mock-routing works fine.

Check documentation here, https://doc.rust-lang.org/std/env/fn.temp_dir.html, for how to find your system’s temp directory and you’ll find MockVault there.

Let me know if you need help finding it.

cc: @whiteoutmashups


#52

I am getting an error telling me I have an insufficient account balance. I deleted the MockVault temp directory, closed the browser, and restarted it from a new shell, but I still get the same error:

Uncaught (in promise) Error: Core error: Routing client error -> Insufficient account balance for this operation at module.exports


#53

These questions tend to get answered a little more quickly at safedev.org and tagging some of the front end guys can help. @bochaco @hunterlester @joshuef


#54

@Nick_Virag Hi Nick! :slight_smile:

Which browser release are you using?
If downloading a release, be sure to download an archive with dev affixed, like those here: https://github.com/joshuef/peruse/releases/tag/webId-Builds