Sync smart contracts not triggering and showing in the Database

the server has cloud code now, you say that you don’t see it in admin interface?

no its not there, it used to be:

Ok, we will check why it is not showing now

cloud code works now again

OK great thanks.

Also sorry to keep at this, if beforeSave causes the sync to have issues with updating the data table, as we’ve discovered by removing it:
Moralis.Cloud.beforeSave(“AuctionCreated”, async (request) =>{

Note: this is used in the Moralis tutorial video (time 6:03) and appears to work on there:

What should be used instead?

you should make it work without errors, now it has errors on executions and when beforeSave fails there is no data saved

you can use afterSave as an alternative

Thanks

I’m getting a bunch of
Error: Invalid function: “pluginsReady”
I don’t have any plugins, so i’m not sure what that means:

2022-09-01T20:46:59.132Z - Error: Invalid function: “pluginsReady”
at handleCloudFunction (/moralis-server/lib/Routers/FunctionsRouter.js:201:13)
at /moralis-server/lib/PromiseRouter.js:85:20
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-09-01T20:46:04.029Z - Error: Invalid function: “pluginsReady”
at handleCloudFunction (/moralis-server/lib/Routers/FunctionsRouter.js:201:13)
at /moralis-server/lib/PromiseRouter.js:85:20
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-09-01T19:03:37.699Z - Error: Invalid function: “pluginsReady”
at handleCloudFunction (/moralis-server/lib/Routers/FunctionsRouter.js:201:13)
at /moralis-server/lib/PromiseRouter.js:85:20
at processTicksAndRejections (node:internal/process/task_queues:96:5)

You will see those errors usually when the server restarts

Thanks for your patience.

I have these errors:

afterSave failed for AuctionCreated for user:
Error: {
“message”: “data is not defined”,
“code”: 141
}

Does that mean I need to add those as columns in the database table?

Can you post your afterSave code? Check your use of data, make sure that variable exists.

I’ve just made a new post, it doesn’t really belong to this one anymore:

Code included in that