Skip to content

requestPermission() hangs indefinitely - no promise resolution/rejection, no popup, no error (Expo + New Architecture) #2656

Description

@Gui-Dev86

Environment

  • Plugin version: 5.5.0
  • Platform: Android
  • Expo SDK with newArchEnabled: true (required, since react-native-reanimated and react-native-worklets both fail the build with assertNewArchitectureEnabledTask if disabled)
  • Device: Samsung Galaxy S23+, Android 16
  • Dev client build (npx expo run:android)

Issue

Calling BackgroundGeolocation.requestPermission(Permission.Location) hangs indefinitely — the returned promise never resolves nor rejects. No system permission popup ever appears. No error, warning, or log is emitted (with logLevel set to Verbose).

Execution simply stops at this call and never proceeds to .ready().

What I've tried (all with no effect on the hang)

  • Installed and confirmed expo-gradle-ext-vars is correctly applied (googlePlayServicesLocationVersion visible in generated android/build.gradle)
  • Tried different plugin ordering in app.config.js
  • Manually revoked all location permissions via adb shell pm revoke before testing
  • Fully uninstalled the app (adb uninstall) and rebuilt from scratch
  • Temporarily removed the expo-location plugin entirely to rule out a conflict between the two location SDKs — same hang
  • Tested .ready() with a minimal config (only logger.logLevel) after skipping requestPermission() entirely — .ready() itself also hangs the same way, with no popup and no log output

Config

plugins: [
  ...
  ['expo-gradle-ext-vars', { googlePlayServicesLocationVersion: '21.1.0' }],
  ['react-native-background-geolocation', {}],
],
BackgroundGeolocation.onLocation(...);
await BackgroundGeolocation.requestPermission(Permission.Location); // ← hangs here
await BackgroundGeolocation.ready({ ... });

Question

Is this a known issue with the v5 TurboModule (New Architecture) implementation? Since RN 0.82+ / Expo SDK 55 no longer allow disabling the New Architecture, I can't test against the legacy bridge to confirm.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions