-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Android] Error: Context.startForegroundService() did not then call Service.startForeground() #1874
Comments
same here - since the problem is reported by so many developers maybe it's time to take action |
Encountering the same problem, I found that there are limitations on apps in the background. Locking the screen, while building the app makes that app as background, in that case, it cant run invoked before on build services. More about these limitations here https://developer.android.com/about/versions/oreo/background |
@daniel-plewinski I encourage you to do exactly that! That's the beauty of open source, you're the master of your own destiny. I'll happily review any PRs that you or any other people on this thread submit. |
@ernestbies I encourage you to make a fork of this project an implement a concise repro of your issue there (in the example app). |
Hey, thanks for answer. In the attached topics, the developers were looking for various solutions, but unfortunately none of them solved the problem. Related error:
I updated the issue title and content to be more readable for users. |
I think this will be solved by #1888 |
I can confirm this. Down from 20-30 crashes a day to 0. Thank you! |
@martinmidtsund thanks! :-) |
is this fixed? This error is getting logged the most in crashanalytics, I was thinking if there's a work around or if the issue has been fixed? |
Describe the Bug
This problem has been present in the library for a very long time but is still not fixed and all topics related to it are closed. So I decided to create a new one.
Topics related to this issue: #473, #524, #1676.
The problem is serious, has been present for several years and affects the user experience of users using the react-native-track-player library.
Steps To Reproduce
Lock the screen when building the app. In addition, the problem occurs after listening to a given track for a long period of time.
The problem also occurs when users use the application (data from Crashlytics, reported by users).
Another way to trigger the problem is to replace startService() with startForegroundService() in the file MusicModule.kt. Wait about 10 seconds and after this change application will crash with the same error.
Replicable on Example App?
Yes.
Environment Info:
The problem occurs on physical devices and emulators. Versions:
"react-native": "^0.70.6"
"react-native-track-player": "^3.2.0"
The text was updated successfully, but these errors were encountered: