Did you get latest Colyseus working on Android with Cocos Creator 3.0?

Hello Devs,

I am trying to make an online multiplayer game with Colyseus. . Currently, I am able to connect to the server on Browser but when I am running the project on Android I am getting this error,

UncaughtType Error : Colyseus.Client is not a contructor

I followed the steps mentioned in Colyseus doc for Cocos creator 3.0

If you got it working on Android, please guide. Thanks.

Hello! Could you show example of code that you try run? It works in browser but doesn’t work on android?

Something like this…

class ColyClient extends Component
client : Colyseus.Client = null as any;

     this.client = Colyseus.Client("ws://localhost:8080");


Colyseus API had two files. colyseus.d.ts & colyseus.js. I marked JS script as global plugin hence I am not using import to load module.

Am I doing something wrong? I followed steps in the documentation.


try this as offical document:

this.client = new Colyseus.Client(“ws://localhost:8080”);