Closed orafaaraujo closed 2 years ago
Hello,
Here's the code used to start the library
// Creating anonymous user before having our session
val anonymousUser = LDUser.Builder("user key")
.anonymous(true)
.country(isoCountry)
.build()
// Setting up two environments
val stageKeyName = "staging"
val secondaryMobileKeys: Map<String, String> = mutableMapOf(
stageKeyName to "stage mobile key",
)
// Creating the LDConfig
val config: LDConfig = LDConfig.Builder()
.mobileKey("prod mobile key")
.secondaryMobileKeys(secondaryMobileKeys)
.build()
LDClient.init(application, config, anonymousUser)
val client: LDClient =
if (BuildConfig.DEBUG) {
LDClient.getForMobileKey(stageKeyName)
} else {
LDClient.get()
}
// Setting up our non fatal listener
client.registerStatusListener(
object : LDStatusListener {
override fun onConnectionModeChanged(connectionInfo: ConnectionInformation) {
Log.d(TAG, "onConnectionModeChanged - connectionInfo = [$connectionInfo]")
}
override fun onInternalFailure(ldFailure: LDFailure) {
// Tracking non fatal ignoring LDFailure.FailureType.NETWORK_FAILURE
trackNonFatal(ldFailure)
}
}
)
I'm omitting more build types and custom attributes when creating a user, but this is the implementation to start the library.
Once the session is created, we update and alias the logged user.
Hello @orafaaraujo, thank you for your question. We don't have an obvious answer from our side yet and will need to look into this more.
Filed Internally as 143101.
Hello @orafaaraujo, thank you for reaching out to our Support. Because our Support team works with customers and developers like you all the time, they have a lot of experience helping people using our SDKs. I will close this for now and have the conversation through Support.
Describe the bug Hello,
We added some nonfatal in the listener LDStatusListener and we noticed a quantity of
INVALID_RESPONSE_BODY
when the app is in the background (346 non-fatal events affecting 293 users
in the last 24 hours).The
LDFailure.message
isException while handling flag fetch response
TheLDFailure.cause
is mostlyBut we also have many of
So I would like to understand better the impact of this error, why it happens only in the background, and if there's something that we could do to avoid it.
To reproduce I couldn’t reproduce it locally.
Expected behavior Not having
INVALID_RESPONSE_BODY
, like it happens when the app is in the foreground.SDK version 3.1.1
Language version, developer tools Kotlin 1.5.31, building with AGP 7.0.4 and Gradle 7.1
Let me know if you need more information. Thank you