[WHM + safe-browser] How do I get into mock mode?

I start my safe browser mock version with:

/opt/Maidsafe/safe-browser/safe-browser --args --mock --preload %U

But I lost the arguments for starting a mock version of the web-hosting-manager.
I’ve tried this:

NODE_ENV=dev /opt/Maidsafe/web-hosting-manager/web-hosting-manager

It doesn’t have any effect.
It opens the regular safe browser.

Also, I can’t get logged into the safe network browser.
The old password mocksafenetworkdeveloper no longer works.

@folaht if you’re triggering the opening of the SAFE Browser from your WHM, then right now that’ll only open in live mode.

You should just need to have the SAFE Browser open in mock mode first, and then open the WHM as you describe above, and it should go. :+1:

1 Like

Okay, so I don’t need a “mock” version of WHM what I used to have.

I remember having a mock and live version of Peruse and WHM, 4 applications in total.

So this time I only need 3?

I downloaded the dev version which opens in mock network immediately and even that doesn’t work.

I get Account does not exist for mocksafenetworkdeveloper:mocksafenetworkdeveloper.

No, you’d still need to use the correct version of WHM


have you tried creating an account? Incase there’s an issue with preload…

Okay, that seems to work.

What’s the use of having a dev version when one can open the non-dev version in mock mode?

I just tried. Mock no longer works in non-dev. I was sure at some later point I no longer needed that and had 3 or 2 apps, one version of version of Peruse and two of WHM… I think. With Peruse I’m certain that I started to only need one.

Working away from home right now and using an oldish laptop with none of my current “stuff” on it.

So I download and unzip both versions of safe-browser and WHM
open two terminals - cos I want to look at any output
set NODE_ENV=dev in both terminals
in first terminal:
cd ~/projects/maidsafe/safe-browser-v0.13.0-linux-x64-dev
./safe-browser

create new account as usual -all looks well

in second terminal:
cd ~/projects/maidsafe/web-hosting-manager-v0.5.1-linux-x64-dev
./web-hosting-manager

get message waiting for authorisation - seems fair…

but on the safe-browser I get this popup
image
and the message in the second terminal.

This instance should quit. Ciao!

What am I doing wrong?
Ubuntu 18.04 all up to date with browser v0.13.0 and WHM v0.5.1

1 Like

I’m back to four apps again, same versions, and receive the very same error.

1 Like

Any hints, @joshuef?
Is this behaviour you can replicate?

You may need NODE_ENV=test instead, for running the WHM dev @southside , for the browser you shouldn’t need any env var set if using the packaged dev version already

1 Like

Sorry I get the same error as before.

set NODE_ENV=test in WHM-dev terminal, leave NODE_ENV unset in browser dev terminal

I thought the only two values for NODE_ENV were dev and prod

Try with this from the terminal instead:
NODE_ENV=test ~/projects/maidsafe/web-hosting-manager-v0.5.1-linux-x64-dev/web-hosting-manager

or if you are within the folder: NODE_ENV=test ./web-hosting-manager, both work for me

1 Like

That’s a normal message (though maybe should be reworded now, or maybe not show up for prod versions at all.) (For the curious its a new ‘browser process’ starting and closing itself when it sees there’s one already open. This passes any command line args to the already running process).

The IncompatibleMockStatus should indicate that one of the programs isn’t in mock mode. But it may also mean that their running incompatible safe_app versions.

Let me check locally @southside, ill get back to you.


edit: Can replicate on my MacOS yep. Will dig in. :+1:

2 Likes

Thank you
this works
NODE_ENV=test ~/projects/maidsafe/web-hosting-manager-v0.5.1-linux-x64-dev/web-hosting-manager

this does NOT work

willie@sputnik:~/projects/maidsafe$ echo $NODE_ENV
test
willie@sputnik:~/projects/maidsafe$ ./web-hosting-manager-v0.5.1-linux-x64-dev/web-hosting-manager 
    This instance should quit. Ciao!

so although I had already set the env variable earlier in the terminal session, it did not seem to be recognised and has to be specifically set on the command line itself

@joshuef

[complaint]

Why use computerwide environment variables?

What if I want to use the live version at the same time, or use other applications?

I can’t launch this directly from a desktop launcher.
I’m forced to use and launch a script, because the NODE_ENV=test command is not recognized.

[complaint #2]

I also notice that WHM stays at waiting for authorisation if I have to login first.

Ah, I tried it with NODE_ENV=dev not test :man_facepalming: Glad you got that going @southside

yes, @folaht, the WHM is less than ideal. I wholeheartedly agree. (You may notice the browser doesn’t require env vars to be set at all).

Sadly we’re not currently focussing on the WHM beyond maintaining compatibility for the browser. PRs to update documentation (or indeed fix issues) are very welcome though!

2 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.