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

Fails to run Monero miner on raspberry pi

Open felixgalindo opened this issue 7 years ago • 10 comments

(node:5095) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r497674 (node:5095) [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

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

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

Code: `const CoinHive = require('coin-hive');

(async() => {

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

// Start miner await miner.start();

// Listen on events 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}));

// Stop miner setTimeout(async() => await miner.stop(), 60000); })();`

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

Yes

On Dec 14, 2017, at 1:36 PM, Juan Cazala [email protected] wrote:

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

— 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 14 '17 20:12 felixgalindo

I'm having the same issue. Already tried with https://github.com/cazala/coin-hive#troubleshooting but I think it's a chromium's problem as the latest version ain't available for ARM https://github.com/GoogleChrome/puppeteer/issues/550 I also tried installing a lower version of puppeteer and installing an alternative built for headless-chromium but still no success. Anyhow, if anyone figures out how to fix this please share it.

benocd avatar Dec 20 '17 18:12 benocd

The way I did it was by downloading the chromium build from this url https://drive.google.com/a/chromium.org/uc?id=0B7RLEApsOKBLZUZuQl9JR3dXS2c&export=download Then set executablePath to where you extracted it to. For example:

const miner = await CoinHive('something', { launch: { executablePath: '/home/pi/coin-hive/headless-chrome/chrome', args: ['--disable-setuid-sandbox', '--no-sandbox'] } });

This has been tested on Pi 3.

felixgalindo avatar Dec 20 '17 19:12 felixgalindo

@felixgalindo Thanks for that man, it worked! I was about to buy ExaGear to run Chrome instead of Chromium and then I found your hack. Awesome!

antonio-gomez avatar Dec 23 '17 08:12 antonio-gomez

No problem. Glad it worked for you too.

On Dec 23, 2017, at 2:37 AM, Antonio Gomez [email protected] wrote:

@felixgalindo Thanks for that man, it worked! I was about to buy ExaGear to run Chrome instead of Chromium and then I found your hack. Awesome!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

felixgalindo avatar Dec 23 '17 08:12 felixgalindo

Just to know, how many hashrate gives running in a PI 3? Thanks in advance :)

ghost avatar Jan 03 '18 03:01 ghost

Nothing to write home about.... I am getting around 3-5 hashes per second.

On Tue, Jan 2, 2018 at 9:56 PM, tejanous [email protected] wrote:

Just to know, how many hashrate gives running in a PI 3? Thanks in advance :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cazala/coin-hive/issues/75#issuecomment-354933290, or mute the thread https://github.com/notifications/unsubscribe-auth/ARa7fKm5v24oDlUp_ABeM2H5I7pm_7IIks5tGvpugaJpZM4RCQgL .

felixgalindo avatar Jan 03 '18 04:01 felixgalindo

Oh, that's a tiny amount. I was expecting about 5-10 H/s. Thanks for your answer

ghost avatar Jan 03 '18 05:01 ghost

I am still getting this error even though I download headless-chrome

executablePath: '/home/pi/Downloads/headless-chrome/chrome'

(node:2435) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome!

MaestroJurko avatar Jan 03 '18 09:01 MaestroJurko