zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.1k stars 836 forks source link

requestNotifications callback failing on android 14 #807

Closed hrahul2605 closed 1 year ago

hrahul2605 commented 1 year ago

Bug summary

currently on android api level 34, when requesting notifications, i am not receiving callbacks post clicking "Allow" or "Dont Allow"

Library version

^3.9.1

Environment info

System:
    OS: macOS 13.5
    CPU: (8) arm64 Apple M1
    Memory: 96.73 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 7.24.2 - ~/workspace/proteus/node_modules/.bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8193401
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /opt/homebrew/opt/openjdk@11/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.7 => 0.69.7 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Reproducible sample code

async requestPermissionsAndroid() {
    const result = await requestNotifications(['alert', 'sound']);
        // control does not reach here
    console.log({
        result,
    });

    return result;
}
zoontek commented 1 year ago

Just tried it with latest react-native-permissions + latest react-native version, no issue. Please update.

Screenshot 2023-09-17 at 14 04 29