-
-
Notifications
You must be signed in to change notification settings - Fork 265
Context.startForegroundService() did not then call Service.startForeground() #266
Comments
i'm facing the same, @gazedash do you solve it? |
Got the same issue, I tried many workaround but can't solved completely |
Same problem here! |
same 👍 |
+1 |
Same problem here. Android 10 in an emulator. Crashes consistently when calling setNowPlaying() after either resetNowPlaying() or stopControl(). |
Turns out that the conditional block in MusicControlNotification onCreate method isn't necessary. You can also replace the conditional block in MusicControlModule with
In MusicControlNotification Replace with:
|
reproducible with |
@tanguyantoine Yes, still getting this error on some hw devices in 0.10.8. |
Same issue here. I'm on |
(Just realized many currently open issues might be related to this one, like #244, for example) @tanguyantoine, I appreciate in advance your attention on that ;) |
@bunmiedee would you mind creating a pull request ? |
@tanguyantoine sure - I can look into it over the weekend |
While we don't fix this I'm using this workaround to prevent multiple calls to startForegroundService. Seems to stop the bug from happening. I just commented out all the code that unregisters and releases eveything, preventing init() from running more than once.
|
This was a problem for me too. Reopening to be fixed. PRs welcome! @sparcbr @bunmiedee @pabloluz @gazedash |
Should be fixed in #329 |
@bradleyflood @bunmiedee I still get this (a lot) with the latest version 😔 |
@bradleyflood @bunmiedee I'll try this fix and make a PR if it works https://stackoverflow.com/a/53402038, it will take a while because I cannot reproduce on any of my devices so I need to push to prod 🙄 |
Thanks @rborn I'll reopen this issue. |
Just a heads-up, the above "fix" didn't work, we still have a lot of crashes on android 9/10 :( |
any updates? |
@SBShane cold call I know 😅 but I see you are versed with android ? any chance you could look into this ? 😻 |
@SBShane I found this fork, will let you know if I can merge to mine and if it works - https://github.com/natashache/react-native-music-control |
Small update: we launched to prod with the changes done using the above fork and it seems to be fixed. I'll like to a few more days to be sure. @natashache I have my fork where I merged your code 😻, synced with current master and added a small fix. Would you like to make a PR or can I do it? 😻 https://github.com/rborn/react-native-music-control |
@bradleyflood I have been testing the fix in production and it seems to work fine, however I got no reply from @natashache nor @hiennguyen92 (natashache@c28a931#commitcomment-41838029) so I don't know how to proceed :( |
@rborn You are free to use it at your disposal. |
@hiennguyen92 thank you, I'll create a PR soon 😻 |
@bradleyflood PR done, can we maybe have a release 😅 ? This code is tested in production, we got no errors related to the startForeground anymore (there are some commits after that, which fix small issues but the crashes were only a few) @hiennguyen92, @natashache thank you for your fixes 😻 |
Thanks Dan. Let me check it out and get back to you.
Brad
…On Tue, 8 Sep 2020 at 19:14, Dan Tamas ***@***.***> wrote:
@bradleyflood <https://github.com/bradleyflood> PR done, can we maybe
have a release 😅 ? This code is tested in production, we got no errors
related to the startForeground anymore (there are some commits after that,
which fix small issues but the crashes were only a few)
@hiennguyen92 <https://github.com/hiennguyen92>, @natashache
<https://github.com/natashache> thank you for your fixes 😻
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#266 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIJEGCK77PR2U5HA7VY43TSEXYXPANCNFSM4HVBOGGQ>
.
|
Description
Context.startForegroundService() did not then call Service.startForeground()
#159
Often happens on Samsung, 9.0 android version
I have
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
in my manifest.I use the latest version of react-native-music-control ("0.10.4")
Platform ?
The text was updated successfully, but these errors were encountered: