aletheia-foundation / aletheia-app

Alethia peer to peer publishing platform
http://aletheia-foundation.io/
GNU General Public License v3.0
48 stars 11 forks source link

npm run ipfs-local #76

Closed omakuva closed 6 years ago

omakuva commented 6 years ago

I confirm:


Report bugs - delete this section if not reporting a bug

To make your bug report as useful to others as possible, please consider the below and try to answer as many of them as possible:

Explain the problem and include additional details to help maintainers reproduce the problem:

My response:

Provide more context by answering these questions:

My reponse:

Include details about your configuration and environment:

My response:

AAA@BBB:~/Downloads/aletheia-app$ npm run ipfs-local

aletheia-app@1.0.0 ipfs-local /home/er10/Downloads/aletheia-app
./scripts/ipfs-local.sh

initializing ipfs node at .ipfs-develop generating 2048-bit RSA keypair...done peer identity: QmfEfdVERGkLxUsBquwAW8c62k3cLYdYGu11BVAP3JpMAh to get started, enter:

ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme

Initializing daemon... Swarm listening on /ip4/10.157.41.61/tcp/4001 Swarm listening on /ip4/127.0.0.1/tcp/4001 Swarm listening on /ip4/194.94.133.9/tcp/4001 Swarm listening on /ip6/::1/tcp/4001 API server listening on /ip4/127.0.0.1/tcp/5001 Error: serveHTTPGateway: manet.Listen(/ip4/127.0.0.1/tcp/8080) failed: listen tcp4 127.0.0.1:8080: bind: address already in use

npm ERR! Linux 4.14.0-rc7-amd64 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "ipfs-local" npm ERR! node v6.12.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the aletheia-app@1.0.0 ipfs-local script './scripts/ipfs-local.sh'. 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 aletheia-app package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./scripts/ipfs-local.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs aletheia-app npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls aletheia-app npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/AAA/Downloads/aletheia-app/npm-debug.log

AAA@BBB:/Downloads/aletheia-app$ cat npm-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'ipfs-local' ] 2 info using npm@3.10.10 3 info using node@v6.12.0 4 verbose run-script [ 'preipfs-local', 'ipfs-local', 'postipfs-local' ] 5 info lifecycle aletheia-app@1.0.0preipfs-local: aletheia-app@1.0.0 6 silly lifecycle aletheia-app@1.0.0preipfs-local: no script for preipfs-local, continuing 7 info lifecycle aletheia-app@1.0.0ipfs-local: aletheia-app@1.0.0 8 verbose lifecycle aletheia-app@1.0.0ipfs-local: unsafe-perm in lifecycle true 9 verbose lifecycle aletheia-app@1.0.0ipfs-local: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/er10/Downloads/aletheia-app/node_modules/.bin:/opt/texbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin 10 verbose lifecycle aletheia-app@1.0.0ipfs-local: CWD: /home/er10/Downloads/aletheia-app 11 silly lifecycle aletheia-app@1.0.0ipfs-local: Args: [ '-c', './scripts/ipfs-local.sh' ] 12 silly lifecycle aletheia-app@1.0.0ipfs-local: Returned: code: 1 signal: null 13 info lifecycle aletheia-app@1.0.0ipfs-local: Failed to exec ipfs-local script 14 verbose stack Error: aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:920:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 15 verbose pkgid aletheia-app@1.0.0 16 verbose cwd /home/er10/Downloads/aletheia-app 17 error Linux 4.14.0-rc7-amd64 18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "ipfs-local" 19 error node v6.12.0 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh 22 error Exit status 1 23 error Failed at the aletheia-app@1.0.0 ipfs-local script './scripts/ipfs-local.sh'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the aletheia-app package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error ./scripts/ipfs-local.sh 23 error You can get information on how to open an issue for this project with: 23 error npm bugs aletheia-app 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls aletheia-app 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

AAA@BBB:/Downloads/aletheia-app$ uname -a Linux BBB 4.14.0-rc7-amd64 #1 SMP Debian 4.14rc7-1~exp1 (2017-10-30) x86_64 GNU/Linux

Many thanks for the commitment.

KadeMorton commented 6 years ago

Hi omakuva! I'll see if we can get onto this to help you out.

omakuva commented 6 years ago

Thank you, @KadeMorton !

While I suspected it could be a sid related issue, I did

sudo npm install npm --global

after

npm run ipfs-local

the error-log becomes

