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
PancakeSwap trading bot Problem :Unhandled 'error' event #63
Comments
and my code: console.log('provider'); console.log('Transaction receipt11'); console.log('PairCreated'); factory.on('error', function(err){ factory.on('PairCreated', async (token0, token1, pairAddress) => {
|
Maybe try putting the provider starting with "wss" instead of "https:" - that worked for me. Make sure to put it in quotes too. |
İf ı run node bot.js
I watch this problem . What can I do?
provider
wallet
account
factory
router
wbnb
PairCreated
Transaction receipt11
events.js:292
throw er; // Unhandled 'error' event
^
Error: Unexpected server response: 200
at ClientRequest. (C:\Users\ozgur\bot2\node_modules\ws\lib\websocket.js:580:7)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315: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\ozgur\bot2\node_modules\ws\lib\websocket.js:698:15)
at ClientRequest. (C:\Users\ozgur\bot2\node_modules\ws\lib\websocket.js:580:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
The text was updated successfully, but these errors were encountered: