ryanheise / audio_service

Flutter plugin to play audio in the background while the screen is off.
796 stars 474 forks source link

After using flutter pub upgrade i got this error from android platform android.app.RemoteServiceException #960

Closed dipak1267 closed 1 year ago

dipak1267 commented 1 year ago

Issue

After using flutter pub upgrade command i have received this errors like i mentioned. i don't have clear idea but as my POV it's issue of playback state and this issue crash my app when user play audio.

Runtime error

E/AndroidRuntime( 7040): android.app.RemoteServiceException: Bad notification(tag=null, id=1124) posted from package com.app.hachzek, crashing app(uid=10162, pid=7040): Couldn't inflate contentViewsjava.lang.IndexOutOfBoundsException: Index: 3, Size: 3
E/AndroidRuntime( 7040):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
E/AndroidRuntime( 7040):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 7040):    at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 7040):    at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 7040):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7040):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 7040):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/Process ( 7040): Sending signal. PID: 7040 SIG: 9

Output of flutter doctor

[✓] Flutter (Channel master, 3.4.0-19.0.pre.40, on macOS 11.6.1 20G224
    darwin-x64, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.71.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

Devices exhibiting the bug

Android 8.0 and above but i haven't check on lower version iOS 14+ but i haven't check on lower version

ryanheise commented 1 year ago

I'm a little confused how this issue got through the submission form since it doesn't seem to have all of the information required by the form. Did you delete any required sections?

ryanheise commented 1 year ago

Also, you have given details on the Android error but no details on the iOS error. I think you should create a separate issue for each platform since they are different errors, and please be sure to enter all required information into the form in both cases.

dipak1267 commented 1 year ago

Also, you have given details on the Android error but no details on the iOS error. I think you should create a separate issue for each platform since they are different errors, and please be sure to enter all required information into the form in both cases.

But in that form ask me for the API documentation sentence but i don't know where this issue is so that's why i delete that section.

ryanheise commented 1 year ago

Is that the only section you deleted? What about the minimal reproduction project? What about the reproduction steps? Usually when people don't want to follow the instructions, it takes up a lot of my time to write back and forth asking for this and that piece of information which was already stated in the instructions. I would not like to go through that again, so please do your best to fill in each section.

dipak1267 commented 1 year ago

ryanheise i know how much effort and dedication required to develop package so i can understand your POV i will make sure i will fill most of that but i am not able to share my project hope you understand but it work before but after using pub upgrade command this will happens

ryanheise commented 1 year ago

I certainly don't want you to share your project, that is too much for me to look at. As per the instructions, you need to create a minimal reproduction project, or if the official example already demonstrates the bug, mention that. Some people find that after they go through the process to prepare a minimal reproduction project, they discover some other reason for the error that is not caused by this plugin, so they don't submit the bug report.

zoozobib commented 1 year ago

same problem

ryanheise commented 1 year ago

I will close this issue as invalid (missing sections).

@zoozobib if you have a similar issue, please open a new issue. Since you've already submitted an issue in the past that was invalid, be aware that you will need to pay attention to the instructions when submitting an issue otherwise I can't investigate it.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.