wonday / react-native-orientation-locker

A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
MIT License
760 stars 274 forks source link

Getting null to all methods of Orientation class #260

Open CarterSnich opened 1 year ago

CarterSnich commented 1 year ago

All methods are null when called:

This error is located at:
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in MobotController(RootComponent), js engine: hermes
 ERROR  TypeError: Cannot read property 'lockToLandscape' of null, js engine: hermes
anshif10 commented 1 year ago

same issue

anshif10 commented 1 year ago

Cannot read property 'lockToLandscape' of null

Mango932 commented 1 year ago

Same here

serhii-kucherenko commented 1 year ago

Same issue, but seems like nobody cares

serhii-kucherenko commented 1 year ago

Try to:

  1. Check AndroidManifest whether you added the permissions
  2. Check whether those permissions for phones or tables or for both

All methods are null when called:

This error is located at:
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in MobotController(RootComponent), js engine: hermes
 ERROR  TypeError: Cannot read property 'lockToLandscape' of null, js engine: hermes
steveq9t4 commented 10 months ago

Same issue still happening on new installs of this package

Veryinheart commented 9 months ago

same issue, any fix or workaround?

serhii-kucherenko commented 9 months ago

same issue, any fix or workaround?

Add check to your method call: Orientation?.method Name()

gmartpad commented 7 months ago

Any update on the situation of this problem?

gufengpiaoyi commented 3 months ago

Same here,but why?confict with other module?