You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
What I've done: (all on Win 10, with latest npm and node version)
Git cloned the Ogar repo
run "Install Dependencies.bat"
run "Start-windows.bat"
which showed:
[Game] Ogar - An open source Agar.io server implementation
[Game] Loaded 0 plugin(s)
[Game] Loaded stats server on port 88
[Game] Listening on port 443
[Game] Current game mode is Free For All
>
TypeError: Cannot read property 'headers' of undefined
at GameServer.connectionEstablished (D:\projects\Ogar\src\GameServer.js:219:35)
at emitTwo (events.js:106:13)
at WebSocketServer.emit (events.js:191:7)
at handleUpgrade (D:\projects\Ogar\node_modules\ws\lib\WebSocketServer.js:88:16)
at WebSocketServer.completeUpgrade (D:\projects\Ogar\node_modules\ws\lib\WebSocketServer.js:270:5)
at WebSocketServer.handleUpgrade (D:\projects\Ogar\node_modules\ws\lib\WebSocketServer.js:197:10)
at Server.WebSocketServer._ultron.on (D:\projects\Ogar\node_modules\ws\lib\WebSocketServer.js:87:14)
at emitThree (events.js:116:13)
at Server.emit (events.js:194:7)
at onParserExecuteCommon (_http_server.js:409:14)
So I go check the code of GameServer.js and found this
I simply remove this part of code regardless of the lengthy warning.
And I tried again: http://agar.io/?ip=127.0.0.1:443 in Google Chrome
It still kept showing Connecting, but this time there is no error message in the server command line.
(The console on Chrome showed no error message.)
I tried a few commands like Addbot 10 and it showed [Console] Added 10 player bots
which seems to imply that the server IS still working.
I tried to search through both the issues here and the Net but in vain.
So there are actually two problems here:
When trying to connect to server, in server command line
TypeError: Cannot read property 'headers' of undefined
at GameServer.connectionEstablished (D:\projects\Ogar\src\GameServer.js:219:35)
where in GameServer.js var origin = ws.upgradeReq.headers.origin;
P.S. A friend of mine tried the same method on Ubuntu 16.04 and showed the same error.
(After simply remove the related code mentioned above)
When trying to connect to server, it kept showing Connecting, but no error message in the server command line.
P.S. Ubuntu 16.04 works fine (after removing the code).
I would appreciate it very much if anybody could help, because my team wants to use this in a student conference on June 11th.
The text was updated successfully, but these errors were encountered:
I would not suggest using Ogar, as it is very obsolete.
If you want a project, which is still worked on, and has many features, I shall suggest: https://github.com/Megabyte918/MultiOgar-Edited
What I've done: (all on Win 10, with latest npm and node version)
which showed:
It kept showing connecting, and the server command line showed error
So I go check the code of GameServer.js and found this
It still kept showing Connecting, but this time there is no error message in the server command line.
(The console on Chrome showed no error message.)
I tried a few commands like
Addbot 10
and it showed[Console] Added 10 player bots
which seems to imply that the server IS still working.
I tried to search through both the issues here and the Net but in vain.
So there are actually two problems here:
where in GameServer.js
var origin = ws.upgradeReq.headers.origin;
P.S. A friend of mine tried the same method on Ubuntu 16.04 and showed the same error.
When trying to connect to server, it kept showing Connecting, but no error message in the server command line.
P.S. Ubuntu 16.04 works fine (after removing the code).
I would appreciate it very much if anybody could help, because my team wants to use this in a student conference on June 11th.
The text was updated successfully, but these errors were encountered: