Skip to content
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

[BUG] [MonoDroid] Android.Util.AndroidRuntimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e08dc93 u0 communityToolkit.maui.media.services} #2482

Open
2 tasks done
xiufengpeng opened this issue Jan 30, 2025 · 1 comment
Labels

Comments

@xiufengpeng
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Android.Util.AndroidRuntimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e08dc93 u0 com.xxx.xxxcommunityToolkit.maui.media.services}
[MonoDroid]
[MonoDroid] --- End of managed Android.Util.AndroidRuntimeException stack trace ---
[MonoDroid] android.app.ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e08dc93 u0 com.xx.xx.xxx/communityToolkit.maui.media.services}
[MonoDroid] at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1931)
[MonoDroid] at android.app.ActivityThread.access$2700(ActivityThread.java:255)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2156)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:106)
[MonoDroid] at android.os.Looper.loopOnce(Looper.java:201)
[MonoDroid] at android.os.Looper.loop(Looper.java:288)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:8001)
[MonoDroid] at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1039)
[MonoDroid]

Expected Behavior

The problem seems happening randomly. After using the mediaElement take video and shows on the screen, then the app crashed out

Steps To Reproduce

Randomly happening,
After using the mediaElement take video and shows on the screen, then the app crashed out

Link to public reproduction project repository

NA

Environment

- .NET MAUI CommunityToolkit.maui: 11.0.0 and mediaElements 5.0.0 and 6.0.0
- OS: Android API 31
- .NET MAUI: .net 9

Anything else?

Randomly happening

Copy link
Contributor

Hi @xiufengpeng! We have added the needs reproduction label to this issue, which indicates that we are unable to take further action until you provide a reproduction sample that we can use to reproduce + fix your bug. In accordance with the Reporting a bug section of our Contributing.md that you confirmed reading before you submitted this Issue, we ask that every Issue author provide a link to an open-source repository containing the reproduction sample app. This issue will be closed automatically in 5 days if we do not receive a reproduction sample from you. Please feel free to re-open this Issue once you have provided a reproduction sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants