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 {}
}