question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Matchmaking is broken in v0.11.x if you set `options.server` but not `options.express`

See original GitHub issue

I’ve been using Colyseus with Koa (https://github.com/koajs/koa), and it looks like that’s not possible anymore in Colyseus v0.11.x. Matchmaking is broken in v0.11.x if you set options.server but not options.express when constructing or attaching the Server.

const app = new Koa();
// configure app

const server = new Server();
// define room

const httpServer = app.listen(PORT);
gameServer.attach({
  server: httpServer,
});

If it’s expected behaviour that this no longer works, then I think the Server constructor and attach() methods should throw an error if that configuration of ServerOptions is provided.

Additionally, if you pass empty options to the Server constructor, then later pass both options.server and options.express to attach(), the express routes never get set up (they are only called in the Server constructor).

const app = express();
// configure app

const server = new Server();
const httpServer = app.listen(PORT);
gameServer.attach({
  server: httpServer,
  express: app,
});

https://github.com/colyseus/colyseus/blob/f3fd41205c13873efda612d177af60e6e3345445/src/Server.ts#L64

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
endelcommented, Aug 26, 2019

can you try version 0.11.5 out @rnd256?

here’s a usage example with Koa: https://github.com/colyseus/colyseus/blob/master/usage/ServerKoa.ts

cheers!

0reactions
rnd256commented, Aug 27, 2019

Thanks @endel!! I still have more work to do to complete the migration, but matchmaking in v0.11.6 is working with Koa!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matchmaking issues and Emergency maintenance - Reddit
This maintenance is complete. Destiny 1 and 2 are online, though matchmaking issues remain. Players can still join on other players' activities, ...
Read more >
Matchmaker not finding match #61 - heroiclabs/nakama-godot
Problem is when I call it, it doesn't match with anything, even if another user is running an identical copy of it (it...
Read more >
Apex Legends Why Does Matchmaking Feel So Broken?
Apex Legends Why Does Matchmaking Feel So Broken ?Today we cover the topic of matchmaking and why it feels so broken in apex....
Read more >
Matchmaking is Broken & It's Killing CS:GO - YouTube
Matchmaking has some obvious problems that aren't/haven't been addressed by valve in the last year, and needs to be fixed or CS will ......
Read more >
PSA: Investigating Matchmaking/Invite difficulties for some users
We believe matchmaking and friends to be resolved for PC players due to changes in our server network configuration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found