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

Cannot read property 'headers' of undefined #499

Open
Altar82 opened this issue Jan 30, 2018 · 8 comments
Open

Cannot read property 'headers' of undefined #499

Altar82 opened this issue Jan 30, 2018 · 8 comments

Comments

@Altar82
Copy link

Altar82 commented Jan 30, 2018

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

@Altar82
Copy link
Author

Altar82 commented Feb 2, 2018

Ty so much

@SAV-404
Copy link

SAV-404 commented Feb 3, 2018

@Altar82 close!!

@agarian-2 agarian-2 mentioned this issue Mar 18, 2018
@Petabyte918
Copy link

upgradeReq.header ==> req.headers

@teddyh-io
Copy link

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?

@ZandercraftGames
Copy link

Still getting this issue. @Petabyte918's solution didnt help

@FlushDesert22
Copy link

Here is an issue someone made about "upgradeReq" not being defined.
websockets/ws#1114

@Vampucha
Copy link

Anyone got a solution?

@itraw
Copy link

itraw commented Dec 28, 2023

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") + """);

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

8 participants