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

Android app crashes when adding permissions for react-native-health-connect #79

Closed
vipul7387497208 opened this issue Mar 28, 2024 · 1 comment

Comments

@vipul7387497208
Copy link

Description

I have developed a React Native application that works fine in its basic form. To enhance its functionality, I decided to integrate the react-native-health-connect library to access health-related data. Following the library's official documentation, I was able to install and link the library to my project without any initial issues.

Issue

However, after adding the necessary permissions to the Android manifest and attempting to run the application on an Android device, the app crashes immediately upon launch. I attempted to run the same codebase on iOS and in a browser environment. As expected, it showed an error message stating that react-native-health-connect is not supported on these platforms, which aligns with the library's documentation. The primary concern is the unexpected crash on Android, which is supposed to be a supported platform.

Steps to Reproduce

  1. Create a new React Native application.
  2. Install the react-native-health-connect library using npm.
  3. Follow the installation and setup instructions provided in the library's README, including the addition of permissions in the Android manifest.
  4. Attempt to run the application on an Android device/emulator.

Error
lateinit property requestPerssion has been initiazed,

Expected Behavior

The application should launch without crashing, and the react-native-health-connect library should be initialized successfully, allowing for health data access following user permission.

Actual Behavior

The application crashes immediately upon launch on Android devices, with no specific error message provided that could hint at the cause of the issue.

Environment

  • React Native version: 0.73.6
  • React version: 18.2.0
  • react-native-health-connect version: "react-native-health-connect": "^2.0.1",
  • Android version:14

Additional Context

  • Include any additional information that might be relevant to diagnosing the problem, such as specific permissions added to the Android manifest.
  • If possible, include logs from Android Logcat that show errors or warnings at the time of the crash.

Screenshots
Screenshot from 2024-03-28 20-51-15

@matinzd
Copy link
Owner

matinzd commented Mar 28, 2024

Duplicate of #71.

@matinzd matinzd closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants