Iâve released new contracts and while adding new Sync&Watch Events plugins, I get the following error is server logs:
2021-09-01T14:38:41.963Z - Error: Error: Tried to encode an invalid date.
at /moralis-server/lib/Controllers/DatabaseController.js:1184:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)
My newly created table reads 9 items, but renders empty due to the bug:
Then got worse. I deleted all entries to the table and run it again. Table broke and I got a white page of death on https://gago4ywcuqck.usemoralis.com:2083/apps/moralisDashboard/browser/EthItemsForSale, also after server restart.
I changed the table name in the plugin to EthItemsForSaleNEW and ran sync again. Same thing, but the old EthItemsForSale link at least works again so I can delete it.
Yeeh
Plugin data:
ItemAdded(bytes32,uint256,address,address,uint256,uint256)
ABI:
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "item_id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "token_id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "token_address",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "owner_of",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "askingPrice",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "expiresAt",
"type": "uint256"
}
],
"name": "ItemAdded",
"type": "event"
}
That âexpiresAtâ uint256 is a unix timestamp number. Could that be the culprit? nahâŚ
Example tx with event: https://rinkeby.etherscan.io/tx/0x95d9fa95ed347b65dcf611dd57c1c8739089f25f0e32c5d0bfb32170fbe883b0#eventlog