Moralis.Web3API.native.getTransaction TypeError: Cannot read properties of undefined (reading 'page_size')

/* import moralis */

const Moralis = require("moralis/node");

/* Moralis init code */

const serverUrl = "............";

const appId = "..";

const masterKey = ".....";

Moralis.start({ serverUrl, appId, masterKey });

const tran = async () => {

const options = {

    chain: "eth",




const transaction = await Moralis.Web3API.native.getTransaction(options);




what is issue with this code.

I’ll test it a little later. I would not expect that error. What line gives that error?

if (!result.page_size || ! || === undefined) return options;

TypeError: Cannot read properties of undefined (reading ‘page_size’)

What version of Moralis SDK you are using?

latest version of SDK

I was able to reproduce the problem, it happens in this particular case because that transaction hash is not present on eth and this problem happens only on latest versions of Moralis SDK.

1 Like

ok thanks for information