cazala / coin-hive

CoinHive cryptocurrency miner for node.js
https://www.npmjs.com/package/coin-hive
MIT License
1.99k stars 399 forks source link

Fails to run Electroneum miner on raspberry pi #74

Open felixgalindo opened 6 years ago

felixgalindo commented 6 years ago

(node:4000) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome! /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 1: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: ELF: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 1: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: cannot open S: No such file /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 1: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �hP��PôPô����: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 1: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: @�: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 2: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: @%$@@@0ppp�c�c��c��c��c@�@�,#�,#Q�td��c��c��c: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 3: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 4: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 5: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 6: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 7: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: �: not found /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: 8: /home/pi/monero-miner/node_modules/puppeteer/.local-chromium/linux-497674/chrome-linux/chrome: Syntax error: ")" unexpected

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

(node:4000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code

node -v v8.9.3

chromium-browser -version Chromium 60.0.3112.89 Built on Ubuntu 14.04, running on Raspbian 9.1

uname -a Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux

felixgalindo commented 6 years ago

const CoinHive = require('coin-hive'); (async() => { const miner = await CoinHive('etnKey', { pool: { host: 'etnpool.minekitten.io', port: 3333 } }); await miner.start(); miner.on('found', () => console.log('Found!')) miner.on('accepted', () => console.log('Accepted!')) miner.on('update', data => console.log( Hashes per second: ${data.hashesPerSecond} Total hashes: ${data.totalHashes} Accepted hashes: ${data.acceptedHashes} )); })();

cazala commented 6 years ago

have you tried this? https://github.com/cazala/coin-hive#troubleshooting

cazala commented 6 years ago

specially this:

const miner = await CoinHive('site-key', {
  launch: {
    executablePath: '/usr/bin/chromium-browser', 
    args: ['--disable-setuid-sandbox', '--no-sandbox']
  }
});
felixgalindo commented 6 years ago

Yes I tried that. It doesn’t work because the wrong version of chromium gets installed. I had to install a different version manually and point it to it.

On Dec 17, 2017, at 2:53 PM, Juan Cazala notifications@github.com wrote:

specially this:

const miner = await CoinHive('site-key', { launch: { executablePath: '/usr/bin/chromium-browser', args: ['--disable-setuid-sandbox', '--no-sandbox'] } }); — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

cazala commented 6 years ago

@felixgalindo so is the issue solved?

felixgalindo commented 6 years ago

Well I resolved it on my own using a work-around but anyone who tries to use the coin-hive library will experience the same issue.

cazala commented 6 years ago

if you could share the workaround so I include it in the troubleshooting/faqs section it would be very helpful (: