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

Running the react-native google fit with background fetch crashes the app #329

Open
wojtas56 opened this issue Nov 24, 2022 · 1 comment

Comments

@wojtas56
Copy link

wojtas56 commented Nov 24, 2022

Hi, when react-native-google-fit is running in the background using the background fetch feature the app crashes after some time (when terminated or in the background). I am also using headless task. This is the error report I get:

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Activity.startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int)' on a null object reference
  at com.google.android.gms.common.ConnectionResult.startResolutionForResult (com.google.android.gms:play-services-basement@@18.0.0:2)
  at com.reactnative.googlefit.GoogleFitManager$1.onConnectionFailed (GoogleFitManager.java:189)
  at com.google.android.gms.common.internal.zak.zac (com.google.android.gms:play-services-base@@18.0.1:8)
  at com.google.android.gms.common.api.internal.zabe.zaa (com.google.android.gms:play-services-base@@18.0.1:3)
  at com.google.android.gms.common.api.internal.zaaw.zaD (com.google.android.gms:play-services-base@@18.0.1:4)
  at com.google.android.gms.common.api.internal.zaaw.zar (com.google.android.gms:play-services-base@@18.0.1:16)
  at com.google.android.gms.common.api.internal.zaaq.zaa (com.google.android.gms:play-services-base@@18.0.1:1)
  at com.google.android.gms.common.api.internal.zabg.zab (com.google.android.gms:play-services-base@@18.0.1:4)
  at com.google.android.gms.common.api.internal.zabh.handleMessage (com.google.android.gms:play-services-base@@18.0.1:4)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:223)
  at android.app.ActivityThread.main (ActivityThread.java:7656)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:592)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947)

Any thoughts on this? Thanks.

RN version: 0.65.1
react-native-google-fit: 0.18.3

@Krupal5691
Copy link

Krupal5691 commented Mar 26, 2024

@wojtas56 Did you resolved the issue? I am also getting the same issue.

@marcusds @jacquerie @ksetrin @kristerkari

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

2 participants