Skip to content
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

Not working on Android 8.0+ #63

Open
adamivancza opened this issue Nov 13, 2018 · 5 comments
Open

Not working on Android 8.0+ #63

adamivancza opened this issue Nov 13, 2018 · 5 comments

Comments

@adamivancza
Copy link

I'm facing the same issue that's mentioned on this bug report: #34

11-13 16:20:49.901 20728 20728 D BackgroundTask: Setting foreground false
11-13 16:20:49.901 20728 20728 D BackgroundTask: Committing job schedule
11-13 16:20:52.160 20728 20728 D ReactNative: ReactInstanceManager.detachViewFromInstance()
11-13 16:29:17.859 22953 22987 D BackgroundTask: Job is running

Then nothing happens - my actual task is never called after this point. Any idea how can I resolve this? Obviously setting targetSdk to 25 is not a valid solution anymore since Google requires us to use 26.

@xuancong84
Copy link

Same to me. I have extensively tested. It does not work on Android 8.0+.
No matter what I do, the defined task never gets running.

12-28 11:17:32.010  7497  7497 D ReactNative: ReactInstanceManager.ctor()
12-28 11:17:32.036  7497  7497 D ReactNative: ReactInstanceManager.createReactContextInBackground()
12-28 11:17:32.036  7497  7497 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
12-28 11:17:33.241  7497  7497 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
12-28 11:17:33.242  7497  7497 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
12-28 11:17:33.243  7497  7497 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
12-28 11:17:33.254  7497  7530 D ReactNative: ReactInstanceManager.createReactContext()
12-28 11:17:33.557  7497  7530 D ReactNative: Initializing React Xplat Bridge.
12-28 11:17:33.560  7497  7530 D ReactNative: Initializing React Xplat Bridge before initializeBridge
12-28 11:17:33.565  7497  7530 D ReactNative: Initializing React Xplat Bridge after initializeBridge
12-28 11:17:33.566  7497  7530 D ReactNative: CatalystInstanceImpl.runJSBundle()
12-28 11:17:33.566  7497  7534 D ReactNative: ReactInstanceManager.setupReactContext()
12-28 11:17:33.567  7497  7534 D ReactNative: CatalystInstanceImpl.initialize()
12-28 11:17:33.625  7497  7534 D ReactNative: ReactInstanceManager.attachRootViewToInstance()
12-28 11:17:34.027  7497  7533 I ReactNativeJS: Running application "helloWord_native" with appParams: {"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
12-28 11:17:57.743  7497  7497 D ReactNative: ReactInstanceManager.detachViewFromInstance()

@anshumanburman
Copy link

same error is occurring in my app. plz tell me any solution.

@adamivancza
Copy link
Author

@anshumanburman eventually for android we've switched to https://github.com/vikeri/react-native-background-job

@qlerebours
Copy link

The library react-native-background-job works only on Android at the moment.
To fix the bug on Android 8, a PR has been opened: #64

@danielfx90
Copy link

For those of you still looking for a solution, it seems (according to their README) that https://github.com/transistorsoft/react-native-background-fetch now supports both Android and iOS with a common API, i.e. exactly like this package does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants