Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

> TypeError: Cannot read property 'headers' of undefined #703

Open
universebound opened this issue Jun 11, 2017 · 4 comments
Open

> TypeError: Cannot read property 'headers' of undefined #703

universebound opened this issue Jun 11, 2017 · 4 comments

Comments

@universebound
Copy link

[Game] Ogar - An open source Agar.io server implementation
[Game] Loaded 0 plugin(s)
[Game] Listening on port 281
[Game] Current game mode is Free For All
[Game] Loaded stats server on port 88

TypeError: Cannot read property 'headers' of undefined
at GameServer.connectionEstablished (C:\Users\Hp\Downloads\Ogar-master\Ogar-master\src\GameServer.js:219:35)
at emitTwo (events.js:125:13)
at WebSocketServer.emit (events.js:213:7)
at handleUpgrade (C:\Users\Hp\Downloads\Ogar-master\Ogar-master\node_modules\ws\lib\WebSocketServer.js:88:16)
at WebSocketServer.completeUpgrade (C:\Users\Hp\Downloads\Ogar-master\Ogar-master\node_modules\ws\lib\WebSocketServer.js:270:5)
at WebSocketServer.handleUpgrade (C:\Users\Hp\Downloads\Ogar-master\Ogar-master\node_modules\ws\lib\WebSocketServer.js:197:10)
at Server.WebSocketServer._ultron.on (C:\Users\Hp\Downloads\Ogar-master\Ogar-master\node_modules\ws\lib\WebSocketServer.js:87:14)
at emitThree (events.js:135:13)
at Server.emit (events.js:216:7)
at onParserExecuteCommon (_http_server.js:494:14)

@ialexsip
Copy link

comment ( // ) from line 219 to 229.

@ghost
Copy link

ghost commented Jul 2, 2017

If you read the comments above the code that is giving errors, it says that if you try to disable to certain code legal action may be taken against you. I'm still trying to fix this bug by replacing the line: var origin = ws.UpgradeReq.headers.origin to the actual origin varible in the object of ws. This just boils down to that UpgradeReq is deprecated or removed.

@ChikoxD
Copy link

ChikoxD commented Nov 13, 2017

I have the same problem. any solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants