- TypeScript 78.7%
- Svelte 19.1%
- HTML 0.7%
- JavaScript 0.5%
- CSS 0.5%
- Other 0.3%
Production reports a RangeError in RoomManager.cleanupAllZones:
RangeError: Too many elements passed to Promise.all
V8 stores the remaining-elements counter of Promise.all on a 21 bits
field, so it throws above 2^21 elements. In other words a single
listenRoom stream had accumulated more than 2 million subscribed zones.
The crash is only the visible symptom: long before throwing, such a room
had already blown up the memory of both the pusher and the back.
Nothing bounded the chain going from the client viewport to the zone
subscriptions: ViewportMessage is an int32 coming from the browser, and
the only validation was `left > right || top > bottom`. A client
announcing a viewport of 1 000 000 x 1 000 000 pixels generates ~9.7
million zones, freezing the pusher in the subscription loop.
Three layers:
- PositionDispatcher crops any viewport covering more than 1600 zones
around its center, before looping (it is the loop itself that freezes
the pusher). Cropping rather than rejecting, because a player fully
dezoomed on a very large map can legitimately go above the limit: they
keep seeing the players at the center of their view instead of being
frozen on their previous zones. Viewports with inverted or non finite
coordinates are still ignored.
- RoomManager refuses more than 50 000 subscribed zones per listenRoom
stream, as a safety net if the pusher misbehaves, and reports it once.
- cleanupAllZones no longer uses Promise.all: removals are synchronous
once the room is resolved, so SocketManager.removeZoneListeners
removes them in bulk, resolving the room and attempting the room
cleanup only once. Clearing the map also makes cleanupAllZones
idempotent: it is called from the "cancelled", "close" and "error"
handlers, which may all fire for a single disconnection.
|
||
|---|---|---|
| .claude | ||
| .codex/skills/translate | ||
| .github | ||
| .husky | ||
| .vscode | ||
| back | ||
| benchmark | ||
| cd | ||
| contrib | ||
| desktop | ||
| docs | ||
| libs | ||
| map-storage | ||
| maps | ||
| messages | ||
| patches | ||
| play | ||
| synapse | ||
| tests | ||
| uploader | ||
| .dockerignore | ||
| .env.template | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| docker-compose-no-oidc.yaml | ||
| docker-compose.e2e.yml | ||
| docker-compose.livekit.yaml | ||
| docker-compose.no-synapse.yaml | ||
| docker-compose.rustfs.yaml | ||
| docker-compose.single-domain.yaml | ||
| docker-compose.yaml | ||
| egress-config.yaml | ||
| livekit-config.yaml | ||
| npm-install.sh | ||
| package-lock.json | ||
| package.json | ||
| README-MAP.png | ||
| README.md | ||
| SECURITY.md | ||
| UPGRADE.md | ||
| Vagrantfile.template | ||
| wait-proto.sh | ||
WorkAdventure
WorkAdventure is a platform that allows you to design fully customizable collaborative virtual worlds (metaverse).
With your own avatar, you can interact spontaneously with your colleagues, clients, partners (using a video-chat system, triggered when you approach someone). Imagine all types of immersive experiences (recruitments, onboarding, trainings, digital workplace, internal/external events) on desktop, mobile or tablet.
The little plus? The platform is GDPR and open source!
See more features for your virtual office!
Pricing for our SaaS version!
Support our team!
Community resources
- Want to build your own map, check out our map building documentation
- Check out resources developed by the WorkAdventure community at awesome-workadventure
Setting up a production environment
We support 2 ways to set up a production environment:
- using Docker Compose
- or using a Helm chart for Kubernetes
Please check the Setting up a production environment guide for more information.
Note
WorkAdventure also provides a hosted version of the application. Using the hosted version is the easiest way to get started and helps us to keep the project alive.
Setting up a development environment
Note
These installation instructions are for local development only. They will not work on remote servers as local environments do not have HTTPS certificates.
Install Docker and clone this repository.
Warning
If you are using Windows, make sure the End-Of-Line character is not modified by the cloning process by setting the
core.autocrlfsetting to false:git config --global core.autocrlf false
Run:
cp .env.template .env
docker-compose up
The environment will start with the OIDC mock server enabled by default.
You should now be able to browse to http://play.workadventure.localhost/ and see the application. You can view the Traefik dashboard at http://traefik.workadventure.localhost
(Test user is "User1" and password is "pwd")
If you want to disable the OIDC mock server (for anonymous access), you can run:
$ docker-compose -f docker-compose.yaml -f docker-compose-no-oidc.yaml up
Note: on some OSes, you will need to add this line to your /etc/hosts file:
/etc/hosts
127.0.0.1 oidc.workadventure.localhost redis.workadventure.localhost play.workadventure.localhost traefik.workadventure.localhost matrix.workadventure.localhost extra.workadventure.localhost icon.workadventure.localhost map-storage.workadventure.localhost uploader.workadventure.localhost maps.workadventure.localhost api.workadventure.localhost front.workadventure.localhost
Troubleshooting
See our troubleshooting guide.


