Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code 3009 for "bibox_sub_spot_ETH_BTC_depth" subscription. #6

Open
AionDev opened this issue Sep 19, 2019 · 0 comments
Open

Code 3009 for "bibox_sub_spot_ETH_BTC_depth" subscription. #6

AionDev opened this issue Sep 19, 2019 · 0 comments

Comments

@AionDev
Copy link

AionDev commented Sep 19, 2019

ws.send(JSON.stringify(
    { event: "addChannel"
    , channel: "bibox_sub_spot_ETH_BTC_depth"
    }
  ));

The subscription is working but after like 12 messages i get the error:

{ error: { code: '3009', msg: '推送订阅channel不合法' } }

Which when i try to decode it, i get this:

const data = msg.error.msg;
const text = pako.inflate(new Buffer.from(data, 'base64'), {
        to: 'string'
});

const recvMsg = JSON.parse(text); // raw data

console.log("recvMsg: ", recvMsg);

EROR MESSAGE:

c:\myProject\node_modules\pako\lib\inflate.js:389
  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }
                      ^
incorrect header check

So is clear that this msg inside { error: { code: '3009', msg: '推送订阅channel不合法' } } is actually badly encoded and/or badly zipped.

**On top of the fact that i don't understand why i'm getting this error to begin with. **
My channel: "bibox_sub_spot_ETH_BTC_depth" seems to be correct?!
The code works just fine for normal messages, only this error message doesn't.

Any ideas ?! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant