Websocket Error 12001 message=Mode change failed

Can more information be shed around this error for websockets?

Error: {‘code’: 12001, ‘message’: ‘Mode change failed’, ‘s’: ‘error’}Error: {‘type’: ‘sub’, ‘code’: 11011, ‘message’: ‘subscription failed’, ‘s’: ‘error’}

Python fyers-apiv3 3.1.4 with python 3.12 on Windows

So there is an existing API from Create API in myapi.fyers.in, and it is working from morning.

Now, I created another API app, and got new APP-ID, Secret and created Hash. Authentication is successful, and got refresh-token plus authentication token.

Using new APP-ID, tested few http APIs and it worked. I got profile/funds info and history backfill.

But, for Websocket, If I use new APP-ID/token, I get the above error codes, if I revert to old APP-ID and credentials, the websocket connects again.

The above is reproduceable at your end, What can this issue be narrowed down to?

How does want remove an old APP-ID and move to a new one.

There is no proper reply in some of these old posts

Web Socket Error- Code 12001: Mode change failed

Web Socket> Market Data Indices Update

Facing issue in data retrieval from WebSocket

And there are no real logs to share and there is no meaningful logging. By switching APP-ID to new, the error appears. The python script on the other hand completely exits and a new one is started.

I am not doing any hot-reload. No other connection is also open during testing.

If I change back to the older APP-ID, socket connects normally.

well, the only thing I could do is to manually logout from fyers web everywhere and then get the new APP-ID to work after a fresh auth.

This login workflow should be reviewed, if the APP-ID Auth is being done in a browser session that has fyers web logged in already.

Hi @chirag
Sorry for the inconvenience caused.

**“Error: {‘code’: 12001, ‘message’: ‘Mode change failed’, ‘s’: ‘error’}” **when it’s while changing the mode between Lite mode to full mode. Can you please confirm if you were trying to change the mode as well?

Reading that error message, even i checked the same, but that was not the case. The script is the same. But changing to the new APP-ID was producing error.

I understand @chirag,

Could you please share your client ID? We need it to connect with you and better understand the issue. Kindly DM your client ID.