-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Crash on Android "ForegroundServiceDidNotStartInTimeException" #230
Comments
Hi @pbouttier Thank you for your interest in the plugin! I’ve just released version |
I've tried the I need to add
in
And I've seen other minor things. I don't know if it's directly related to 4.0.0, or to the scope you wanted to integrate, but I'll put them here anyway just in case:
|
Hi @pbouttier Thanks for your feedback !
|
Nice ! For 3, I don't think it's necessary to do anything specific. I was testing it in brute force mode, but it's unlikely to have a real case where it needs to alarm less than 5s later. |
Re, The problem persist on lastest version
And a second one (few cases) :
|
Hi @pbouttier I've been unable to reproduce your issue. Are you sure you followed the installation steps ? |
Re, sorry for my late reply. I was missing the scheduleExactAlarm permission but I can't find a configuration where it would be disabled, nor can I reproduce the problem on an emulator. My hope was that you had an idea of what might be blocking it, but if we're both lost, we'll be sailing blind. Maybe something like this ? https://stackoverflow.com/questions/77415459/android-13-foregroundservicedidnotstartintimeexception, androidx/media#112 ? |
I'm aware of the 5 seconds rule, I run |
I have these json from sentry. Android 13 & 14, differents permissions. schedule, post notif not granted us.sentry.io.json |
Hi @pbouttier Sorry for the late reply. Do you ask for the What do you think ? |
In the second error log, the permissions were :
So the problem must not be there Sorry, I only saw afterwards that it was a raw file, with no indentation or line feeds. Here they are, in readable format : schedule not granted.txt And thanks for the custom notification icon, it's great |
I saw something interesting in the second error log: "FOREGROUND_SERVICE_MEDIA_PLAYBACK": "not_granted" I believe this permission is necessary. The weird thing is that it should be granted by default when I added it in the plugin's manifest here: <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/> Did you disable it manually ? Does you other logs have this permission not granted ? If so, log 1 may crash because of |
Hi @pbouttier Do you still have the issue ? |
Sorry for my late reply. I haven't had time to test the request for the SCHEDULE_EXACT_ALARM permission. I'll include it in my next update but it's a big one, I've still got other points to finish. I don't understand FOREGROUND_SERVICE_MEDIA_PLAYBACK either. The permission is in the .xml file, so it ‘should work’. |
No problem. Let me know how it goes in your next update ! |
I often report the same crash.
|
Hi @synstin, Do you have the Android permissions set up as outlined earlier in this conversation? |
I've set all permissions. This is my current list of permissions. Thank you.
|
Alarm plugin version
3.1.5
Describe the bug
Play Store and Sentry report the same bug, a crash
To Reproduce
Steps to reproduce the behavior:
I didn't reproduce it myself, I only have the data from the play store, from sentry
Expected behavior
No crash :)
Screenshots
I didn't reproduce it myself
Device info
Provide device info (Manufacturer, OS version, ...)
Happen mostly on Android 14, but also and 13, 12, 10. And on multiple devices : samsung, xiaomi, redmi ...
Additional context
I have the "await" on most of my functions.
How i have set the alarm
I didn't have await on the
stop
, I'll add it in the next version of my app, just in case.Edit : not solve with the await on
stop
.Thanks for your time, this bug apart from the package is great :)
The text was updated successfully, but these errors were encountered: