Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map schema to prevent undefined reference #176

Open
wants to merge 1 commit into
base: 3.0
Choose a base branch
from

Conversation

LukeWood
Copy link

@LukeWood LukeWood commented Aug 4, 2024

I'm pretty sure this is a bug, but sometimes when I run the alpha of colyseus 0.16 with this version I get the error:

TypeError: Cannot read properties of undefined (reading 'Symbol($changes)')
    at [$filter] (/Users/lukewood/workspace/yeti/node_modules/.pnpm/@[email protected]/node_modules/@colyseus/schema/src/types/custom/MapSchema.ts:32:51)
    at Encoder.encode (/Users/lukewood/workspace/yeti/node_modules/.pnpm/@[email protected]/node_modules/@colyseus/schema/src/encoder/Encoder.ts:104:32)
    at Encoder.encodeView (/Users/lukewood/workspace/yeti/node_modules/.pnpm/@[email protected]/node_modules/@colyseus/schema/src/encoder/Encoder.ts:204:14)
    at SchemaSerializer.applyPatches (/Users/lukewood/workspace/yeti/node_modules/.pnpm/@[email protected]/node_modules/@colyseus/core/build/serializer/SchemaSerializer.js:93:78)
    at QuickplayRoom.broadcastPatch (/Users/lukewood/workspace/yeti/node_modules/.pnpm/@[email protected]/node_modules/@colyseus/core/build/Room.js:401:41)
    at Timeout.QuickplayRoom.handleTick [as _onTimeout] (/Users/lukewood/workspace/yeti/apps/bulletz/server/src/QuickplayRoom.ts:73:12)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

perhaps this is just a "workaround" rather than the fix of the root cause. I don't know the new repo structure that well, but hopefully this is a fix.

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

Successfully merging this pull request may close these issues.

1 participant