flutter-client-sdk icon indicating copy to clipboard operation
flutter-client-sdk copied to clipboard

LDClient.get() was called before init()!

Open LokeshDevMaersk opened this issue 1 year ago • 2 comments

Still facing below issue on updating launchdarkly_flutter_client_sdk package to ^3.0.1. :

issueUnhandled Exception: MissingPluginException(No implementation found for method start on channel launchdarkly_flutter_client_sdk):

Below is the code for reference:

final LDConfig ldConfig = LDConfigBuilder(myKey, AutoEnvAttributes.Enabled) .build();

LDContextBuilder builder = LDContextBuilder(); const String contextKind = 'myUser'; builder.kind(contextKind, myUserId).anonymous(true); await LDClient.start(ldConfig, builder.build())

LokeshDevMaersk avatar Nov 23 '23 11:11 LokeshDevMaersk

Hi @LokeshDevMaersk, this seems like a very strong match to this issue. However, the root cause of that issue was missing a call to builder.kind(...), which you have.

You mentioned that you are facing the issue "on updating". Were you using a different version previously? If so, what version was that? Have you cleaned your project recently to verify changes you're making while debugging end up in the build output?

tanderson-ld avatar Nov 27 '23 15:11 tanderson-ld

launchdarkly_flutter_client_sdk

Hi @tanderson-ld, Sorry for the delayed response. As you asked we had been using launchdarkly_flutter_client_sdk: ^1.1.4, Prior to the latest version that is ^3.0.1. And yes I have tried doing project cleanup to remove any residue related to this package

LokeshDevMaersk avatar Dec 04 '23 08:12 LokeshDevMaersk