Problem with testing Peruse v0.6.0 and web API playground 3.0

I’ve problems with testing Peruse v0.6.0 and web API playground version 3.
I use Linux Mint 18.3 and this is what I tried:

  • I first did some tests with a first Linux user, but then I tested with a second (new) user, to start from a ‘clean sheet’. Below only the tests with that second user.
  • I tested with Peruse, version v0.6.0-linux-x64-dev with of course variable NODE_ENV=dev.
  • I did get OS error code 13: “permission denied” when trying to create a new account in Peruse.
    After a bit of looking I solved this problem by removing /tmp/MockVault (created by first user, so ‘access denied’ for second user…)
    → Maybe I’m the exception in trying to test with multiple users on the same Linux OS, but it could an idea to give /tmp/MockVault something user specific in its path, to prevent this problem? Or make /tmp/MockVault writable for everyone.
  • After creating an account, I noticed that Peruse itself isn’t authenticated. I expect that this already wrong?:
    I see in Peruse the following message:

Looks like you haven‘t authorised any apps yet.

  • I started the safe_web_api_playground as follows:

git clone GitHub - maidsafe-archive/safe_examples: examples showcasing various features of the SAFE Network
cd safe_examples/
git branch playground3-0
git checkout playground3-0
cd safe_web_api_playground
yarn
yarn gulp

Then I surf in Peruse to http://localhost:3003
I get the code snippet for safeApp.initialise. I then click on “RUN” and I get the followng error:
TypeError: window.safeApp.initialise is not a function
Am I doing something wrong here?

1 Like

Having the same issue with the apis. It seems that they are in the midst of moving some things around and not updated yet?

Original question:

1 Like

@Wes @draw:
Master is not yet up to date (as we still have safe_browser out there with the olde apis). There’s a safe examples branch over here to be using for testing the new APIs.


@draw I suspect your permission problem will still exist though! I’ll get this task speccd into JIRA as it’s something we should be considering, for sure.

1 Like
  • Master is not yet up to date

Do you mean master of GitHub - maidsafe/sn_browser: Safe Network Browser Application ?–> I tested with the Peruse Dev version, downloaded from here, like recommended in the 2 previous Dev updates.

Or do you mean the master of GitHub - maidsafe-archive/safe_examples: examples showcasing various features of the SAFE Network ?
→ I tried to get the ‘safe examples branch’ playground3-0, as is also mentioned in the Dev updat of 14 june. I tried the following to get this:

git branch playground3-0
git checkout playground3-0

Am I doing this wrong, or is playground3-0 also not up to date (e.g. still containing absolete functions)?

  • suspect your permission problem will still exist though!

Do you mean that I’ve to manually clean up additional files besides /tmp/MockVault. Or the fact that this manual clean up is still necessary?

fyi: I can only look at this any further this evening or later.

Edit: concerning the playground branch. I was indeed testing with the master branch, instead of playground3-0. I created a new branch ‘playground3-0’ from the master.
This seems to be more correct (I’ll test later):

git branch -a

This gives all existing branches, including remotes/origin/playground3-0

git checkout remotes/origin/playground3-0

I’ve mainly worked with Mercurial until now and not that often with branches.

I meant the examples repo is not up to date yet. I see you found the branch though :+1: nice.

Do you mean that I’ve to manually clean up additional files besides /tmp/MockVault. Or the fact that this manual clean up is still necessary?

Yeh the problem will persist, as it’s to do with how we’re saving the MockVault file (and its perms). We’ve a JIRA issue to track this here now fyi: [MAID-2878] - JIRA

1 Like

What works in the playground for me:
app initialiseApp -> auth genAuthUri -> app authorise -> auth loginFromUri.
Is the code @loginFromUri correct?:
app = await app.auth.loginFromUri(authUri);
It is on purpose that app is overwritten?

Then I try auth getContainer and there the program hangs (the moving circle).
IsNetStateConnected, canAccessContainter etc work before the hang
It could be that I have to do something before getContainer (something with genContainerAuthUri?). If that is the case: what has to be done and/or is there an example?

< wrong >
I was having the same issue, but with the authorize app. I has restarted playground to use the 3.0, but I had not restarted peruse. After restarting them both, both API calls went through. Possibly a similar issue when updating to 3.0?
< /wrong >

EDIT: Get container also hangs for me…

EDIT: Got it. In the return it’s returning mdHandle instead of mData. Change that out and good to go.

2 Likes

With the mdHandle->mData remark from @Wes, I could test much more with the playground version 3.0.
So for me this topic can be ‘solved’ (or better to wait until JIRA issue is solved?).
Ps: I’ve ported my Safe-todo-draw: on Alpha 2 previous version still safe://todo, the ‘Peruse v0.6.0 version’: safe://to-do.

5 Likes

Ah nice one @draw. Glad you got that going.

Great to see an app using the new API :+1: :tada:

3 Likes

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