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

Error: Unexpected server response: 401 #71

Open
kryptokatinai opened this issue May 23, 2021 · 1 comment
Open

Error: Unexpected server response: 401 #71

kryptokatinai opened this issue May 23, 2021 · 1 comment

Comments

@kryptokatinai
Copy link

Hi.
I'm trying to test PancakeSwap bot but I'm stuck with this error. Couldn't find answer anywehere yet so maybe someone can help me. I've created Ankr Api, copied wss websocket adress to the code but get this error:

Error: Unexpected server response: 401
at ClientRequest. (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:580:7)
at ClientRequest.emit (events.js:376:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted 'error' event on WebSocket instance at:
at abortHandshake (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:698:15)
at ClientRequest. (C:\Users\Justinas\Desktop\pcs bot\node_modules\ws\lib\websocket.js:580:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)

@Teedo145
Copy link

I have the same problem, please does anyone know?
How do we add our username/password credentials to the ankr api request?

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

2 participants