react-native-orientation-locker icon indicating copy to clipboard operation
react-native-orientation-locker copied to clipboard

Getting null to all methods of Orientation class

Open CarterSnich opened this issue 1 year ago • 10 comments

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

CarterSnich avatar Mar 27 '23 16:03 CarterSnich

same issue

anshif10 avatar Jun 07 '23 05:06 anshif10

Cannot read property 'lockToLandscape' of null

anshif10 avatar Jun 07 '23 05:06 anshif10

Same here

Mango932 avatar Aug 13 '23 16:08 Mango932

Same issue, but seems like nobody cares

serhii-kucherenko avatar Nov 04 '23 06:11 serhii-kucherenko

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

serhii-kucherenko avatar Nov 04 '23 06:11 serhii-kucherenko

Same issue still happening on new installs of this package

steveq9t4 avatar Jan 10 '24 21:01 steveq9t4

same issue, any fix or workaround?

Veryinheart avatar Feb 09 '24 06:02 Veryinheart

same issue, any fix or workaround?

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

serhii-kucherenko avatar Feb 09 '24 06:02 serhii-kucherenko

Any update on the situation of this problem?

gmartpad avatar Mar 24 '24 15:03 gmartpad

Same here,but why?confict with other module?

gufengpiaoyi avatar Jul 30 '24 08:07 gufengpiaoyi