dr4ft icon indicating copy to clipboard operation
dr4ft copied to clipboard

Bug: Server crash

Open laxect opened this issue 4 years ago • 8 comments

Webpage: dr4ft.gyara.moe

Browser: Chrome 91.0.4455.2 (Official Build) dev (64-bit)


Background Information

I have set up a server based on the latest commit a09ab4e. The only modify is to change the game expiration time to 10h.

Detailed Description

Run a docker image based on the latest commit and start a cube draft game. Then the server crashed.

Further Information

/app/backend/player/human.js:135
    const remainingToBurn = Math.min(pack.length, this.burnsPerPack - this.selected.burns.length);
                                          ^

TypeError: Cannot read property 'length' of undefined
    at Human.confirmSelection (/app/backend/player/human.js:135:43)
    at Human._confirmSelection (/app/backend/player/human.js:60:10)
    at Sock.emit (events.js:315:20)
    at Sock.message (/app/backend/sock.js:17:8)
    at Socket.emit (events.js:315:20)
    at Socket.onPacket (/app/node_modules/engine.io/lib/socket.js:110:14)
    at WebSocket.emit (events.js:315:20)
    at WebSocket.Transport.onPacket (/app/node_modules/engine.io/lib/transport.js:105:8)
    at WebSocket.Transport.onData (/app/node_modules/engine.io/lib/transport.js:116:8)
    at WebSocket.onData (/app/node_modules/engine.io/lib/transports/websocket.js:79:30)

All log if you need it: log.log

laxect avatar Mar 28 '21 13:03 laxect

Hi @laxect. Can you test with commit https://github.com/dr4fters/dr4ft/commit/68c609a64e8ca9ed22cbf9b8c0e32b53c610d46b, please? We just updated the Dockerfile in that commit to use Node 14 LTS. It should have the same result though.

Does the server also crash when you do other game modes?

tooomm avatar Mar 28 '21 13:03 tooomm

Doesn't seem docker related, looks like a classic js bug where a variable hasn't been set correctly.

mixmix avatar Mar 28 '21 22:03 mixmix

Very strange. That pack variable is pretty core, comes from this.packs.unshift

Maybe if that was called when there were no packs left? But no idea how it would get into that state.

mixmix avatar Mar 28 '21 23:03 mixmix

Hi @laxect. Can you test with commit 68c609a, please? We just updated the Dockerfile in that commit to use Node 14 LTS. It should have the same result though.

Does the server also crash when you do other game modes?

No Crash in sealed game. I'm sorry but I have no time to test it until next weekend.

Very strange. That pack variable is pretty core, comes from this.packs.unshift

Maybe if that was called when there were no packs left? But no idea how it would get into that state.

The server crash in the middle of the first pack and there are packs available.

laxect avatar Mar 29 '21 02:03 laxect

My play group just tried a draft for the first time in about 10 days and it crashed on us in Pack 2. When we tried to refresh/rejoin it wouldn't let us...said "No game found with ID..."

Screenshot attached. Dr4ft Crash

LotusWalker avatar Apr 10 '21 03:04 LotusWalker

@LotusWalker as this dr4ft.info? Also, does anyone know if @ZeldaZach runs the docker image or npm start to run that?

mixmix avatar Apr 10 '21 06:04 mixmix

@mixmix Yes it was Dr4ft.info

LotusWalker avatar Apr 10 '21 16:04 LotusWalker

This is a good reason to do tagged releases which match deploys there - it would make it much easier to jump back to previous stable versions and bisect the problem

On Sun, 11 Apr 2021, 04:26 LotusWalker, @.***> wrote:

@mixmix https://github.com/mixmix Yes it was Dr4ft.info

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dr4fters/dr4ft/issues/1507#issuecomment-817162269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUK3HT6XKWK7XXYDIGM7ELTIB34DANCNFSM4Z6BOACQ .

mixmix avatar Apr 10 '21 20:04 mixmix