-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Error "expected 227171 bytes but received 227555" #40
Labels
bug
Something isn't working
Comments
I think that this is due to the recording hasn't been completely stopped (therefore keep writing new audio) while sending the HTTP request, causing mismatch between the size look up and actual file size. References: |
@ijsun shared that this can be somehow reliably reproduced by following the steps below:
|
j3soon
added a commit
that referenced
this issue
Nov 7, 2024
I hypothesize that this is due to a potential race condition between two recorders when the keyboard has been destroyed while recording. When the keyboard has been recreated, it will start a second new recorder. Since the first recorder isn't stopped, sending a request based on the file may lead to mismatch between file header size and actual file size, since the file is being written to while being read. Full error message: ``` expected X bytes but received Y ``` Note that Y will be larger than X. Fixes: #40
j3soon
added a commit
that referenced
this issue
Nov 7, 2024
I hypothesize that this is due to a potential race condition between two recorders when the keyboard has been destroyed while recording. When the keyboard has been recreated, it will start a second new recorder. Since the first recorder isn't stopped, sending a request based on the file may lead to mismatch between file header size and actual file size, since the file is being written to while being read. Full error message: ``` expected X bytes but received Y ``` Note that Y will be larger than X. Fixes: #40
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unsure how to reliably reproduce yet, may need a better logging mechanism as discussing in #17
The text was updated successfully, but these errors were encountered: