Ask coding questions

← Back to all posts
Uint8Array error - not valid JS datatype (but runs fine in debugger)
rfustino

Error on line 144. But runs fine in debug mode. To be clear error is happening when running without debug. Please escalate, we have this in production on 9/28. This code runs fine locally, but not in a replit.
// this is the line
const txn = algosdk.makeAssetCreateTxnWithSuggestedParamsFromObject({
from: alice.addr,
total,
decimals,
assetName,
unitName,
assetURL: url,
assetMetadataHash: metadata,
defaultFrozen,
freeze: freezeAddr,
manager: managerAddr,
clawback: clawbackAddr,
reserve: reserveAddr,
suggestedParams: params,});

err Error: assetMetadataHash must be a 32 byte Uint8Array or string.
at new Transaction (/home/runner/ASAIntegrationsJS/node_modules/algosdk/dist/cjs/src/transaction.js:208:23)

Voters
rfustino