Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Exception 'configureWithTimeout:userConfig:timeout:resolve:reject: is not a recognized Objective-C method.' #80

@yskoht

Description

@yskoht

Describe the bug
configure throws exception when timeout is specified.

To reproduce
The bug is reproduced by applying the following patch to launchdarkly/hello-react-native.

diff --git a/App.js b/App.js
index 24102300..7514fdf0 100644
--- a/App.js
+++ b/App.js
@@ -52,7 +52,7 @@ export default class App extends React.Component {

       let user = {key: this.state.userKey};

-      await client.configure(config, user);
+      await client.configure(config, user, 3);
       // eslint-disable-next-line react/no-did-mount-set-state
       this.setState({ldClient: client});
     } catch (err) {

The full source code can be found here.

Expected behavior
No exceptions are thrown.

Logs
I filtered mobileKey.

Exception 'configureWithTimeout:userConfig:timeout:resolve:reject: is not a recognized Objective-C method.' was thrown while invoking configureWithTimeout on target LaunchdarklyReactNativeClient with params (
        {
        backgroundPollingIntervalMillis = 3600000;
        connectionTimeoutMillis = 10000;
        debugMode = 1;
        disableBackgroundUpdating = 0;
        eventsCapacity = 100;
        eventsFlushIntervalMillis = 30000;
        mobileKey = "[Filtered]";
        offline = 0;
        pollUri = "https://app.launchdarkly.com";
        pollingIntervalMillis = 300000;
        stream = 1;
        streamUri = "https://clientstream.launchdarkly.com";
        useReport = 0;
        wrapperName = "react-native-client-sdk";
        wrapperVersion = "4.2.0";
    },
        {
        anonymous = 0;
        key = "user key";
    },
    3,
    8356,
    8357
)
callstack: (
	0   CoreFoundation                      0x00007fff20422fba __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20193ff5 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff20422de3 +[NSException raise:format:] + 0
	3   Foundation                          0x00007fff207749b0 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
	4   HelloReactNative                    0x00000001005c3b3f -[RCTModuleMethod processMethodSignature] + 1023
	5   HelloReactNative                    0x00000001005cb96e -[RCTModuleMethod invokeWithBridge:module:arguments:] + 190
	6   HelloReactNative                    0x00000001005d0ab7 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1495
	7   HelloReactNative                    0x00000001005d02d5 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 165
	8   HelloReactNative                    0x00000001005d021c ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
	9   libdispatch.dylib                   0x00007fff2010670d _dispatch_call_block_and_release + 12
	10  libdispatch.dylib                   0x00007fff201078df _dispatch_client_callout + 8
	11  libdispatch.dylib                   0x00007fff2010de15 _dispatch_lane_serial_drain + 715
	12  libdispatch.dylib                   0x00007fff2010e98c _dispatch_lane_invoke + 400
	13  libdispatch.dylib                   0x00007fff20118f81 _dispatch_workloop_worker_thread + 772
	14  libsystem_pthread.dylib             0x00007fff6033f499 _pthread_wqthread + 314
	15  libsystem_pthread.dylib             0x00007fff6033e467 start_wqthread + 15
)

RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread

SDK version

    "launchdarkly-react-native-client-sdk": "^4.2.0",

Language version, developer tools

$ node node_modules/react-native/local-cli/cli.js info
info Fetching system and libraries information...
System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 82.30 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.4.0 - ~/.anyenv/envs/nodenv/versions/14.4.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.5 - ~/.anyenv/envs/nodenv/versions/14.4.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /Users/yskoht/.anyenv/envs/rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.2
      System Images: android-23 | Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Google Play Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_265 - /Users/yskoht/.anyenv/envs/jenv/shims/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.0 => 0.64.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

OS/platform
macOS 11.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions