Skip to content

[Android] Stop rogue service restarts#714

Merged
Guichaguri merged 1 commit intodoublesymmetry:devfrom
perushevandkhmelev-agency:fix/android-non-sticky-service
Sep 1, 2019
Merged

[Android] Stop rogue service restarts#714
Guichaguri merged 1 commit intodoublesymmetry:devfrom
perushevandkhmelev-agency:fix/android-non-sticky-service

Conversation

@biomancer
Copy link
Copy Markdown
Contributor

This fixes "Module AppRegistry is not a registered callable module (calling startHeadlessTask)" crash I've been seeing in reports for a long time.

START_STICKY caused cases when service is started by android automatically (it was possible to reproduce it on some devices by restarting an app multiple times, while other devices never did it, so it was not easy to catch), when there is no react context yet, no MusicModule initialized, etc - and when our code tries to register playback service, app crashes with that error.

…itself when there is no React context yet.

That caused crash with "Module AppRegistry is not a registered callable module (calling startHeadlessTask)" error
@biomancer biomancer changed the title [Android] Disable rogue service restarts [Android] Stop rogue service restarts Aug 28, 2019
Copy link
Copy Markdown
Collaborator

@Guichaguri Guichaguri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Guichaguri Guichaguri merged commit 74e4113 into doublesymmetry:dev Sep 1, 2019
benjipott pushed a commit to benjipott/react-native-track-player that referenced this pull request Dec 3, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714)

Make music service not sticky so that android won't start service by itself when there is no React context yet.
Daimyo7 pushed a commit to Daimyo7/react-native-track-player that referenced this pull request Dec 27, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714)

Make music service not sticky so that android won't start service by itself when there is no React context yet.
Daimyo7 pushed a commit to Daimyo7/react-native-track-player that referenced this pull request Dec 27, 2019
…le (calling startHeadlessTask)" errors. (doublesymmetry#714)

Make music service not sticky so that android won't start service by itself when there is no React context yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants