lrocher / CodeConnectFix

Allow use 'Code Connection for Minecraft' v1.50 with Minecraft Bedrock v1.19.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't establish a connection

joelsholland opened this issue · comments

Hi, great initiative, but it's not working for me.

When following the instructions, I can't establish a connection in minecraft.
When running CodeConnectFix in command prompt I see an error message.
I'm on Windows 11, Bedrock is up to date.

C:\snapshot\CodeConnectFix-main\mcpews\lib\server.js:294
handleProtocols: (protocols) => protocols.find((protocol) => protocol === implementName)
^

TypeError: protocols.find is not a function
at Object.handleProtocols (C:\snapshot\CodeConnectFix-main\mcpews\lib\server.js:294:55)
at WSServer.completeUpgrade (C:\snapshot\CodeConnectFix-main\node_modules\ws\lib\websocket-server.js:389:24)
at WSServer.completeUpgrade (C:\snapshot\CodeConnectFix-main\mcpews\lib\server.js:316:15)
at WSServer.handleUpgrade (C:\snapshot\CodeConnectFix-main\node_modules\ws\lib\websocket-server.js:339:10)
at WSServer.handleUpgrade (C:\snapshot\CodeConnectFix-main\mcpews\lib\server.js:311:15)
at Server.upgrade (C:\snapshot\CodeConnectFix-main\node_modules\ws\lib\websocket-server.js:114:16)
at Server.emit (node:events:527:28)
at onParserExecuteCommon (node:_http_server:732:14)
at onParserExecute (node:_http_server:646:3)

Hi,

I have same configuration (Windows 11 and Bedrock update) but didn't reproduce your error.
Stack trace is very strange. I suppose you run it directly with node (and not using .exe distrib file)
I have no idea what wrong.

Do you have always this error ?

Perhaps, you have different port than me. You can specifiy different port on command line.
I'm use this version of Code Connection.

Hi,
The error message came when running through NPM. Luckily it is working now!
I had to deactivate a security setting in Bedrock: Settings > General > Require Encrypted Websockets , I think that did the trick.
Thanks again for the fix!