Troubleshooting (JavaScript)
How the native library is found
Section titled “How the native library is found”new CclBridge(libPath?) resolves libccl.dylib / libccl.so / libccl.dll in this order:
- The explicit
libPathconstructor argument (a directory). - The
CCL_LIB_PATHenvironment variable (a directory) — the usual way to run against a locally built library. - A copy bundled inside the package itself (
libs/). - The platform-specific package for your OS/arch (e.g.
@bloxbean/cardano-client-lib-macos-aarch64) — this is what a normalbun addinstall uses. - The bare filename, letting the OS loader search its default paths.
On Linux, musl (Alpine) is detected automatically by checking for the musl dynamic loader, and the linux-musl-x86_64 package is selected instead of the glibc one.
Check what would be loaded:
import { resolveLibFile, platformSuffix } from "@bloxbean/cardano-client-lib";console.log(platformSuffix()); // e.g. "linux-x86_64"console.log(resolveLibFile()); // absolute path to the libraryCommon errors
Section titled “Common errors”Failed to load the CCL native library (...)
Section titled “Failed to load the CCL native library (...)”The library file wasn’t found or couldn’t be loaded.
- Normal install: make sure the platform package was installed (check
bun pm ls | grep cardano-client-lib).optionalDependenciescan be skipped by--no-optional/ some CI caching setups — reinstall without that flag. - Local build: set
CCL_LIB_PATHto the directory containing the library, and make the OS loader happy for its transitive dependencies:Terminal window export CCL_LIB_PATH=/path/to/core/build/native/nativeCompileexport DYLD_LIBRARY_PATH=$CCL_LIB_PATH # macOSexport LD_LIBRARY_PATH=$CCL_LIB_PATH # Linux - Unsupported platform (macOS Intel; Alpine on ARM): no prebuilt library exists — build from source (below).
libccl version '...' is incompatible
Section titled “libccl version '...' is incompatible”The wrapper and the native library must match on base semver. This appears when CCL_LIB_PATH points at a stale build. Rebuild the library, or (at your own risk) set CCL_SKIP_VERSION_CHECK=1.
CclClosedError: CclBridge is closed
Section titled “CclClosedError: CclBridge is closed”Something called the bridge after close(). This error is the wrapper saving you: handing a stale isolate handle to the native side would abort the whole process. Keep calls inside the bridge’s try/using scope, or create a new bridge.
CCL Error -10: ... from quicktx.build
Section titled “CCL Error -10: ... from quicktx.build”CCL_ERROR_TX_BUILD — the TxPlan didn’t build. Usual causes:
- Malformed YAML or a wrong intent field name (check against the TxPlan reference).
- A Plutus transaction with wrong/missing execution units.
- Check
CCL Error -8too:INSUFFICIENT_FUNDSmeans the supplied UTXOs can’t cover outputs + fee.
PPViewHashesDontMatch when submitting a Plutus transaction
Section titled “PPViewHashesDontMatch when submitting a Plutus transaction”The protocol parameters’ cost models were mangled. build() normalizes the common deprecated map form automatically; if you construct parameters by hand, keep the cost models in the order-stable cost_models_raw array form.
Crash / segfault under Node.js
Section titled “Crash / segfault under Node.js”Node is not supported — this is expected, not a bug. GraalVM native libraries do stack-boundary checks that Node FFI bridges violate. Run under Bun ≥ 1.0.
Building the native library from source
Section titled “Building the native library from source”Needed only on platforms without a prebuilt library (macOS Intel, Alpine ARM) or for development against the bridge itself:
git clone https://github.com/bloxbean/cardano-client-bindingscd cardano-client-bindingssdk install java 25.0.3-graal # GraalVM with native-image./gradlew :core:nativeCompile # → core/build/native/nativeCompile/libccl.*export CCL_LIB_PATH=$PWD/core/build/native/nativeCompilePlatform support
Section titled “Platform support”| Platform | Prebuilt | Notes |
|---|---|---|
| Linux x86_64 (glibc ≥ 2.17) | ✅ | RHEL/CentOS 7+, Ubuntu 18.04+, Debian 9+, Amazon Linux 2, … |
| Linux aarch64 (glibc ≥ 2.17) | ✅ | |
| Alpine x86_64 (musl) | ✅ | auto-detected |
| Alpine aarch64 (musl) | ❌ | GraalVM --libc=musl is x86_64-only |
| macOS Apple Silicon | ✅ | |
| macOS Intel | ❌ | Oracle GraalVM dropped Intel Macs |
| Windows x86_64 | ✅ |