[solved] Problem with stream in admin panel (worked earlier): Could not POST to [webhook]

Hello!
I am using the Moralis admin panel to add a stream to my local server. I had the stream working and sending events to my server up until recently, when it stopped accepting the webhook. Now, as I try to change the stream from demo to prod the webhook is rejected.
The message i get is:

Could not POST to https://<>.eu.ngrok.io/webhooktest. Please check your webhook URL.

I use Ngrok to forward to my local server, and both Ngrok and local server gets the call and returns status 200, but the admin panel won’t accept it anyway.
The stream stopped accepting the webhook after I closed down Ngrok over night and edited the stream with my new Ngrok-URL the next morning.
I tried deleting the stream and setting up again, no change.

Are there any gotchas in how moralis interprets the response? e.g. response time, specific message in body, ngrok-settings?

The confirmation payload I receive from moralis looks normal to me :

{
"abi": [
],
"block": {
"number": null,
"hash": null,
"timestamp": null
},
"txs": [
],
"txsInternal": [
],
"logs": [
],
"chainId": null,
"confirmed": true,
"retries": 0,
"tag": null,
"streamId": null,
"erc20Approvals": [
],
"erc20Transfers": [
],
"nftTokenApprovals": [
],
"nftApprovals": {
"ERC721": [
],
"ERC1155": [
]
},
"nftTransfers": [
],
"nativeBalances": [
]
}

you can try to activate it directly in docs interface


to see if it works

Thanks for the advice!
I could use the docs interface but I am still getting “400 Test Request” from the docs interface as soon as I try to set Demo to false. The requests pop up in my logging system, and I do return 200 for them It works alright from Postman aswell.
Could it maybe be mismatching content-types? Or like http/https mismatch somehow?

Maybe you are using a different account? I didn’t find any streams in your account

That is correct, we have a joint company account. I’m only using the stream for testing for now, so I think it’s ok that i post it here, but if im in the wrong let me know :).
The stream id is:
<<withdrawn>>

can you DM me on Discord the email for that account?

After some help from @cryptokid (thanks!) in adding a more verbose error message, the error read:

 {
  "message": "Could not POST to  https://<NGROK session>.eu.ngrok.io/webhooktest. - Invalid cookie SameSite value. Please check your webhook URL."
}

After some research this was because the framework our company is using automatically added unnecessary session-specific variables through the header of the response.
The solution for me was to turn off relevant middlewares for the webhook url.

2 Likes