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

react-native-permissions: NativeModule.RNPermissions is null. [Android] #826

Closed ks1990cn closed 1 year ago

ks1990cn commented 1 year ago

Bug summary

Here is complete readme with my code for given error. I can see there are lot of already closed ways to do fix this issue, even by manual link is not working at my end.

https://github.com/ks1990cn/qrscanner/blob/master/README.md

Library version

3.10.1

Environment info

info Fetching system and libraries information...
(node:3544) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
  OS: Windows 11 10.0.22621
  CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Memory: 17.75 GB / 31.88 GB
Binaries:
  Node:
    version: 18.18.2
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 9.8.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-223.8836.35.2231.11005911
  Visual Studio:
    - 17.7.34018.315 (Visual Studio Community 2022)
Languages:
  Java: 11.0.16.1
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: 0.72.6
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Steps to reproduce

1.) Clone code

2.) cd ./qrscanner, then runnpx expo start

Reproducible sample code

https://github.com/ks1990cn/qrscanner
mikehardy commented 1 year ago

What makes you think your youtube tutorial is using expo? They start the app using the non-Expo react-native CLI, which supports native modules.

If you want to use Expo, you must understand how Expo works in relation to 3rd party native modules

That is your responsibility. There are different ways to use Expo (bare, managed, Expo Go) and they have different capabilities and native module constraints. You need to do different things between bare and managed.

I believe you need to study managed mode and the expo command "prebuild" or something similar.

None of that is the responsibility of this repo I think, and I don't think you have a valid issue here.

L03TJ3 commented 12 months ago

@zoontek Hi This was closed based on initial description. I get the same error for our react-native android app after bumping from 3.3.1 (basically works) > 3.10.1 Is there any spec changed that we need to update here? Do I need to create a new issue for it?

zoontek commented 12 months ago

@L03TJ3 No, just clean your cache (multiple duplicate can be found by searching for issues)

L03TJ3 commented 12 months ago

ah ok, yes could have done that. thanks