Fails to run Monero miner on raspberry pi
See original GitHub issue(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); })();`
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
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.
No problem. Glad it worked for you too.