sui: transactions subscribe Event not working

Steps to Reproduce Issue

I want to subscribe to my transactions but getting an error : [Error: Invalid params]

e.g.

const client = new SuiClient({
        url: 'wss://rpc.testnet.sui.io:443/',
      });
      
      const subscribe = await client.subscribeTransaction({
        filter: {
          ToAddress: walletAddress,
        },
        onMessage(event) {
          // This function is called once per transaction.
          console.log('subscribe', event);
        },
      });
      console.log('subscribe', subscribe);

Expected Result

we are not getting a response as expected.

System Information

  • OS: iOS/Android
  • Platform: React Native

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 28 (19 by maintainers)

Most upvoted comments

@stefan-mysten Got it! We’ll set up our own nodes in the meantime. 🙏

There are some issues with Websockets at the moment that the team is trying to fix, which might be what’s causing that error. Thanks for reporting @datznt.

yes, I have checked in mainnet, and is working as expected. but not working on the testnet Error: Possible Unhandled Promise Rejection (id: 1): Error: Invalid params Error: Invalid params

We’re making progress. I tried on testnet with a different address and it worked. Here’s my pnpm-lock.yaml file. Also here’s my package.json file.

So the question that comes to mind is about the versions of Sui TS SDK that you’re using.

I have the same problem. I don’t think this is an sdk problem. Because I tried on typescript sdk, golang sdk, and to be sure I used postman.

image