Closed megascatterbomb closed 3 months ago
I am seeing this a bunch -- seems wack
"POST /late_bytes?api_key=some_api_key HTTP/1.1" 422 Unprocessable Entity
I think if we make this logic better in terms of verbosity when it matters we will get some more info https://github.com/MegaAntiCheat/masterbase/blob/main/masterbase/app.py#L383
there seems to be no rhyme or reason with patterns for a given api key -- some will succeed and others will fail
Could this be related to the "Auto-delete recordings" option?
Could this be related to the "Auto-delete recordings" option?
I've encountered this error a few times myself and I don't have that setting checked.
I am struggling to reproduce locally
The only way it would fail validation is if the body isnt a string
This smells like a race condition on the DB/filesystem side as I cannot reproduce with what I believe to be valid data
note that we return a 422 if we get an error when attempting to close the late bytes out ... https://github.com/MegaAntiCheat/masterbase/blob/main/masterbase/app.py#L128
likely we are hitting https://github.com/MegaAntiCheat/masterbase/blob/main/masterbase/lib.py#L559 but I just added logs to show more detail
yes is indeed a race condition on the backend. Closing this issue and will eventually reproduce and fix
got these errors too:
2024-08-13T05:26:32.011520Z INFO client_backend::demo: Opened new demo session with Masterbase: DemoSession(229295141473228488338479370295583856718)
2024-08-13T06:04:35.083956Z ERROR client_backend::demo: Failed to upload late bytes to masterbase: Server returned 422
2024-08-13T06:04:37.021542Z INFO client_backend::masterbase: Closed session 229295141473228488338479370295583856718.
2024-08-13T06:05:08.936735Z INFO client_backend::demo: Opened new demo session with Masterbase: DemoSession(312197181810514410830725529466809385660)
2024-08-13T06:31:51.085087Z ERROR client_backend::demo: Failed to upload late bytes to masterbase: Server returned 422
2024-08-13T06:31:52.835987Z INFO client_backend::masterbase: Closed session 312197181810514410830725529466809385660.
Several users have reported intermittent 422 errors when uploading the late bytes.
Not critical as it doesn't affect our ability to parse the demo (it can even be played back in TF2 still), but still worth investigating.