coin-hive icon indicating copy to clipboard operation
coin-hive copied to clipboard

Fails to run Electroneum miner on raspberry pi

Open felixgalindo opened this issue 7 years ago • 7 comments

(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 avatar Dec 14 '17 15:12 felixgalindo

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})); })();

felixgalindo avatar Dec 14 '17 15:12 felixgalindo

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

cazala avatar Dec 14 '17 19:12 cazala

specially this:

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

cazala avatar Dec 17 '17 20:12 cazala

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 [email protected] 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.

felixgalindo avatar Dec 17 '17 21:12 felixgalindo

@felixgalindo so is the issue solved?

cazala avatar Dec 18 '17 01:12 cazala

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.

felixgalindo avatar Dec 18 '17 02:12 felixgalindo

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

cazala avatar Dec 18 '17 02:12 cazala