axiom-org / axiom Goto Github PK
View Code? Open in Web Editor NEWSource code for the Axiom cryptoplatform
License: MIT License
Source code for the Axiom cryptoplatform
License: MIT License
Describe the bug
A clear and concise description of what the bug is. If it's a CLI bug, run with --verbose
to log extra information.
To Reproduce
Steps to reproduce the behavior:
Error: cannot perform operation for user 0xbe688a5bfafc89ea2b795cc893b4a3edbb161c1da92d942728bd5911bcae8d13c9b6 that has no account
at ChainClient.performOperation (/home/anand/.nvm/versions/node/v12.4.0/lib/node_modules/axiom-cli/build/node/iso/ChainClient.js:112:19)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at async ChainClient.updateBucket (/home/anand/.nvm/versions/node/v12.4.0/lib/node_modules/axiom-cli/build/node/iso/ChainClient.js:224:9)
at async setMagnet (/home/anand/.nvm/versions/node/v12.4.0/lib/node_modules/axiom-cli/build/node/node/cli-main.js:191:5)
at async upload (/home/anand/.nvm/versions/node/v12.4.0/lib/node_modules/axiom-cli/build/node/node/cli-main.js:217:5)
at async main (/home/anand/.nvm/versions/node/v12.4.0/lib/node_modules/axiom-cli/build/node/node/cli-main.js:501:9)
exiting due to error
' instead
For CLI bugs, please provide:
v12.4.0
0.0.26
For API bugs, please provide:
axiom-api
versionAdditional context
The commands used for signing up were successful.
axiom signup [email protected]
axiom login
axiom status
Output of status: logged into alpha network as 0xbe688a5bfafc89ea2b795cc893b4a3edbb161c1da92d942728bd5911bcae8d13c9b6 no account found for user 0xbe688a5bfafc89ea2b795cc893b4a3edbb161c1da92d942728bd5911bcae8d13c9b6
A couple people have reported that they run:
$ axiom upload . bucket-name
creating torrent...
And it just hangs without further output. Still happening with CLI version 0.21
I just tried a fresh install of the axiom CLI on Windows 10 and later on Ubuntu running in a VM. In both cases I tried to run the "axiom signup {email}" command and got hit with a usage response. "axiom which" works fine although the CLI does not recognize the commands signup, status, login, etc. I saw in the docs that Windows might not be fully supported, although this should work in the Ubuntu VM right?
Following the guide and things are working until the upload, where it hashes the content and hangs. It has been running for ~5 minutes so far.. not sure if that is expected. If it is, please put a message saying how long it is expected to take! Usually I wouldn't be this patient..
Eric-MBP:~ ericvicenti$ axiom login
logging into alpha network...
please enter your passphrase: *****************************************
hello. your public key is 0xa249dec7ba91db78b422309866a0be3e7e41b6c5a7a140db573531784fdfbc4b6604
Eric-MBP:~ ericvicenti$
Eric-MBP:~ ericvicenti$
Eric-MBP:~ ericvicenti$ axiom create-bucket evv-test 5
logged into alpha network as 0xa249dec7ba91db78b422309866a0be3e7e41b6c5a7a140db573531784fdfbc4b6604
created bucket:
{
magnet: '',
name: 'www:evv-test',
owner: '0xa249dec7ba91db78b422309866a0be3e7e41b6c5a7a140db573531784fdfbc4b6604',
providers: [
{ available: 0, buckets: null, capacity: 0, id: 1, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 2, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 3, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 4, owner: '' }
],
size: 5
}
Eric-MBP:~ ericvicenti$ mkdir ~/my-cool-example
Eric-MBP:~ ericvicenti$ cd ~/my-cool-example
Eric-MBP:my-cool-example ericvicenti$ echo "hello decentralized world" > index.html
Eric-MBP:my-cool-example ericvicenti$ axiom upload . my-cool-example
creating torrent...
content hash is 9366ba8ed69495f59446ed40a34cc9ed5247aced
I am following the Axiom getting started documentation to experiment with buckets.
The output of the command axiom create-bucket dennisons-example 1
is:
logged into alpha network as 0xd49281c478ea6a58d63423fd954ed283464a478521c736cdaac8783dc5103dab0d20
created bucket:
{ magnet: '',
name: 'www:dennisons-example',
owner:
'0xd49281c478ea6a58d63423fd954ed283464a478521c736cdaac8783dc5103dab0d20',
providers:
[ { available: 0, buckets: null, capacity: 0, id: 1, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 2, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 3, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 4, owner: '' } ],
size: 1 }
I assume the available: 0
means that there are no providers available.
Then: axiom upload . dennisons-example
(after having . created the hello world
body for an index.html
gives me this:
creating torrent...
content hash is c42fbe7e8090e4702c31ec236733805059f673ce
This hangs for quite awhile until it finally returns this:
(node:93214) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit
While in another window: axiom download dennisons-example
returns:
bucket has no magnet: {"magnet":"","name":"www:dennisons-example","owner":"0xd49281c478ea6a58d63423fd954ed283464a478521c736cdaac8783dc5103dab0d20","providers":[{"available":0,"buckets":null,"capacity":0,"id":1,"owner":""},{"available":0,"buckets":null,"capacity":0,"id":2,"owner":""},{"available":0,"buckets":null,"capacity":0,"id":3,"owner":""},{"available":0,"buckets":null,"capacity":0,"id":4,"owner":""}],"size":1}
Any ideas?
MacOS 10.14.4
➜ gaia-gps-gear-planner axiom upload . www:gaia-gps-gear-planner
creating torrent...
[1] 14506 segmentation fault axiom upload . www:gaia-gps-gear-planner
➜ gaia-gps-gear-planner ls
index.html
➜ gaia-gps-gear-planner axiom version
0.0.20
➜ gaia-gps-gear-planner axiom which
/usr/local/lib/node_modules/axiom-cli/build/node/node/cli-main.js
Output from using Yarn (1.16.0) and npm (12.3.1).
Yarn:
Andrews-MacBook-Pro:src andrewjohnson$ yarn global add axiom-cli
yarn global v1.16.0
[1/4] 🔍 Resolving packages...
warning axiom-cli > webtorrent-hybrid > create-torrent > [email protected]: I wrote this module a very long time ago; you should use something else.
warning axiom-cli > @material-ui/core > recompose > fbjs > [email protected]: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
warning axiom-cli > parcel-bundler > htmlnano > uncss > jsdom > [email protected]: use String.prototype.padStart()
[2/4] 🚚 Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "6.x || 8.x || 10.x || 11.x". Got "12.3.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
npm:
Andrews-MacBook-Pro:src andrewjohnson$ npm install -g axiom-cli
npm WARN deprecated [email protected]: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: I wrote this module a very long time ago; you should use something else.
/usr/local/bin/axiom -> /usr/local/lib/node_modules/axiom-cli/build/node/node/cli-main.js
[email protected] install /usr/local/lib/node_modules/axiom-cli/node_modules/fsevents
node install
node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/usr/local/lib/node_modules/axiom-cli/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" is installed via remote
[email protected] install /usr/local/lib/node_modules/axiom-cli/node_modules/deasync
node ./build.js
darwin-x64-node-12
exists; testingBinary is fine; exiting
[email protected] install /usr/local/lib/node_modules/axiom-cli/node_modules/bufferutil
node-gyp-build
[email protected] install /usr/local/lib/node_modules/axiom-cli/node_modules/utf-8-validate
node-gyp-build
[email protected] install /usr/local/lib/node_modules/axiom-cli/node_modules/wrtc
node scripts/install.js
Searching for a pre-built wrtc binary
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.3.7/Release/node-v72-darwin-x64.tar.gz
node-pre-gyp ERR! stack at Request. (/usr/local/lib/node_modules/axiom-cli/node_modules/node-pre-gyp/lib/install.js:139:27)
node-pre-gyp ERR! stack at Request.emit (events.js:205:15)
node-pre-gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/axiom-cli/node_modules/request/request.js:1066:10)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:200:13)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:573:23)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:460:22)
node-pre-gyp ERR! stack at TLSSocket.emit (events.js:200:13)
node-pre-gyp ERR! stack at addChunk (_stream_readable.js:290:12)
node-pre-gyp ERR! stack at readableAddChunk (_stream_readable.js:271:11)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.3.1/bin/node" "/usr/local/lib/node_modules/axiom-cli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/axiom-cli/node_modules/wrtc
node-pre-gyp ERR! node -v v12.3.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
404 status code downloading tarball https://node-webrtc.s3.amazonaws.com/wrtc/v0.3.7/Release/node-v72-darwin-x64.tar.gz
Unable to install a pre-built wrtc binary; falling back to ncmake
Running ncmake configure
CMake binary could not be found. Please verify your PATH.
/usr/local/lib/node_modules/axiom-cli/node_modules/wrtc/scripts/install.js:51
throw new Error('ncmake configure failed for wrtc'); ^
Error: ncmake configure failed for wrtc
at build (/usr/local/lib/node_modules/axiom-cli/node_modules/wrtc/scripts/install.js:51:11) at download (/usr/local/lib/node_modules/axiom-cli/node_modules/wrtc/scripts/install.js:40:5) at Object.<anonymous> (/usr/local/lib/node_modules/axiom-cli/node_modules/wrtc/scripts/install.js:67:3) at Module._compile (internal/modules/cjs/loader.js:774:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10) at Module.load (internal/modules/cjs/loader.js:641:32) at Function.Module._load (internal/modules/cjs/loader.js:556:12) at Function.Module.runMain (internal/modules/cjs/loader.js:837:10) at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install:
node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andrewjohnson/.npm/_logs/2019-05-26T14_15_50_548Z-debug.log
Certain (login only?) actions are causing the CLI to hang when it should exit. i.e. if I start logged out and try to login or status (perhaps with an invalid passphrase), it will hang.
To Reproduce
axiom login
$ axiom status --verbose
logging into alpha network...
please enter your passphrase:
hello. your public key is 0x9aea20096b44ffea6404b8abc57d7e023182531e9f23099d2440afefb7df7b3f1a99
sending body: e:0x275866050717ce5a0d172e9a2701330742109d977b2178f523bef487e2a607957c5c:PzX7gerrkIbKIANIBQstP3nB1sZPJ7W+bybJDQpcIk7ejpTQLCiEruEQauZtLxkqfalxV6ufGiSBL3/BB/OYDw:{"message":{"account":"0x9aea20096b44ffea6404b8abc57d7e023182531e9f23099d2440afefb7df7b3f1a99"},"type":"Query"}
no account found for user 0x9aea20096b44ffea6404b8abc57d7e023182531e9f23099d2440afefb7df7b3f1a99
➜ src axiom create-bucket gaia-gps-gear-planner 1
logged into alpha network as 0x40e864f1ae0f9f304ce4dbf94a748cc0c1f9681f9b1bd3fc87c6377695a6ae2081d5
created bucket:
{ magnet: '',
name: 'www:gaia-gps-gear-planner',
owner:
'0x40e864f1ae0f9f304ce4dbf94a748cc0c1f9681f9b1bd3fc87c6377695a6ae2081d5',
providers:
[ { available: 0, buckets: null, capacity: 0, id: 1, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 2, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 3, owner: '' },
{ available: 0, buckets: null, capacity: 0, id: 4, owner: '' } ],
size: 1 }
➜ src mkdir gaia-gps-gear-planner
➜ src cd gaia-gps-gear-planner
➜ gaia-gps-gear-planner touch index.html
➜ gaia-gps-gear-planner sub index.html
➜ gaia-gps-gear-planner axiom upload . gaia-gps-gear-planner
creating torrent...
[1] 40222 segmentation fault axiom upload . gaia-gps-gear-planner
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.