This is the more or less the same version of safe-js as previous, with added extra functionality to be included with beaker (alpha didnt really implement many changes AFAIK, just codified 0.5 for docs on release).
So it’s got API versioning in there for 0.5, and as far as I saw things (getting/creating dirs, authenticating) were all still compatible. So you should be good. But I’ve yet to comprehensively go over safe-js with the latest docs, so if you come across an implementation inconsistency, please let me know or open a safe-js issue.
Definitely! At a starbucks, just finished getting my new ubuntu setup running a few mins ago (dual boot on a MS Surface-- very slick! ) so I’ll be able to download and test this when I get home
Just gave it a shot, and couldn’t build with ./configure or make, which I usually use to compile.
Also just tried getting the last releases (0.2.3 and 0.2.2) to work on my new Ubuntu surface and couldn’t get them to start. I would just double click on the application and nothing would happen
Don’t know if I need / am missing any special dependencies perhaps?
I can! I’ve changed ‘utils’ to safeAuth inside of beaker (makes more sense than the vague ‘utils’), this will be reflected in safe-js soon, but for now in SBB: window.safeAuth.authorise is indeed what you’re looking for (though you have a typo in what you posted here, fyi).
Are you on a safe: site? the APIs are only present on safe protocol sites. Let me know if you’re still not seeing the APIs at all, please.
aha! you’re running in to a bug in safe-js/beaker compat.
I’ve got this sorted locally, and you’ll be please to know that your site auths. I’ll going to finalise this commit and push the fix, so hopefully in ~30 mins there’ll be a new build that will work.
As im working through here, I’m seeing issues with file writing, Auth is working fine for me locally, as is directory interaction, but creating / modifying files is currently broken.
Bad news : I still do not manage to use the binaries that you released : if I try to run the browser as extracted from safer-beaker-browser-0.2.4-0.tar.gz , I get an error with ressources/app.asar :
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '~/archives/maidsafe/beaker-binaries/safer-beaker-browser-0.2.4-0/resources/app.asar/node_modules/sqlite3/lib/binding/electron-v1.3-linux-x64/node_sqlite3.node'
When browsing the unpacked folders, ressources/app.asar doesn’t appear as a folder but as an unknown file type , same for electron.asar - ie , there is no node_modules folder inside app.asar
I am not sure if the error comes from my side, like I am skipping a step somewhere, or from your packaging ?
Definitely seems like something is going wrong with the CI packaging there. Not sure what’s changed, I had it running on ubun16 VBs here. I’ll dive back in with the build once I’m a bit further with the API.
Good that you can get it going for now at least!
I expect to get another test release out later today, with file writing sorted. So you should be able to start using the network for app data storage properly oh so soon.
Hint : when building from the git repo, if I do a npm run burnthemall, then starting the browser fails with a very similar error:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '~/archives/maidsafe/beaker/app/node_modules/sqlite3/lib/binding/electron-v1.3-linux-x64/node_sqlite3.node'
then if I do a npm run rebuild, sqlite3.c is being rebuilt and everything goes fine
so my guess is that the package that you release is missing the sqlite module built some way.
I am not very aware of npm and packaging, but I hope this can help !
I’m now experimenting with NFS functions, and it took me a while to understand how to retrieve a directory content.
I have had to dig deep into window.safeNFS.getDir 's response in order to decode the returned directory information, this way :
var dir = window.safeNFS.getDir ( tok , "" , false );
dir.then ( function (result) {
var data = result.body._readableState.buffer.head.data ;
var datastr = Decodeuint8arr ( data ) ; console.log ( datastr );
} );
If I understand correctly, safeNFS.getDir returns ‘body’ as a stream, is it how things are supposed to be now ? I think I remember reading a dev update about this a few weeks ago, but I think I must have missed a train !