Skip to content

Discord Round Winner plugin error #391

@pavelhoral

Description

@pavelhoral

Description of Issue

SquadJS very often crashes in discord-round-winner plugin (see bellow).

Errors or Screenshots of Issue

Squad Information

  • SquadJS Version: 4.1.0
  • Squad Version: the most recent

This is the SquadJS log before the crash (it happens quite often):

[2024-11-17T18:26:07.691Z][SquadServer][1] Updated layer information.
[2024-11-17T18:26:09.309Z][SquadServer][1] Updating squad list...
[2024-11-17T18:26:09.340Z][SquadServer][1] Updated squad list.
[2024-11-17T18:26:20.555Z][SquadServer][1] Fetching Admin Lists...
[2024-11-17T18:26:20.591Z][SquadServer][1] 386 admins loaded...
file:///home/container/squad-server/plugins/discord-round-winner.js:51
            value: `${info.winner} won on ${this.server.layerHistory[1].layer.name}.`
                                                                              ^

TypeError: Cannot read properties of null (reading 'name')
    at DiscordRoundWinner.onNewGame (file:///home/container/squad-server/plugins/discord-round-winner.js:51:79)
    at SquadServer.emit (node:events:531:35)
    at SquadLogParser.<anonymous> (file:///home/container/squad-server/index.js:208:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This specific crash appeared after Manicouagan RAAS v2 - Manicouagan map ended.

System Information

  • Operating System: Linux with Squad and SquadJS in Docker containers (Pterodactyl)
  • NodeJS Version: 21 (Pterodactyl egg)
  • Yarn Version: (whatever Pterodactyl egg uses)

Metadata

Metadata

Assignees

No one assigned

    Labels

    core bugBug related to the core SquadJS API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions