junlarsen / league-connect

:electric_plug: Node.js HTTP/1.1, HTTP/2.0 and WebSocket interface to the League of Legends Client APIs
https://www.npmjs.com/package/league-connect
MIT License
156 stars 24 forks source link

Cant create WebSocketConnection #110

Open Mom0aut opened 1 year ago

Mom0aut commented 1 year ago

Hey i cant create a Websocket connection the response object is always null. Is there maybe a problem with the Websocket-Connection with the R12 version?

Example Code

const ws = await createWebSocketConnection({
        authenticationOptions: {
            // any options that can also be called to authenticate()
            awaitConnection: true,
        }, pollInterval: 1000
    })

ws.on('message', message => { //ws is always null
  // Subscribe to any websocket event
})

I am using Next.js with Electron, maybe i am missing something?