aletheia-app@1.0.0 ipfs-local /home/AAA/Downloads/aletheia-app ./scripts/ipfs-local.sh

Initializing daemon... Swarm listening on /ip4/10.157.41.61/tcp/4001 Swarm listening on /ip4/127.0.0.1/tcp/4001 Swarm listening on /ip4/194.94.133.9/tcp/4001 Swarm listening on /ip6/::1/tcp/4001 API server listening on /ip4/127.0.0.1/tcp/5001 Error: serveHTTPGateway: manet.Listen(/ip4/127.0.0.1/tcp/8080) failed: listen tcp4 127.0.0.1:8080: bind: address already in use npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the aletheia-app@1.0.0 ipfs-local 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! /home/AAA/.npm/_logs/2017-11-18T16_18_24_460Z-debug.log

whereas the debug.log file hints to

AAA@BBB:~$ cat .npm/_logs/2017-11-18T16_04_51_355Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'ipfs-local' ] 2 info using npm@5.5.1 3 info using node@v6.12.0 4 verbose run-script [ 'preipfs-local', 'ipfs-local', 'postipfs-local' ] 5 info lifecycle aletheia-app@1.0.0~preipfs-local: aletheia-app@1.0.0 6 info lifecycle aletheia-app@1.0.0~ipfs-local: aletheia-app@1.0.0 7 verbose lifecycle aletheia-app@1.0.0~ipfs-local: unsafe-perm in lifecycle true 8 verbose lifecycle aletheia-app@1.0.0~ipfs-local: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/er10/Downloads/aletheia-app/node_modules/.bin:/opt/texbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin 9 verbose lifecycle aletheia-app@1.0.0~ipfs-local: CWD: /home/er10/Downloads/aletheia-app 10 silly lifecycle aletheia-app@1.0.0~ipfs-local: Args: [ '-c', './scripts/ipfs-local.sh' ] 11 silly lifecycle aletheia-app@1.0.0~ipfs-local: Returned: code: 1 signal: null 12 info lifecycle aletheia-app@1.0.0~ipfs-local: Failed to exec ipfs-local script 13 verbose stack Error: aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) 13 verbose stack at emitTwo (events.js:106:13) 13 verbose stack at EventEmitter.emit (events.js:191:7) 13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:106:13) 13 verbose stack at ChildProcess.emit (events.js:191:7) 13 verbose stack at maybeClose (internal/child_process.js:920:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 14 verbose pkgid aletheia-app@1.0.0 15 verbose cwd /home/AAA/Downloads/aletheia-app 16 verbose Linux 4.14.0-rc7-amd64 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "ipfs-local" 18 verbose node v6.12.0 19 verbose npm v5.5.1 20 error code ELIFECYCLE 21 error errno 1 22 error aletheia-app@1.0.0 ipfs-local: ./scripts/ipfs-local.sh 22 error Exit status 1 23 error Failed at the aletheia-app@1.0.0 ipfs-local script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

omakuva commented 6 years ago

Good news! No clue about how and why - perhaps web-access restrictions in public librares - yet:

npm run ipfs-local

aletheia-app@1.0.0 ipfs-local /home/er10/Downloads/aletheia-app ./scripts/ipfs-local.sh

Initializing daemon... Swarm listening on /ip4/127.0.0.1/tcp/4001 Swarm listening on /ip4/192.168.42.220/tcp/4001 Swarm listening on /ip4/92.226.93.70/tcp/4001 Swarm listening on /ip6/::1/tcp/4001 API server listening on /ip4/127.0.0.1/tcp/5001 Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080 Daemon is ready

Likewise:

npm start

aletheia-app@1.0.0 start /home/AAA/Downloads/aletheia-app truffle migrate && electron .

Compiling ./contracts/Migrations.sol... Compiling ./contracts/SubmittedPapersIndex.sol... Writing artifacts to ./build/contracts

Using network 'development'.

Running migration: 0001-initial-migration.js Deploying Migrations... Migrations: 0x46b68235e4f19e1e765317ce4659f77e43a42bba Saving successful migration to network... Saving artifacts... Running migration: 0002-deploy-submitted-papers-index.js Deploying SubmittedPapersIndex... SubmittedPapersIndex: 0x90c7041580c77e672c3a2a1e419be02a00599201 Saving successful migration to network... Contract addresses saved to ./build/addresses/SubmittedPapersIndex.development.json Saving artifacts...

So, I guess the issue can be safely closed.

KadeMorton commented 6 years ago

Glad to hear, thanks for reporting @omakuva !