Skip to content

ForegroundServiceDidNotStopInTimeException crash#4549

Closed
aaravgarg wants to merge 1 commit intomainfrom
fix/android-crash-foreground-service-timeout
Closed

ForegroundServiceDidNotStopInTimeException crash#4549
aaravgarg wants to merge 1 commit intomainfrom
fix/android-crash-foreground-service-timeout

Conversation

@aaravgarg
Copy link
Collaborator

Summary

  • Wrap recorder stop() in try-catch during both service stop and watchdog retire
  • Prevents errors during recorder cleanup from blocking stopSelf(), which causes ForegroundServiceDidNotStopInTimeException on Android
  • Ensures stopSelf() is always called even if recorder stop fails

Crash Stats

Test plan

  • Verify background service still stops correctly
  • Test force-stopping the app while recording (should not crash)

🤖 Generated with Claude Code

Prevent errors during recorder cleanup from blocking service stop,
which can cause ForegroundServiceDidNotStopInTimeException on Android.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@aaravgarg aaravgarg requested a review from mdmohsin7 February 1, 2026 23:30
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@mdmohsin7
Copy link
Member

fixed in #4630

@mdmohsin7 mdmohsin7 closed this Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Hey @aaravgarg 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our roadmap and vision

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants