Troubleshooting

Troubleshooting

Troubleshooting common errors during installation and use.

Errors:

bigint

Error message: bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

This error can be safely ignored, it will not cause any issues. To make the error go away, you'll need to install updated Python and C++ build tools.

MacOS

Current versions of MacOS come pre-built with Python. To install the C++ build tools:

  • First install XCode (opens in a new tab)
  • Once XCode is installed, go to Preferences, Downloads, and install the Command Line Tools

Windows

Windows users need to install both Python and C++ build tools. These commands must be run with administrator permissions.

// First run:
npm i -g --add-python-to-path --vs2015 --production windows-build-tools
 
// Then run:
npm i -g node-gyp@latest

UNIX

Most UNIX distributions come with Python installed. To install C++ build tools, the following works for most Debian-based systems. For others, use your package manager to install "GCC build tools".

sudo apt-get install build-essential

Devnet RPC

Error message: Error: Using Irys devnet requires a dev/testnet RPC to be configured

When using our devnet, you must provide the URL to a Denvet RPC for the chain you're using.

For example, this will throw an error:

const getIrys = async () => {
	const token = "ethereum";
 
	const irys = new Irys({
		network: "devnet",
		token, // Token used for payment
		key: process.env.PRIVATE_KEY, // EVM private key
	});
	return irys;
};

But this will not:

const getIrys = async () => {
	const token = "ethereum";
	const providerUrl = "https://rpc.sepolia.dev";
 
	const irys = new Irys({
		network: "devnet",
		token, // Token used for payment
		key: process.env.EVM_PRIVATE_KEY, // EVM private key
		config: { providerUrl }, // Optional provider URL, only required when using Devnet
	});
	return irys;
};

As RPC URLs change frequently, users should always choose an up-to-date one from https://chainlist.org/ (opens in a new tab)

Insufficient balance

Error message: Error: Not enough balance for transaction

This error occurs when you try to upload to a node without first funding it. This applies to both Nodes 1 and 2 where you can pay using any our supported mainnet tokens and our devnet node where you can pay using any of our supported devnet tokens.

Devnet tokens can be obtained for free from common faucets like the ones for Solana (opens in a new tab) and Sepolia (opens in a new tab).

Blockhash not found

Error message: Error: Transaction simulation failed: Blockhash not found

Irys depends on transactions being confirmed, however, in some situations, it may be necessary to wait for the transaction to be finalized.

This can be fixed by configuring Irys as follows:

const irys = new Irys({
	url: nodeUrl,
	token,
	provider,
	config: { tokenOpts: { commitment: "finalized" } },
});