-
Notifications
You must be signed in to change notification settings - Fork 68
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
App Crashes on Launch After Adding "mic_stream" Dependency on Android TV and Chromecast with Google TV #80
Comments
Thank you for your report. I will see if I can do anything to address this issue. It's going to take some time though. Now - did an earlier version of the plugin previously work? I expect it not to but if you find the time please test it. Most importantly, can you provide crash logs? If you can give me something to work with before I can reproduce the issue this may speed up the process significantly. Lastly, the warnings you mentioned are old, they exist since the beginning of the plugin. I also haven't found a way to get rid of them. They come from the Java backend, probably from one of the few packages I'm using to record audio or to send it to flutter. I deem it unlikely to be the issue, since I think the Java backend part should not get started until a stream is requested (this I need to double check though, as it sounds like a potential source of errors for devices maybe not properly implementing said Java packages) |
Thank you for your prompt response.
I understand that resolving this issue will take time, and I appreciate your efforts to look into it. Thank you. |
I have tested other versions of the Additionally, I've tested the app on various other physical devices including Samsung A42, Samsung A53, Samsung A31, and NOKIA X71, and it runs smoothly on all these smartphones. Interestingly, the app also works well on NVIDIA Shield TV, which is another Android TV device. However, it crashes specifically on Chromecast with Google TV. |
Unfortunately, my current Chromecast with Google TV device does not support USB debug mode and cannot be rooted, making it difficult for me to obtain crash logs. Do you have any other methods for retrieving these reports? |
Regarding the Java backend warnings, here are some suggestions that may help:
This is a response from GPT-4. It may help you resolve the Java issues. |
No, especially not in such an early state. Best bet would be to try to reproduce it on an emulated system |
Thank you, that is roughly as anticipated. The configuration and packages used never changed much. I suspect it has something to do with the native AudioRecord backend |
haha I will see what I can do. Until now this never has been an issue and I attributed it to the fact that the backend is written in Java 8. Literally everything should be deprecated. |
I've tested the app on an emulated Google TV (API 30) and various Pixel phone models using the emulator, and I've also tried using other recording apps as well as the "Spectroid" app to test sound graphs and spectrograms, and all these other apps function correctly on the device. This concludes my testing report for now. I apologize for the inconvenience and appreciate your time and effort in looking into this issue. Thank you! |
I've had a look through the native code looking for some obvious flags. There is definitely static code getting executed; not a lot but it's a start. Now, until I figure out a way to reproduce the issue, I can only rely on your cooperation to debug this. So if you want, clone this repo, checkout branch fix/80/android-tv-crash, and build the example app. If the change from 69f3bba is the issue, the example crash shouldn't crash on launch (though it will when you press the recording button). |
Thank you for providing the branch for testing. Here are my findings after building the example app:fix/80/android-tv-crash
It seems that the issue persists specifically on Chromecast with Google TV, even with the changes from the branch.fix/80/android-tv-crash |
thank you for your report. |
description of the Issue:
I added the mic_stream package (version 0.7.1) as a dependency in a basic Flutter demo app. The app crashes upon launch when tested on Android TV and Chromecast with Google TV. It's worth noting that I haven't added any code related to mic_stream in the main program (main.dart).
expected behavior:
The app should launch normally after adding the mic_stream dependency.
actual behavior:
The app crashes upon launch after adding the mic_stream dependency.
steps to reproduce:
my environment:
Sample main.dart Code from Demo App:
Below is the test code from my demo app's main.dart. Note that I haven't modified any code or added anything related to mic_stream in this demo app.
Build Warning Logs:
When I build the APK for release using flutter build apk --release, I receive the following warnings related to mic_stream, which I suspect might be related to the issue:
I am unable to resolve these warnings with my current level of expertise, and I believe they could be contributing to the issue.
additional Information:
I have also tried another similar package, flutter_sound (version 8.1.4), and it works fine in the same environment.
special Note:
I have some projects that are already heavily dependent on mic_stream, so making changes would require a significant amount of time. Nevertheless, I'm still hopeful and writing here with a request for the author to please address this issue. Thank you!
The text was updated successfully, but these errors were encountered: