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

[BUG] Cannot read properties of undefined (reading 'minecraftVersion') #67

Closed
chuanwise opened this issue May 3, 2023 · 1 comment
Closed

Comments

@chuanwise
Copy link

环境信息

  • 镜像:bangbang93/minecraft-proxy:latest
  • 服务器:Waterfall 1.19-526

Docker 日志

{"name":"server","port":15392,"host":"0.0.0.0","worker":5,"hostname":"taixue","pid":23,"level":50,"err":{"message":"Cannot read properties of undefined (reading 'minecraftVersion')","name":"TypeError","stack":"TypeError: Cannot read properties of undefined (reading 'minecraftVersion')\n    at MinecraftData.protocolVersionToMcVersion (/opt/minecraft-proxy/src/minecraft-data.ts:17:30)\n    at Client.awaitHandshake (/opt/minecraft-proxy/src/client.ts:89:45)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at ProxyServer.onConnection (/opt/minecraft-proxy/src/proxy-server.ts:84:25)"},"msg":"Cannot read properties of undefined (reading 'minecraftVersion')","time":"2023-05-03T01:48:55.127Z","v":0}
{"name":"client","hostname":"taixue","pid":23,"remoteAddress":"111.18.39.48","remotePort":8015,"level":30,"msg":"force disconnecting, reason: Cannot read properties of undefined (reading 'minecraftVersion')","time":"2023-05-03T01:48:55.131Z","v":0}

配置

proxy:
  port: 15392
  host: 0.0.0.0
  workers: 0
defaultServer: 太学
servers:
  - serverName: 太学
    proxyHost: localhost
    proxyPort: 60000
    version: 1.19.2
    onlineMode: true
    useProxy: false  # useProxy 不论 true false 都是一样的日志
    handlePing: false
blockList:
  ips: []
  usernames: []
  uuids: []
profileEndpoint: https://skin.taixue.cc/api/yggdrasil

容器启动参数

sudo docker run --network host --user nobody:nobody -d --name taixue.proxy.java --restart=always -v ./config:/opt/minecraft-proxy/config bangbang93/Minecraft-proxy
@bangbang93
Copy link
Owner

需要升级一下protocol才能支持1.19.2,可以先把version往下改一点,不启用handlePing的话不影响返回给客户端的版本的

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

No branches or pull requests

2 participants