-
Notifications
You must be signed in to change notification settings - Fork 202
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
Record package creates invalid files that are too small/corrupted #394
Comments
Thanks for the report. For the config, I would suggest to let bit rate and sample rate to default values and see how it goes. Finally, since you're mixing multiple platforms, I would suggest to ensure you are using the latest transitive dependencies. |
@llfbandit Thanks for your answer! Just to clarify about the uploading part - I actually log the size error before the upload happens, so this is definitely unrelated to the upload (i.e I check the file size locally on the device and then upload, but if the size is too small I short circuit with an error). I'll try changing the bit rate and sample rate to default in case it helps. Regarding the dependencies, I'll also check. In case you have any other idea I would highly appreciate it. |
Well to find the real issue you must change only one thing at a time, otherwise it will just hide it at best.
|
@llfbandit thanks a lot. I'm adding logging right now so I'll be able to log that. Regarding transitive dependencies, what is a good way for me to check to make sure I'm using the most up to date ones? I'm definitely using the latest Thanks again. |
@llfbandit I'm really trying to get to the bottom here because this is causing me real issues with customers out there. The weird part is that I was using another flutter library previously for recording, and I was seeing similar issues. This makes me think it could be related to my implementation, yet the way I'm doing it feels pretty standard, so I'm not sure either how that would make sense. I should start having some more information with logs tomorrow about what encoder/platform is causing issues but the fact it happens both on Web and on mobile already tells me it's not one encoder only, since it'll use opus on web but not on mobile. |
Just run |
Hi @llfbandit , some of the errors that are being logged are as follows: Do you have any idea what could be causing this? I'm using the exact file URL that is returned to me by stopping the recording (and the same one that I give to it of course). Thanks! |
@llfbandit finally, the other set of errors are actual m4a files that are generated but are corrupted - they won't play at all. Some of these are 8mb, others smaller, others larger. This happens on iOS only. |
Hi @llfbandit, I'm coming back to you because we are still seeing this issue and as our usebase grows, it's happening more often. It's mainly on web, and it ends with recordings being 14kB and basically corrupted. I truly have no idea why this is happening and I'm running out of ideas. Is there any chance we can try some extra troubleshooting steps? The main issue is this is not something I can reproduce, but it's happening too often. Thanks a lot |
Package version: 5.1.2
Environment
Describe the bug
We are using the Record package in a production app and seeing daily dozens of recordings that upload to a server as corrupted files. This happens both for opus as well as aacLc.
The files will be super small: 5210 bytes, 4525 bytes, etc. and are simply corrupted - as in, they are not valid.
So, to decide on the encoder, we do this:
to try and cover all platforms.
And here is the rest of the config:
Are we doing something obviously wrong here?
To Reproduce
Steps to reproduce the behavior: I don't have clear steps to reproduce since it doesn't happen for me - it happens in roughly 1-2% of the cases, but our app heavily depends on recordings so this is a real issue.
Expected behavior
Always generate a valid audio file.
Additional context
This happens on all platforms. Would love some help here, thanks a lot!
The text was updated successfully, but these errors were encountered: