Empty Array getNFTOwners since V1

getNFTOwners was utilized to pull from the Moralis DB and IPFS. This is no longer returning results in the array. This occurs with historical data before the V1 adjustment as well as new data. Array remains at 0. No console errors (other than the warning warning to upgrade and possible block if internet is slow). Any advice (beginner level experience here)

Dapp URL
https://srkzwy6g3vsa.usemoralis.com:2053/server

Moralis Error Log:

2022-08-12T21:25:45.076Z - Error: Invalid number string: undefined for variable
at fetch (/moralis-server/lib/cloud-code/plugins/helpers/apiUtils.js:218:26)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-08-12T21:25:45.072Z - Failed running cloud function reSyncMetadata for user mf4YdWcKU75DM0U5FXyodxJG with:
Input: {“chain”:“bsc”,“address”:“0x3e0abc4cd3269a0283349a1dc5a18bfe6f153224”,“token_id”:“undefined”,“flag”:“uri”,“mode”:“sync”}
Error: {“message”:“Invalid number string: undefined for variable”,“code”:141}

reSyncMetadata

console.log(hist);

    for (var i = 0; i < hist.total; i++) {

        try {

            var puzzle_data = hist.result[i];

            if (!puzzle_data.token_uri) {

                await Moralis.Web3API.token.reSyncMetadata({

                    chain: window.CHAIN,

                    address: window.NFT_CONTRACT_ADDRESS,

                    token_id: puzzle_data.token_id,

                    flag: "uri",

                    mode: "sync",

                });

            }

            if (!puzzle_data.metadata) {

                puzzle_data.metadata = JSON.stringify(await $.get(puzzle_data.token_uri));

            }

            puzzle = JSON.parse(puzzle_data.metadata);

            addrs.push(puzzle.reward_addr.toLowerCase());

        } catch {}

    }

Can you add some debugging to get to the erect parameters that are sent?

Hi! I am trying to research how I can do this. I had a developer that wrote the code on my behalf - I have access to the github of the code - but am not sure how to add debugging to get to the erect parameters that are sent. Do you have a recommended resource for me to attempt this?

from this error message, it looks like token_id was undefined when reSyncMetadata was called

this may be something different than getNFTOwners

for debugging, you can run the code, modify it to add console.log(variable_name_here), look in network tab in browser to see the exact request

Ok, I will work on this. It is odd - the functionality is there. Creating the puzzles works (puzzle creation, wallet creation, BNB transfer, NFT Mint and transfer, and all the functions upon solve) The only thing not working is the list_puzzles that shows all of the unsolved and all of the solved puzzles on the landing pages for each. I appreciate the help! Thank you.