Webhook is not working

Hi, hope you are doing well. could you help me, please?
I am using Moralis SDK for listening to transactions on Binance USDT.
So I set several options including webhook url. I set webhook url as the post router of my server.
But when I run the server, I am getting this error. Moralis is not finding my webhook router.


Please help me.
Thanks.

Hi,
can you give more info?
do you know to what url it tries to make that request that gives timeout?

I have added the following option.

 const options = {
        chains: [EvmChain.ETHEREUM],
        description: "USDT Transfers",
        tag: "usdtTransfers",
        includeContractLogs: true,
        abi: ABI,
        topic0: ["Transfer(address,address,uint256)"],
        webhookUrl: "http://my_server_address/api/webhook",
        advancedOptions : {

            topic0: "Transfer(address,address,uint256)",
            filter: {
                in : ["to", wallet_addresses]
            }
        }
    };

What did you do with those options after that?

was the stream created? you are trying to create a stream with the SDK?

Yes, I used it for a stream.

 Moralis.start({
        apiKey: process.env.MORALIS_KEY ,
    }).then(async () => {
        const stream = await Moralis.Streams.add(options);
        const { id } = stream.toJSON();
        await Moralis.Streams.addAddress({
            id: id,
            address: ["0x55d398326f99059fF775485246999027B3197955"]   //BUSD-T
        })
    });

what version of moralis sdk you are using?

on what line you get that error?

“moralis”: “^2.11.0”,
@moralisweb3/common-evm-utils”: “^2.11.0”,
and I am not getting this error in my code.
My server is running correctly but when there is a transaction and Moralis calls a webhook url, it returns the error.

you can find the stream in admin interface?

maybe it is an error with connection to the database?

I don’t know what url gives that timeout

what do you mean by admin interface?

I mean https://admin.moralis.io/streams

so isn’t there any solution for this error?

I can’t use admin stream because there is no filter option.

I don’t understand the error, I didn’t see it before, I don’t understand what happens

I don’t understand what is the connection to filters.

can you use the swagger interface to check if the stream is running?

https://api.moralis-streams.com/api-docs/

although I put any url in webhook, there is the same error.
Moralis is not finding any webhook url for now.

I see only this stream config in your account:

{
  "result": [
    {
      "id": "fa214777-8202-4b78-ab82-184a09889076",
      "webhookUrl": "https://webhook.site",
      "description": "ddd",
      "tag": "ttt",
      "demo": true,
      "topic0": null,
      "allAddresses": false,
      "includeNativeTxs": true,
      "includeContractLogs": true,
      "includeInternalTxs": false,
      "getNativeBalances": [],
      "triggers": [],
      "abi": null,
      "advancedOptions": null,
      "chainIds": [
        "0x1"
      ],
      "status": "paused",
      "statusMessage": "Stream was paused by the user"
    }
  ],
  "total": 1
}

you say that the error is not when you add the stream, or it is when you try to add the stream?

it is not when I add the stream. When I add it, it is working fine. But after several seconds, when there is a transaction, this error appears.

somehow I don’t see that stream added in your account now

can you add some logging in the server code to narrow it down to the place where that error happens?

there is any error in my code now.
after running the server, when Moralis catup webhook url , the error appears.
Didn’t you understand the error? :worried: