Skip to content

HeadlessJsTaskService is expected to run on UI thread #15915

@oriharel

Description

@oriharel

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: react-native-cli: 2.0.1 react-native: 0.48.1
  2. node -v: v7.5.0
  3. npm -v: 5.3.0
  • Target Platform: Android
  • Development Operating System: macOS
  • Build tools:

Steps to Reproduce

  1. Received a push notification
  2. Starting a Service that extends HeadlessJsTaskService.java
  3. App throws exception com.facebook.react.bridge.AssertionException: Expected to run on UI thread!

Expected Behavior

I expect no UI thread requirement for a background service (same as Android native SDK)

Actual Behavior

App throws an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions