Open beinghassandar1 opened 2 months ago
@beinghassandar1 Do you mind checking if you're using the right endpoint/config ?
We are using our self hosted api endpoint. 99% of the users get correct data... Few users are getting Json from the same endpoint.
Hi, @beinghassandar1. We will check that and get back to you asap.
Thank you. Just fyi, we are seeing more crash reports for other Android versions too. Like Android 9, 11, 12, 13, 14. All of them are either of the 2 crashes in the message above.
Thank you for the detailed information. It will help us fix that.
We are using our self hosted api endpoint. 99% of the users get correct data... Few users are getting Json from the same endpoint.
But what actually highlights that 1 percent with not right information. Maybe some version or some properties?
Hhmm, hard to say. They are all on the latest build as we have recently released the new version with Growthbook sdk implementation.
We are also getting more reports now but the crash is always something to do with wrong json.
Fatal Exception: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Expected start of the object '{', but had '<' instead at path: $
JSON input: <!DOCTYPE html><html><noscript.....
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:598)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt:596)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$kotlinx_serialization_json(AbstractJsonLexer.kt:233)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$kotlinx_serialization_json$default(AbstractJsonLexer.kt:228)
at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:225)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:74)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:102)
at com.sdk.growthbook.features.FeaturesDataModel$$serializer.deserialize(FeaturesDataModel.kt:10)
at com.sdk.growthbook.features.FeaturesDataModel$$serializer.deserialize(FeaturesDataModel.kt:10)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:107)
at com.sdk.growthbook.features.FeaturesDataSource$fetchFeatures$1.invoke(FeaturesDataSource.kt:42)
at com.sdk.growthbook.features.FeaturesDataSource$fetchFeatures$1.invoke(FeaturesDataSource.kt:40)
at com.sdk.growthbook.network.GBNetworkDispatcherOkHttp$consumeGETRequest$1$1.onResponse(GBNetworkDispatcherOkHttp.kt:61)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
@beinghassandar1 Is there a pattern you see on these crash errors? the 1% users are consistently getting this error? if it consistent, is there a way for you to replicate this error?
Hi, @beinghassandar1 . After what steps did these users receive that, and what options did the user enable?
Hey, When user logins and we initialize the sdk, we see a crash from there users. Its not even 1% now. Its more than that. I saw 450+ crashes for 116 users. All are for the same reason. The json is not valid.
Also, I got a new crash log.
ourserver_url = the url of our own hosting server
Fatal Exception: kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Expected start of the object '{', but had 'r' instead at path: $
JSON input: relay failed to <ourserver_url>:3100
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:598)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt:596)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$kotlinx_serialization_json(AbstractJsonLexer.kt:233)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$kotlinx_serialization_json$default(AbstractJsonLexer.kt:228)
at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:225)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:74)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:102)
at com.sdk.growthbook.features.FeaturesDataModel$$serializer.deserialize(FeaturesDataModel.kt:10)
at com.sdk.growthbook.features.FeaturesDataModel$$serializer.deserialize(FeaturesDataModel.kt:10)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:107)
at com.sdk.growthbook.features.FeaturesDataSource$fetchFeatures$1.invoke(FeaturesDataSource.kt:42)
at com.sdk.growthbook.features.FeaturesDataSource$fetchFeatures$1.invoke(FeaturesDataSource.kt:40)
at com.sdk.growthbook.network.GBNetworkDispatcherOkHttp$consumeGETRequest$1$1.onResponse(GBNetworkDispatcherOkHttp.kt:61)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Hi, @beinghassandar1. Thank you for information, we will check that.
Hi, we fixed that. Here is a link to PR. After merge it will be released
Hey guys, we are getting this crash on Android 13.
Can you guys please tell us why growth book is trying to deserialize
<!DOCTYPE html><html lang="pt"
from the backend instead of the actual json for features?Lib Versions:
Initialization