MultiOgar
MultiOgar copied to clipboard
Cannot read property 'headers' of undefined
hi, I installed multi-ogar as described in the guide, but at the start I get this error can someone help me?
[INFO ][16:55:42] [1m[32mMultiOgar 1.2.69[37m - An open source multi-protocol ogar server[0m [INFO ][16:55:42] 0 IP ban records loaded. [WARN ][16:55:42] User account "Local Administrator" disabled [WARN ][16:55:42] User account "Local Moderator" disabled [WARN ][16:55:42] User account "Local User" disabled [INFO ][16:55:42] 0 user records loaded. [INFO ][16:55:42] 25 bad words loaded [WARN ][16:55:42] TLS: not supported (SSL certificate not found!) [INFO ][16:55:42] WebSocket: ws [INFO ][16:55:42] Started stats server on port 1500 [INFO ][16:55:42] Listening on port 1501 [INFO ][16:55:42] Current game mode is Free For All [FATAL][16:56:01] TypeError: Cannot read property 'headers' of undefined at GameServer.onClientSocketOpen (/root/MultiOgar/src/GameServer.js:273:107) at emitTwo (events.js:106:13) at WebSocketServer.emit (events.js:191:7) at handleUpgrade (/root/MultiOgar/node_modules/ws/lib/websocket-server.js:89:16) at WebSocketServer.completeUpgrade (/root/MultiOgar/node_modules/ws/lib/websocket-server.js:282:5) at WebSocketServer.handleUpgrade (/root/MultiOgar/node_modules/ws/lib/websocket-server.js:221:10) at Server.WebSocketServer._ultron.on (/root/MultiOgar/node_modules/ws/lib/websocket-server.js:88:14) at emitThree (events.js:116:13) at Server.emit (events.js:194:7) at onParserExecuteCommon (_http_server.js:409:14) [DEBUG][16:56:01] process.exit(1)
Ty so much
Ty so much
@Altar82 close!!
upgradeReq.header ==> req.headers
The comment @ItzLevvie mentioned isn't valid anymore as most of the code doesnt exist in this fork. I tried the suggestion @Petabyte918 brought up and it didn't work either. Is there a fix for this issue?
Still getting this issue. @Petabyte918's solution didnt help
Here is an issue someone made about "upgradeReq" not being defined. https://github.com/websockets/ws/issues/1114
Anyone got a solution?
I've got a solution to this open MultiOgar-master\src\GameServer.js and put this in the line 273: Logger.write("CONNECTED " + ws.remoteAddress + ":" + ws.remotePort + ", origin: "" + ((ws.upgradeReq && ws.upgradeReq.headers) ? ws.upgradeReq.headers.origin : "N/A") + """);