Troubleshooting
Troubleshooting common errors during installation and use.
Errors:
- bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
- Error: Using Irys testnet requires a dev/testnet RPC to be configured
- Error: Not enough balance for transaction
- Error: Transaction simulation failed: Blockhash not found
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
Testnet RPC
Error message: Error: Using Irys testnet requires a dev/testnet RPC to be configured
When using our testnet, you must provide the URL an 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: "testnet",
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: "testnet",
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.
Tokens for use on our testnet 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" } },
});