-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Description
Running tests with npx hardhat test
fails with a PolkadotNodePluginError
, while npx hardhat node
works correctly.
Environment
- hardhat-polkadot version: 0.1.8
- Node.js version: 22.18
- OS: Ubuntu 24.04
- Polkadot-SDK: 1e4af2353ea9dcb9ad0afc1ce63b03df68108ecf (Aug 21st)
Steps to Reproduce
1. Prepare repo
git clone https://github.com/papermoonio/openzeppelin-contracts-polkadot
cd openzeppelin-contracts-polkadot
npm install
2. Run tests with PVM enabled:
USE_POLKAVM=true npx hardhat test --show-stack-traces
Observe the error:
Error in plugin hardhat-polkadot-node: Failed when running node: Cannot convert undefined or null to object
PolkadotNodePluginError: Failed when running node: Cannot convert undefined or null to object
3. start with npx hardhat node
USE_POLKAVM=true npx hardhat node
Working Command Output
Starting server at 127.0.0.1:8000
Running command: revive-dev-node --rpc-port=8000 --dev
Starting the Eth RPC Adapter at 127.0.0.1:8545
Running command: eth-rpc --node-rpc-url=ws://localhost:8000 --dev
2025-08-23 12:17:52 Substrate Node
2025-08-23 12:17:52 ✌️ version 0.0.0-1e4af2353ea
2025-08-23 12:17:52 ❤️ by Parity Technologies <[email protected]>, 2017-2025
2025-08-23 12:17:52 📋 Chain specification: Development
2025-08-23 12:17:52 🏷 Node name: disagreeable-mist-6766
2025-08-23 12:17:52 👤 Role: AUTHORITY
2025-08-23 12:17:52 💾 Database: RocksDb at /tmp/substrate1zItYJ/chains/dev/db/full
2025-08-23 12:17:52 Running in --dev mode, RPC CORS has been disabled.
2025-08-23 12:17:52 Running in --dev mode, RPC CORS has been disabled.
2025-08-23 12:17:52 🌐 Connecting to node at: ws://localhost:8000 ...
2025-08-23 12:17:58 🔨 Initializing Genesis block/state (state: 0x67d7…3423, header-hash: 0x4eb0…1ec5)
2025-08-23 12:17:58 Creating transaction pool txpool_type=ForkAware ready=Limit { count: 8192, total_bytes: 20971520 } future=Limit { count: 819, total_bytes: 2097152 }
2025-08-23 12:17:58 Using default protocol ID "sup" because none is configured in the chain specs
2025-08-23 12:17:58 Local node identity is: 12D3KooWNSzeY7NqK2p12cNYpCyoBgzE2Xm3cpMFDQXPML2W17UV
2025-08-23 12:17:58 Running litep2p network backend
2025-08-23 12:17:58 💻 Operating system: linux
2025-08-23 12:17:58 💻 CPU architecture: x86_64
2025-08-23 12:17:58 💻 Target environment: gnu
2025-08-23 12:17:58 💻 CPU: AMD Ryzen 9 7950X3D 16-Core Processor
2025-08-23 12:17:58 💻 CPU cores: 16
2025-08-23 12:17:58 💻 Memory: 63388MB
2025-08-23 12:17:58 💻 Kernel: 6.11.0-28-generic
2025-08-23 12:17:58 💻 Linux distribution: Ubuntu 24.04.2 LTS
2025-08-23 12:17:58 💻 Virtual machine: no
2025-08-23 12:17:58 📦 Highest known block at #0
2025-08-23 12:17:58 〽️ Prometheus exporter started at 127.0.0.1:9615
2025-08-23 12:17:58 Running JSON-RPC server: addr=127.0.0.1:8000,[::1]:8000
2025-08-23 12:18:02 🌟 Connected to node at: ws://localhost:8000
2025-08-23 12:18:02 💾 Using in-memory database, keeping only 256 blocks in memory
2025-08-23 12:18:02 〽️ Prometheus exporter started at 127.0.0.1:9616
2025-08-23 12:18:02 Running JSON-RPC server: addr=127.0.0.1:8545,[::1]:8545
2025-08-23 12:18:02 🔌 Subscribing to new blocks (BestBlocks)
2025-08-23 12:18:02 🔌 Subscribing to new blocks (FinalizedBlocks)
[... node continues running normally ...]
Metadata
Metadata
Assignees
Labels
No labels