react-native-launch-arguments icon indicating copy to clipboard operation
react-native-launch-arguments copied to clipboard

iOS: Cannot read property 'value' of null

Open rkenfack opened this issue 2 years ago • 5 comments

I am using react-native-launch-arguments 3.1.4 together with react-native 0.69.3. I trying to pass data from detox to my app for testing purposes but it seems like the react-native-launch-arguments package is not installed properly. Here is the full error:

"TypeError: Cannot read property 'LaunchArguments' of undefined\n\nThis error is located at:\n in App (at myApp/index.js:36)\n in Provider (at Providers.tsx:43)\n in ThemeProvider (at Providers.tsx:54)\n in StyledComponentsThemeProvider (at Providers.tsx:42)\n in HCThemeProvider (at Providers.tsx:41)\n in QueryClientProvider (at Providers.tsx:40)\n in RCTView (at View.js:32)\n in View (at GestureHandlerRootView.tsx:17)\n in GestureHandlerRootView (at Providers.tsx:39)\n in HCDebugProvider (at Providers.tsx:38)\n in Providers (at myApp/index.js:35)\n in AppWithProviders (at myApp/index.js:26)\n in HeadlessCheck (at renderApplication.js:50)\n in RCTView (at View.js:32)\n in View (at AppContainer.js:92)\n in RCTView (at View.js:32)\n in View (at AppContainer.js:119)\n in AppContainer (at renderApplication.js:43)\n in DeliveryTrackingApp(RootComponent) (at renderApplication.js:60), js engine: hermes"

Thanks for help

rkenfack avatar Mar 29 '23 09:03 rkenfack

Simulator Screen Shot - iPhone 11 Pro - 2023-03-29 at 12 00 29

rkenfack avatar Mar 29 '23 10:03 rkenfack

Could you try please the previous version?

iamolegga avatar Mar 29 '23 12:03 iamolegga

I just realized that it works fine when i do xcrun simctl launch booted my.package.id -isDetox true. But using device.launchApp from detox it does not

rkenfack avatar Mar 29 '23 13:03 rkenfack

Heya mate, after installing this module you need to re-build your Detox binary (detox build <etc>), otherwise you're still reusing detox binary that didnt have the native module installed. :)

rodperottoni avatar May 08 '23 22:05 rodperottoni

Thanks @rodperottoni ! Would you like to open a PR to include this in the docs?

iamolegga avatar May 09 '23 10:05 iamolegga