Problem: ERROR: hiveio_wax-*.whl is not a supported wheel on this platform.Solution: The wheel doesn’t match your Python version or platform. Check:
# Check your Python version and platformpython3 -c "import sys; print(f'Python {sys.version_info.major}.{sys.version_info.minor}'); print(f'Platform: {sys.platform}')"# Install the correct wheel or build from sourceexport PYTHON_VERSION=3.12./python/wax/scripts/build_wax.sh
pnpm command not found
Problem: pnpm is not installed for TypeScript development.Solution: Install pnpm:
# Using npmnpm install -g pnpm# Using standalone scriptcurl -fsSL https://get.pnpm.io/install.sh | sh -# Verify installationpnpm --version
Problem: Build fails with missing Boost library errors.Solution: Use the official CI base image which includes pre-compiled Boost:
# Pull the CI base imagedocker pull registry.gitlab.syncad.com/hive/wax/ci-base-image:pypa_2_28-13# Or build inside the imagedocker run --rm -v "${PWD}:${PWD}" -w "${PWD}" \ registry.gitlab.syncad.com/hive/wax/ci-base-image:pypa_2_28-13 \ bash -c "./python/wax/scripts/build_wax.sh 1"
Submodule not initialized
Problem: Build fails because the hive submodule is not initialized.Solution: Initialize and update submodules:
git submodule update --init --recursive# Verify submodule is initializedls hive/libraries/protocol/proto/
WASM build fails
Problem: TypeScript WASM build fails with compilation errors.Solution: Ensure all dependencies are installed and submodules are initialized:
# Python: Check protobuf versionpip show protobuf# Should be ^6.33.0 - upgrade if neededpip install --upgrade 'protobuf>=6.33.0,<7'# Regenerate proto files./python/wax/scripts/compile_proto.sh
API connection failures
Problem: Cannot connect to Hive API nodes.Solution: Check your endpoint and network:
# Pythonfrom wax import create_hive_chain# Try different endpointsendpoints = [ "https://api.hive.blog", "https://api.deathwing.me", "https://api.openhive.network"]for endpoint in endpoints: try: chain = create_hive_chain(endpoint) info = chain.api.get_dynamic_global_properties() print(f"Connected to {endpoint}") break except Exception as e: print(f"Failed to connect to {endpoint}: {e}")
Transaction signing failures
Problem: Transactions fail to sign or broadcast.Solution: Verify your signing setup:
# Python examplefrom wax import create_wax_foundation# Create foundationwax = create_wax_foundation()# Verify transaction structuretx = wax.create_transaction()tx.push_operation({...})# Check transaction before signingprint(tx.json)# Ensure signer is properly configured# For beekeeper: check wallet is unlocked# For keychain: check browser extension is installed
Problem: Tests fail because mock server cannot start.Solution: Check if port is already in use:
# Check if port 4000 is in uselsof -i :4000# Kill existing processkill -9 <PID># Or use a different portexport MOCK_SERVER_PORT=4001./python/tests/wax/run_tests.sh
Playwright browsers not installed
Problem: TypeScript tests fail with “Browser not found” error.Solution: Install Playwright browsers:
cd tspnpm exec playwright install# Or install specific browserpnpm exec playwright install chromium
Import errors in tests
Problem: Tests fail with import errors.Solution: Set PYTHONPATH correctly:
# Set PYTHONPATH to include python directoryexport PYTHONPATH="${PWD}/python:${PYTHONPATH}"# Or use the test script which sets it automatically./python/tests/wax/run_tests.sh
Tests timeout
Problem: Tests hang or timeout.Solution: Increase timeout or debug hanging tests:
# Increase mock server timeoutexport TIMEOUT_PROXY_MOCK_SERVER_SECONDS=60./python/tests/wax/run_tests.sh# Run tests with verbose outputpoetry run pytest -vvv --log-cli-level=DEBUG# Run single test to isolate issuepoetry run pytest -vvv path/to/test_file.py::test_function
Problem: Linter fails with style violations.Solution: Auto-fix issues where possible:
# Python: Auto-fix with Ruffpoetry run ruff check --fix .# TypeScript: Auto-fix with ESLintcd tspnpm run lint --fix
Type checking errors
Problem: MyPy or TypeScript type checking fails.Solution: Review type errors and fix:
# Python: Run MyPy with detailed outputpoetry run mypy . --show-error-codes --pretty# TypeScript: Run tsc with detailed outputcd tsnpx tsc --noEmit --pretty
Git hooks fail
Problem: Pre-commit hooks fail on commit.Solution: Run pre-commit manually and fix issues:
# Install pre-commit hookspre-commit install# Run all hookspre-commit run --all-files# Skip hooks temporarily (not recommended)git commit --no-verify
CI pipeline failures
Problem: GitLab CI pipeline fails.Solution: Check pipeline logs and run locally:
# Run tests locally before pushing./python/tests/wax/run_tests.shcd ts && pnpm run test# Check linterspoetry run ruff check .poetry run mypy .cd ts && pnpm run lint# Check pipeline configurationgitlab-ci-local --list
Problem: Importing WAX takes a long time.Solution: This is expected for first import as native modules are loaded. Subsequent imports are cached:
# Python: Import at module level, not in functionsimport wax# Not recommended - imports inside loopdef process_items(items): for item in items: from wax import create_wax_foundation # Slow! ...# Recommended - import oncefrom wax import create_wax_foundationdef process_items(items): wax = create_wax_foundation() for item in items: ...
Large memory usage
Problem: WAX uses more memory than expected.Solution: Optimize memory usage:
# Python: Use context managersfrom wax import create_hive_chain# Release resources when donedef process_transactions(): chain = create_hive_chain("https://api.hive.blog") # ... process transactions ... del chain # Explicit cleanup# TypeScript: Use memory profiling// See examples/ts/memory-used/ for profiling tools
Slow transaction building
Problem: Building transactions is slow.Solution: Batch operations and reuse objects:
# Slow - creating new foundation each timefor op in operations: wax = create_wax_foundation() tx = wax.create_transaction() tx.push_operation(op)# Fast - reuse foundationwax = create_wax_foundation()for op in operations: tx = wax.create_transaction() tx.push_operation(op)