Contract event sync error after server upgrade

I upgraded my server to the latest version tonight and I can’t sync contract events from my local dev chain anymore. I’m getting this error in the in the logs:

Error syncing realtime event for topic 0xab80d4f237153664013aad30815c82af95ab8234bfb2d63a6518a3656e4d3a8c {"message":"Provider not set or invalid","code":141}

My server Id is f9g4l9w7umkj

It was working before the upgrade, deleting and setting up the plugin again did not work unfortunately

@dagr Can you update you cloud code


new Moralis.web3.eth.Contract(JSON.parse(res.get('abi')), marketAddress)


const web3 = Moralis.web3ByChain('0x539')
new web3.eth.Contract(JSON.parse(res.get('abi')), marketAddress)

Does this also need to be done in the frontend? I can only see this in the documentation for Cloud Functions but I’m also having with web3 connectivity problems on my frontend since the upgrade

On the frontend you should be able to use the following as mentioned in the Moralis Web3 docs (which you’ve probably already seen).

const web3 = await Moralis.Web3.enable();

Moralis relies on web3.js, but if you don’t like web3.js you can also use Ethers on the frontend if you do the appropriate set up. There is currently not a way to specify which provider Moralis will use, however. Moralis will continue happily using web3.js for authentication regardless.