getTransactionByVersion: vmError for Version 4990683

Hey all,

I’m attempting to call getTransactionByVersion via the Aptos nodejs package against my local mainnet node, for version 4990683, which appears to have failed according to the public block explorers. My application returns a vmError & can see under Aptoscan the failed status, as well as a transaction hash of 0x0000000000000000000000000000000000000000000000000000000000000000.

However when I checked under the Aptos Labs explorer, that version is fully populated with a transaction hash, as well as all other information (including its failed status).

How is the Aptos Labs explorer able to generate the transaction hash, whereas my direct call only returns an error? I can confirm I’m properly running a mainnet node with verified connectivity.


const aptos = require('aptos');
const node_path = ';
const node = new aptos.AptosClient(node_path);

version = 4990683;

function getTransactionByVersion(version) {
    node.getTransactionByVersion(version).then(function(t) {
    }).catch(function(e) {


Error: {"message":"Failed to convert on chain transaction to Transaction: invalid utf-8 sequence of 1 bytes from index 8","error_code":"internal_error","vm_error_code":null}
    at _AptosClient.wrapper (/aptos/node_modules/aptos/dist/index.js:5358:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {status: 500, errorCode: 'internal_error', vmErrorCode: null, stack: 'Error: {"message":"Failed to convert on chain…ions (node:internal/process/task_queues:96:5)', message: '{"message":"Failed to convert on chain trans…code":"internal_error","vm_error_code":null}'}

So I can query versions 4990684 & 4990685 fine without any issue, which are also failed transactions. However 4990683 still returns a vmError.

{version: '4990684', hash: '0xf5fe39f48bd01be9bf98207b7da7405d90cea118a099fd4bb7c59c27d9ad62e7', state_change_hash: '0x3e208f4161974c01ee2d40314fb36f4660ce96978c5a62ddce598892e09ce035', event_root_hash: '0xdd8788b486e4d906678741a1068dcbeac44fecc0e6eb6047494d76888cc1fd29', state_checkpoint_hash: null, …}

{version: '4990685', hash: '0xcf44616a1f6d6b2078231a78682db69b8f9c18af62091bd3e6fa15251063a9fb', state_change_hash: '0xafb6e14fe47d850fd0a7395bcfb997ffacf4715e0f895cc162c218e4a7564bc6', event_root_hash: '0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000', state_checkpoint_hash: '0x8786609943119f4b04143315af79edab698526d8e6b24531c051b190ce12259c', …}

1 Like

Looking for it

1 Like

I can reach that version using the public endpoint, yet only my local mainnet node produces that error.

1 Like